[commit][3418] CogVM source as per VMMaker.oscog-eem.1429

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[commit][3418] CogVM source as per VMMaker.oscog-eem.1429

commits-3
 
Revision: 3418
Author:   eliot
Date:     2015-08-10 10:49:36 -0700 (Mon, 10 Aug 2015)
Log Message:
-----------
CogVM source as per VMMaker.oscog-eem.1429

Fix Integer receiver, float arg comparison with NaNs in the machine-code
primitive.  This has started failing in the FloatTest>>testNaNCompare since the
new machine-code perform primitive invoked the machine-code version of the
primitive.  The Interpretewr code has always been correct and the old perform
primitive would always run the Interpreter primitive if it exsted, since this
would probably be faster.

Refactor stack page list printing to include use counts.

Newspeak:
Fix MNU for cogged self and outer sends.

Use the right paths in the Newspeak SSL Plugin builds.

Modified Paths:
--------------
    branches/Cog/build.macos32x86/newspeak.cog.spur/SqueakSSL/SqueakSSL.xcodeproj/project.pbxproj
    branches/Cog/build.macos32x86/newspeak.cog.spur/UnixOSProcessPlugin/UnixOSProcessPlugin.xcodeproj/project.pbxproj
    branches/Cog/build.macos32x86/newspeak.stack.spur/SqueakSSL/SqueakSSL.xcodeproj/project.pbxproj
    branches/Cog/build.macos32x86/newspeak.stack.spur/UnixOSProcessPlugin/UnixOSProcessPlugin.xcodeproj/project.pbxproj
    branches/Cog/nsspursrc/vm/cogit.h
    branches/Cog/nsspursrc/vm/cogitARMv5.c
    branches/Cog/nsspursrc/vm/cogitIA32.c
    branches/Cog/nsspursrc/vm/cointerp.c
    branches/Cog/nsspursrc/vm/cointerp.h
    branches/Cog/nsspursrc/vm/gcc3x-cointerp.c
    branches/Cog/nsspurstack64src/vm/gcc3x-interp.c
    branches/Cog/nsspurstack64src/vm/interp.c
    branches/Cog/nsspurstacksrc/vm/gcc3x-interp.c
    branches/Cog/nsspurstacksrc/vm/interp.c
    branches/Cog/spursistasrc/vm/cogit.h
    branches/Cog/spursistasrc/vm/cogitARMv5.c
    branches/Cog/spursistasrc/vm/cogitIA32.c
    branches/Cog/spursistasrc/vm/cointerp.c
    branches/Cog/spursistasrc/vm/cointerp.h
    branches/Cog/spursistasrc/vm/gcc3x-cointerp.c
    branches/Cog/spursrc/vm/cogit.h
    branches/Cog/spursrc/vm/cogitARMv5.c
    branches/Cog/spursrc/vm/cogitIA32.c
    branches/Cog/spursrc/vm/cointerp.c
    branches/Cog/spursrc/vm/cointerp.h
    branches/Cog/spursrc/vm/gcc3x-cointerp.c
    branches/Cog/spurstack64src/vm/gcc3x-interp.c
    branches/Cog/spurstack64src/vm/interp.c
    branches/Cog/spurstacksrc/vm/gcc3x-interp.c
    branches/Cog/spurstacksrc/vm/interp.c
    branches/Cog/src/vm/cogit.h
    branches/Cog/src/vm/cogitARMv5.c
    branches/Cog/src/vm/cogitIA32.c
    branches/Cog/src/vm/cointerp.c
    branches/Cog/src/vm/cointerp.h
    branches/Cog/src/vm/cointerpmt.c
    branches/Cog/src/vm/cointerpmt.h
    branches/Cog/src/vm/gcc3x-cointerp.c
    branches/Cog/src/vm/gcc3x-cointerpmt.c
    branches/Cog/stacksrc/vm/gcc3x-interp.c
    branches/Cog/stacksrc/vm/interp.c

Property Changed:
----------------
    branches/Cog/build.macos32x86/newspeak.cog.spur/installer/
    branches/Cog/platforms/Cross/vm/sqSCCSVersion.h

Modified: branches/Cog/build.macos32x86/newspeak.cog.spur/SqueakSSL/SqueakSSL.xcodeproj/project.pbxproj
===================================================================
--- branches/Cog/build.macos32x86/newspeak.cog.spur/SqueakSSL/SqueakSSL.xcodeproj/project.pbxproj 2015-07-30 01:55:26 UTC (rev 3417)
+++ branches/Cog/build.macos32x86/newspeak.cog.spur/SqueakSSL/SqueakSSL.xcodeproj/project.pbxproj 2015-08-10 17:49:36 UTC (rev 3418)
@@ -17,7 +17,7 @@
 
 /* Begin PBXFileReference section */
  32BAE0B30371A71500C91783 /* SqueakSSL_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SqueakSSL_Prefix.pch; sourceTree = "<group>"; };
- 73027B6A17012E5F0086D8E4 /* SqueakSSL.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = SqueakSSL.c; path = ../../../src/plugins/SqueakSSL/SqueakSSL.c; sourceTree = SOURCE_ROOT; };
+ 73027B6A17012E5F0086D8E4 /* SqueakSSL.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = SqueakSSL.c; path = ../../../nsspursrc/plugins/SqueakSSL/SqueakSSL.c; sourceTree = SOURCE_ROOT; };
  732D9F4117012B6E00E25893 /* Security.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Security.framework; path = /System/Library/Frameworks/Security.framework; sourceTree = "<absolute>"; };
  732D9F4217012B6E00E25893 /* CoreFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreFoundation.framework; path = /System/Library/Frameworks/CoreFoundation.framework; sourceTree = "<absolute>"; };
  73811791170128D400CB30CE /* sq.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = sq.h; path = ../../../platforms/Cross/vm/sq.h; sourceTree = SOURCE_ROOT; };

Modified: branches/Cog/build.macos32x86/newspeak.cog.spur/UnixOSProcessPlugin/UnixOSProcessPlugin.xcodeproj/project.pbxproj
===================================================================
--- branches/Cog/build.macos32x86/newspeak.cog.spur/UnixOSProcessPlugin/UnixOSProcessPlugin.xcodeproj/project.pbxproj 2015-07-30 01:55:26 UTC (rev 3417)
+++ branches/Cog/build.macos32x86/newspeak.cog.spur/UnixOSProcessPlugin/UnixOSProcessPlugin.xcodeproj/project.pbxproj 2015-08-10 17:49:36 UTC (rev 3418)
@@ -14,9 +14,9 @@
 /* Begin PBXFileReference section */
  089C167EFE841241C02AAC07 /* English */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = "<group>"; };
  08EA7FFBFE8413EDC02AAC07 /* Carbon.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Carbon.framework; path = /System/Library/Frameworks/Carbon.framework; sourceTree = "<absolute>"; };
- 7308DE360B9614A4003B7CCD /* UnixOSProcessPlugin.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = UnixOSProcessPlugin.c; path = ../../../src/plugins/UnixOSProcessPlugin/UnixOSProcessPlugin.c; sourceTree = "<group>"; };
+ 7308DE360B9614A4003B7CCD /* UnixOSProcessPlugin.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = UnixOSProcessPlugin.c; path = ../../../nsspursrc/plugins/UnixOSProcessPlugin/UnixOSProcessPlugin.c; sourceTree = "<group>"; };
  73662FE60F53864E00C64E7F /* sqMemoryAccess.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = sqMemoryAccess.h; path = Cross/vm/sqMemoryAccess.h; sourceTree = "<group>"; };
- 73662FE70F53864E00C64E7F /* interp.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = interp.h; path = ../../../nsspurstacksrc/vm/interp.h; sourceTree = SOURCE_ROOT; };
+ 73662FE70F53864E00C64E7F /* interp.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = interp.h; path = ../../../nsspursrc/vm/interp.h; sourceTree = SOURCE_ROOT; };
  73662FE80F53864E00C64E7F /* config.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = config.h; path = "Mac OS/vm/config.h"; sourceTree = "<group>"; };
  73662FE90F53864E00C64E7F /* sqConfig.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = sqConfig.h; path = "Mac OS/vm/sqConfig.h"; sourceTree = "<group>"; };
  73662FEA0F53864E00C64E7F /* sqPlatformSpecific.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = sqPlatformSpecific.h; path = "Mac OS/vm/sqPlatformSpecific.h"; sourceTree = "<group>"; };


Property changes on: branches/Cog/build.macos32x86/newspeak.cog.spur/installer
___________________________________________________________________
Modified: svn:ignore
   - *.dmg

   + *.app
*.applescript
*.dmg


Modified: branches/Cog/build.macos32x86/newspeak.stack.spur/SqueakSSL/SqueakSSL.xcodeproj/project.pbxproj
===================================================================
--- branches/Cog/build.macos32x86/newspeak.stack.spur/SqueakSSL/SqueakSSL.xcodeproj/project.pbxproj 2015-07-30 01:55:26 UTC (rev 3417)
+++ branches/Cog/build.macos32x86/newspeak.stack.spur/SqueakSSL/SqueakSSL.xcodeproj/project.pbxproj 2015-08-10 17:49:36 UTC (rev 3418)
@@ -17,7 +17,7 @@
 
 /* Begin PBXFileReference section */
  32BAE0B30371A71500C91783 /* SqueakSSL_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SqueakSSL_Prefix.pch; sourceTree = "<group>"; };
- 73027B6A17012E5F0086D8E4 /* SqueakSSL.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = SqueakSSL.c; path = ../../../src/plugins/SqueakSSL/SqueakSSL.c; sourceTree = SOURCE_ROOT; };
+ 73027B6A17012E5F0086D8E4 /* SqueakSSL.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = SqueakSSL.c; path = ../../../nsspursrc/plugins/SqueakSSL/SqueakSSL.c; sourceTree = SOURCE_ROOT; };
  732D9F4117012B6E00E25893 /* Security.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Security.framework; path = /System/Library/Frameworks/Security.framework; sourceTree = "<absolute>"; };
  732D9F4217012B6E00E25893 /* CoreFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreFoundation.framework; path = /System/Library/Frameworks/CoreFoundation.framework; sourceTree = "<absolute>"; };
  73811791170128D400CB30CE /* sq.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = sq.h; path = ../../../platforms/Cross/vm/sq.h; sourceTree = SOURCE_ROOT; };

Modified: branches/Cog/build.macos32x86/newspeak.stack.spur/UnixOSProcessPlugin/UnixOSProcessPlugin.xcodeproj/project.pbxproj
===================================================================
--- branches/Cog/build.macos32x86/newspeak.stack.spur/UnixOSProcessPlugin/UnixOSProcessPlugin.xcodeproj/project.pbxproj 2015-07-30 01:55:26 UTC (rev 3417)
+++ branches/Cog/build.macos32x86/newspeak.stack.spur/UnixOSProcessPlugin/UnixOSProcessPlugin.xcodeproj/project.pbxproj 2015-08-10 17:49:36 UTC (rev 3418)
@@ -14,7 +14,7 @@
 /* Begin PBXFileReference section */
  089C167EFE841241C02AAC07 /* English */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = "<group>"; };
  08EA7FFBFE8413EDC02AAC07 /* Carbon.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Carbon.framework; path = /System/Library/Frameworks/Carbon.framework; sourceTree = "<absolute>"; };
- 7308DE360B9614A4003B7CCD /* UnixOSProcessPlugin.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = UnixOSProcessPlugin.c; path = ../../../src/plugins/UnixOSProcessPlugin/UnixOSProcessPlugin.c; sourceTree = "<group>"; };
+ 7308DE360B9614A4003B7CCD /* UnixOSProcessPlugin.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = UnixOSProcessPlugin.c; path = ../../../nsspursrc/plugins/UnixOSProcessPlugin/UnixOSProcessPlugin.c; sourceTree = "<group>"; };
  73662FE60F53864E00C64E7F /* sqMemoryAccess.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = sqMemoryAccess.h; path = Cross/vm/sqMemoryAccess.h; sourceTree = "<group>"; };
  73662FE70F53864E00C64E7F /* interp.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = interp.h; path = ../../../nsspurstacksrc/vm/interp.h; sourceTree = SOURCE_ROOT; };
  73662FE80F53864E00C64E7F /* config.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = config.h; path = "Mac OS/vm/config.h"; sourceTree = "<group>"; };

Modified: branches/Cog/nsspursrc/vm/cogit.h
===================================================================
--- branches/Cog/nsspursrc/vm/cogit.h 2015-07-30 01:55:26 UTC (rev 3417)
+++ branches/Cog/nsspursrc/vm/cogit.h 2015-08-10 17:49:36 UTC (rev 3418)
@@ -1,5 +1,5 @@
 /* Automatically generated by
- CCodeGenerator VMMaker.oscog-eem.1427 uuid: c5cb18c5-f69e-4e41-8f87-943a495659b4
+ CCodeGenerator VMMaker.oscog-eem.1429 uuid: 446c2481-93c9-43bc-86ac-0743223bfa0c
  */
 
 

Modified: branches/Cog/nsspursrc/vm/cogitARMv5.c
===================================================================
--- branches/Cog/nsspursrc/vm/cogitARMv5.c 2015-07-30 01:55:26 UTC (rev 3417)
+++ branches/Cog/nsspursrc/vm/cogitARMv5.c 2015-08-10 17:49:36 UTC (rev 3418)
@@ -1,9 +1,9 @@
 /* Automatically generated by
- CCodeGenerator VMMaker.oscog-eem.1427 uuid: c5cb18c5-f69e-4e41-8f87-943a495659b4
+ CCodeGenerator VMMaker.oscog-eem.1429 uuid: 446c2481-93c9-43bc-86ac-0743223bfa0c
    from
- StackToRegisterMappingCogit VMMaker.oscog-eem.1427 uuid: c5cb18c5-f69e-4e41-8f87-943a495659b4
+ StackToRegisterMappingCogit VMMaker.oscog-eem.1429 uuid: 446c2481-93c9-43bc-86ac-0743223bfa0c
  */
-static char __buildInfo[] = "StackToRegisterMappingCogit VMMaker.oscog-eem.1427 uuid: c5cb18c5-f69e-4e41-8f87-943a495659b4 " __DATE__ ;
+static char __buildInfo[] = "StackToRegisterMappingCogit VMMaker.oscog-eem.1429 uuid: 446c2481-93c9-43bc-86ac-0743223bfa0c " __DATE__ ;
 char *__cogitBuildInfo = __buildInfo;
 
 
@@ -687,8 +687,6 @@
 static AbstractInstruction * gJumpFPEqual(void *jumpTarget) NoDbgRegParms;
 static AbstractInstruction * gJumpFPGreaterOrEqual(void *jumpTarget) NoDbgRegParms;
 static AbstractInstruction * gJumpFPGreater(void *jumpTarget) NoDbgRegParms;
-static AbstractInstruction * gJumpFPLessOrEqual(void *jumpTarget) NoDbgRegParms;
-static AbstractInstruction * gJumpFPLess(void *jumpTarget) NoDbgRegParms;
 static AbstractInstruction * gJumpFPNotEqual(void *jumpTarget) NoDbgRegParms;
 static AbstractInstruction * gLabel(void);
 static AbstractInstruction * gLogicalShiftLeftCqR(sqInt quickConstant, sqInt reg) NoDbgRegParms;
@@ -1157,7 +1155,7 @@
 static sqInt genSendTrampolineFornumArgscalledargargargarg(void *aRoutine, sqInt numArgs, char *aString, sqInt regOrConst0, sqInt regOrConst1, sqInt regOrConst2, sqInt regOrConst3) NoDbgRegParms;
 static sqInt genSendnumArgs(sqInt selector, sqInt numArgs) NoDbgRegParms;
 static sqInt genSmallIntegerComparison(sqInt jumpOpcode) NoDbgRegParms;
-static sqInt genSmallIntegerComparisonorDoubleComparison(sqInt jumpOpcode, AbstractInstruction *(*jumpFPOpcodeGenerator)(void *)) NoDbgRegParms;
+static sqInt genSmallIntegerComparisonorDoubleComparisoninvert(sqInt jumpOpcode, AbstractInstruction *(*jumpFPOpcodeGenerator)(void *), sqInt invertComparison) NoDbgRegParms;
 static sqInt genSpecialSelectorArithmetic(void);
 static sqInt genSpecialSelectorClass(void);
 static sqInt genSpecialSelectorComparison(void);
@@ -9895,7 +9893,7 @@
 {
     sqInt classIndex;
     sqInt i;
-    usqInt pc;
+    sqInt pc;
 
  pc = (((((usqInt)cPIC)) + firstCPICCaseOffset) + cPICCaseSize) - (jumpLongConditionalByteSize(backEnd));
  for (i = 2; i <= ((cPIC->cPICNumCases)); i += 1) {
@@ -11901,30 +11899,6 @@
 /* Floating-point jumps are a little weird on some processors. Defer to
  the backEnd to allow it to generate any special code it may need to. */
 
- /* Cogit>>#JumpFPLessOrEqual: */
-static AbstractInstruction *
-gJumpFPLessOrEqual(void *jumpTarget)
-{
- /* begin genJumpFPLessOrEqual: */
- return genoperand(JumpFPLessOrEqual, ((sqInt)jumpTarget));
-}
-
-
-/* Floating-point jumps are a little weird on some processors. Defer to
- the backEnd to allow it to generate any special code it may need to. */
-
- /* Cogit>>#JumpFPLess: */
-static AbstractInstruction *
-gJumpFPLess(void *jumpTarget)
-{
- /* begin genJumpFPLess: */
- return genoperand(JumpFPLess, ((sqInt)jumpTarget));
-}
-
-
-/* Floating-point jumps are a little weird on some processors. Defer to
- the backEnd to allow it to generate any special code it may need to. */
-
  /* Cogit>>#JumpFPNotEqual: */
 static AbstractInstruction *
 gJumpFPNotEqual(void *jumpTarget)
@@ -22061,7 +22035,7 @@
 static sqInt
 genPrimitiveEqual(void)
 {
- return genSmallIntegerComparisonorDoubleComparison(JumpZero, gJumpFPEqual);
+ return genSmallIntegerComparisonorDoubleComparisoninvert(JumpZero, gJumpFPEqual, 0);
 }
 
  /* SimpleStackBasedCogit>>#genPrimitiveFloatAdd */
@@ -22138,35 +22112,35 @@
 static sqInt
 genPrimitiveGreaterOrEqual(void)
 {
- return genSmallIntegerComparisonorDoubleComparison(JumpGreaterOrEqual, gJumpFPGreaterOrEqual);
+ return genSmallIntegerComparisonorDoubleComparisoninvert(JumpGreaterOrEqual, gJumpFPGreaterOrEqual, 0);
 }
 
  /* SimpleStackBasedCogit>>#genPrimitiveGreaterThan */
 static sqInt
 genPrimitiveGreaterThan(void)
 {
- return genSmallIntegerComparisonorDoubleComparison(JumpGreater, gJumpFPGreater);
+ return genSmallIntegerComparisonorDoubleComparisoninvert(JumpGreater, gJumpFPGreater, 0);
 }
 
  /* SimpleStackBasedCogit>>#genPrimitiveLessOrEqual */
 static sqInt
 genPrimitiveLessOrEqual(void)
 {
- return genSmallIntegerComparisonorDoubleComparison(JumpLessOrEqual, gJumpFPLessOrEqual);
+ return genSmallIntegerComparisonorDoubleComparisoninvert(JumpLessOrEqual, gJumpFPGreater, 1);
 }
 
  /* SimpleStackBasedCogit>>#genPrimitiveLessThan */
 static sqInt
 genPrimitiveLessThan(void)
 {
- return genSmallIntegerComparisonorDoubleComparison(JumpLess, gJumpFPLess);
+ return genSmallIntegerComparisonorDoubleComparisoninvert(JumpLess, gJumpFPGreaterOrEqual, 1);
 }
 
  /* SimpleStackBasedCogit>>#genPrimitiveNotEqual */
 static sqInt
 genPrimitiveNotEqual(void)
 {
- return genSmallIntegerComparisonorDoubleComparison(JumpNonZero, gJumpFPNotEqual);
+ return genSmallIntegerComparisonorDoubleComparisoninvert(JumpNonZero, gJumpFPNotEqual, 0);
 }
 
 
@@ -26342,9 +26316,9 @@
 /* Stack looks like
  return address */
 
- /* StackToRegisterMappingCogit>>#genSmallIntegerComparison:orDoubleComparison: */
+ /* StackToRegisterMappingCogit>>#genSmallIntegerComparison:orDoubleComparison:invert: */
 static sqInt
-genSmallIntegerComparisonorDoubleComparison(sqInt jumpOpcode, AbstractInstruction *(*jumpFPOpcodeGenerator)(void *))
+genSmallIntegerComparisonorDoubleComparisoninvert(sqInt jumpOpcode, AbstractInstruction *(*jumpFPOpcodeGenerator)(void *), sqInt invertComparison)
 {
     sqInt constant;
     sqInt constant1;
@@ -26386,9 +26360,18 @@
  /* begin ConvertR:Rd: */
  genoperandoperand(ConvertRRd, ReceiverResultReg, DPFPReg0);
  genGetDoubleValueOfinto(Arg0Reg, DPFPReg1);
- /* begin CmpRd:Rd: */
- genoperandoperand(CmpRdRd, DPFPReg1, DPFPReg0);
+ if (invertComparison) {
 
+ /* May need to invert for NaNs */
+
+ /* begin CmpRd:Rd: */
+ genoperandoperand(CmpRdRd, DPFPReg0, DPFPReg1);
+ }
+ else {
+ /* begin CmpRd:Rd: */
+ genoperandoperand(CmpRdRd, DPFPReg1, DPFPReg0);
+ }
+
  /* FP jumps are a little weird */
 
  jumpCond = jumpFPOpcodeGenerator(0);

Modified: branches/Cog/nsspursrc/vm/cogitIA32.c
===================================================================
--- branches/Cog/nsspursrc/vm/cogitIA32.c 2015-07-30 01:55:26 UTC (rev 3417)
+++ branches/Cog/nsspursrc/vm/cogitIA32.c 2015-08-10 17:49:36 UTC (rev 3418)
@@ -1,9 +1,9 @@
 /* Automatically generated by
- CCodeGenerator VMMaker.oscog-eem.1427 uuid: c5cb18c5-f69e-4e41-8f87-943a495659b4
+ CCodeGenerator VMMaker.oscog-eem.1429 uuid: 446c2481-93c9-43bc-86ac-0743223bfa0c
    from
- StackToRegisterMappingCogit VMMaker.oscog-eem.1427 uuid: c5cb18c5-f69e-4e41-8f87-943a495659b4
+ StackToRegisterMappingCogit VMMaker.oscog-eem.1429 uuid: 446c2481-93c9-43bc-86ac-0743223bfa0c
  */
-static char __buildInfo[] = "StackToRegisterMappingCogit VMMaker.oscog-eem.1427 uuid: c5cb18c5-f69e-4e41-8f87-943a495659b4 " __DATE__ ;
+static char __buildInfo[] = "StackToRegisterMappingCogit VMMaker.oscog-eem.1429 uuid: 446c2481-93c9-43bc-86ac-0743223bfa0c " __DATE__ ;
 char *__cogitBuildInfo = __buildInfo;
 
 
@@ -630,8 +630,6 @@
 static AbstractInstruction * gJumpFPEqual(void *jumpTarget) NoDbgRegParms;
 static AbstractInstruction * gJumpFPGreaterOrEqual(void *jumpTarget) NoDbgRegParms;
 static AbstractInstruction * gJumpFPGreater(void *jumpTarget) NoDbgRegParms;
-static AbstractInstruction * gJumpFPLessOrEqual(void *jumpTarget) NoDbgRegParms;
-static AbstractInstruction * gJumpFPLess(void *jumpTarget) NoDbgRegParms;
 static AbstractInstruction * gJumpFPNotEqual(void *jumpTarget) NoDbgRegParms;
 static AbstractInstruction * gLabel(void);
 static AbstractInstruction * gLogicalShiftLeftCqR(sqInt quickConstant, sqInt reg) NoDbgRegParms;
@@ -1076,7 +1074,7 @@
 static sqInt genSendTrampolineFornumArgscalledargargargarg(void *aRoutine, sqInt numArgs, char *aString, sqInt regOrConst0, sqInt regOrConst1, sqInt regOrConst2, sqInt regOrConst3) NoDbgRegParms;
 static sqInt genSendnumArgs(sqInt selector, sqInt numArgs) NoDbgRegParms;
 static sqInt genSmallIntegerComparison(sqInt jumpOpcode) NoDbgRegParms;
-static sqInt genSmallIntegerComparisonorDoubleComparison(sqInt jumpOpcode, AbstractInstruction *(*jumpFPOpcodeGenerator)(void *)) NoDbgRegParms;
+static sqInt genSmallIntegerComparisonorDoubleComparisoninvert(sqInt jumpOpcode, AbstractInstruction *(*jumpFPOpcodeGenerator)(void *), sqInt invertComparison) NoDbgRegParms;
 static sqInt genSpecialSelectorArithmetic(void);
 static sqInt genSpecialSelectorClass(void);
 static sqInt genSpecialSelectorComparison(void);
@@ -11017,30 +11015,6 @@
 /* Floating-point jumps are a little weird on some processors. Defer to
  the backEnd to allow it to generate any special code it may need to. */
 
- /* Cogit>>#JumpFPLessOrEqual: */
-static AbstractInstruction *
-gJumpFPLessOrEqual(void *jumpTarget)
-{
- /* begin genJumpFPLessOrEqual: */
- return genoperand(JumpFPLessOrEqual, ((sqInt)jumpTarget));
-}
-
-
-/* Floating-point jumps are a little weird on some processors. Defer to
- the backEnd to allow it to generate any special code it may need to. */
-
- /* Cogit>>#JumpFPLess: */
-static AbstractInstruction *
-gJumpFPLess(void *jumpTarget)
-{
- /* begin genJumpFPLess: */
- return genoperand(JumpFPLess, ((sqInt)jumpTarget));
-}
-
-
-/* Floating-point jumps are a little weird on some processors. Defer to
- the backEnd to allow it to generate any special code it may need to. */
-
  /* Cogit>>#JumpFPNotEqual: */
 static AbstractInstruction *
 gJumpFPNotEqual(void *jumpTarget)
@@ -21492,7 +21466,7 @@
 static sqInt
 genPrimitiveEqual(void)
 {
- return genSmallIntegerComparisonorDoubleComparison(JumpZero, gJumpFPEqual);
+ return genSmallIntegerComparisonorDoubleComparisoninvert(JumpZero, gJumpFPEqual, 0);
 }
 
  /* SimpleStackBasedCogit>>#genPrimitiveFloatAdd */
@@ -21569,35 +21543,35 @@
 static sqInt
 genPrimitiveGreaterOrEqual(void)
 {
- return genSmallIntegerComparisonorDoubleComparison(JumpGreaterOrEqual, gJumpFPGreaterOrEqual);
+ return genSmallIntegerComparisonorDoubleComparisoninvert(JumpGreaterOrEqual, gJumpFPGreaterOrEqual, 0);
 }
 
  /* SimpleStackBasedCogit>>#genPrimitiveGreaterThan */
 static sqInt
 genPrimitiveGreaterThan(void)
 {
- return genSmallIntegerComparisonorDoubleComparison(JumpGreater, gJumpFPGreater);
+ return genSmallIntegerComparisonorDoubleComparisoninvert(JumpGreater, gJumpFPGreater, 0);
 }
 
  /* SimpleStackBasedCogit>>#genPrimitiveLessOrEqual */
 static sqInt
 genPrimitiveLessOrEqual(void)
 {
- return genSmallIntegerComparisonorDoubleComparison(JumpLessOrEqual, gJumpFPLessOrEqual);
+ return genSmallIntegerComparisonorDoubleComparisoninvert(JumpLessOrEqual, gJumpFPGreater, 1);
 }
 
  /* SimpleStackBasedCogit>>#genPrimitiveLessThan */
 static sqInt
 genPrimitiveLessThan(void)
 {
- return genSmallIntegerComparisonorDoubleComparison(JumpLess, gJumpFPLess);
+ return genSmallIntegerComparisonorDoubleComparisoninvert(JumpLess, gJumpFPGreaterOrEqual, 1);
 }
 
  /* SimpleStackBasedCogit>>#genPrimitiveNotEqual */
 static sqInt
 genPrimitiveNotEqual(void)
 {
- return genSmallIntegerComparisonorDoubleComparison(JumpNonZero, gJumpFPNotEqual);
+ return genSmallIntegerComparisonorDoubleComparisoninvert(JumpNonZero, gJumpFPNotEqual, 0);
 }
 
 
@@ -26063,9 +26037,9 @@
 /* Stack looks like
  return address */
 
- /* StackToRegisterMappingCogit>>#genSmallIntegerComparison:orDoubleComparison: */
+ /* StackToRegisterMappingCogit>>#genSmallIntegerComparison:orDoubleComparison:invert: */
 static sqInt
-genSmallIntegerComparisonorDoubleComparison(sqInt jumpOpcode, AbstractInstruction *(*jumpFPOpcodeGenerator)(void *))
+genSmallIntegerComparisonorDoubleComparisoninvert(sqInt jumpOpcode, AbstractInstruction *(*jumpFPOpcodeGenerator)(void *), sqInt invertComparison)
 {
     AbstractInstruction *anInstruction;
     AbstractInstruction *anInstruction1;
@@ -26113,9 +26087,18 @@
  /* begin ConvertR:Rd: */
  genoperandoperand(ConvertRRd, ReceiverResultReg, DPFPReg0);
  genGetDoubleValueOfinto(Arg0Reg, DPFPReg1);
- /* begin CmpRd:Rd: */
- genoperandoperand(CmpRdRd, DPFPReg1, DPFPReg0);
+ if (invertComparison) {
 
+ /* May need to invert for NaNs */
+
+ /* begin CmpRd:Rd: */
+ genoperandoperand(CmpRdRd, DPFPReg0, DPFPReg1);
+ }
+ else {
+ /* begin CmpRd:Rd: */
+ genoperandoperand(CmpRdRd, DPFPReg1, DPFPReg0);
+ }
+
  /* FP jumps are a little weird */
 
  jumpCond = jumpFPOpcodeGenerator(0);

Modified: branches/Cog/nsspursrc/vm/cointerp.c
===================================================================
--- branches/Cog/nsspursrc/vm/cointerp.c 2015-07-30 01:55:26 UTC (rev 3417)
+++ branches/Cog/nsspursrc/vm/cointerp.c 2015-08-10 17:49:36 UTC (rev 3418)
@@ -1,9 +1,9 @@
 /* Automatically generated by
- CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1426 uuid: 94ab92ba-c5c4-4953-8566-a4cd9c38df1f
+ CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1429 uuid: 446c2481-93c9-43bc-86ac-0743223bfa0c
    from
- CoInterpreter VMMaker.oscog-eem.1426 uuid: 94ab92ba-c5c4-4953-8566-a4cd9c38df1f
+ CoInterpreter VMMaker.oscog-eem.1429 uuid: 446c2481-93c9-43bc-86ac-0743223bfa0c
  */
-static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.1426 uuid: 94ab92ba-c5c4-4953-8566-a4cd9c38df1f " __DATE__ ;
+static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.1429 uuid: 446c2481-93c9-43bc-86ac-0743223bfa0c " __DATE__ ;
 char *__interpBuildInfo = __buildInfo;
 
 
@@ -513,6 +513,7 @@
 static sqInt interpretMethodFromMachineCode(void);
 extern sqInt isCogMethodReference(sqInt methodHeader);
 static sqInt isMachineCodeFrame(char *theFP) NoDbgRegParms;
+static sqInt lookupLexicalNoMNUfromrule(sqInt selector, sqInt mixin, sqInt rule) NoDbgRegParms;
 extern sqInt lookupMNUreceiver(sqInt selector, sqInt rcvr);
 extern sqInt lookupOrdinaryreceiver(sqInt selector, sqInt rcvr);
 static sqInt lookupOuterSendNoMNUdepth(sqInt methodReceiver, sqInt depth) NoDbgRegParms;
@@ -1207,7 +1208,7 @@
 static sqInt storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerArray, sqInt arrayOfRoots) NoDbgRegParms;
 extern sqInt storePointerUncheckedofObjectwithValue(sqInt fieldIndex, sqInt objOop, sqInt valuePointer);
 extern sqInt storePointerofObjectwithValue(sqInt fieldIndex, sqInt objOop, sqInt valuePointer);
-extern usqInt stringForCString(const char *aCString);
+extern sqInt stringForCString(const char *aCString);
 static sqInt sufficientSpaceAfterGC(sqInt numBytes) NoDbgRegParms;
 static sqInt swizzleObjStackAt(sqInt objStackRootIndex) NoDbgRegParms;
 extern void tenuringIncrementalGC(void);
@@ -1458,7 +1459,7 @@
 extern void printStackPageListInUse(void);
 extern void printStackPages(void);
 extern void printStackPagesInUse(void);
-static void printStackPage(StackPage *page) NoDbgRegParms;
+static void printStackPageuseCount(StackPage *page, sqInt n) NoDbgRegParms;
 extern void printStackReferencesTo(sqInt oop);
 static void printStringOf(sqInt oop) NoDbgRegParms;
 extern void print(char *s);
@@ -1610,9 +1611,9 @@
 _iss sqInt traceLogIndex;
 _iss sqInt classTableFirstPage;
 _iss char * stackLimit;
+_iss sqInt lkupClass;
 _iss unsigned char primTraceLogIndex;
 _iss sqInt * freeLists;
-_iss sqInt lkupClass;
 _iss sqInt rememberedSetSize;
 _iss sqInt tempOop;
 _iss sqInt * rememberedSet;
@@ -1644,11 +1645,11 @@
 _iss char * objStackInvalidBecause;
 _iss sqInt ephemeronList;
 _iss usqInt freeOldSpaceStart;
-_iss sqInt methodDictLinearSearchLimit;
 _iss sqInt tenureThreshold;
 _iss sqInt extraRootCount;
 _iss sqInt growHeadroom;
 _iss sqInt invalidObjStackPage;
+_iss sqInt methodDictLinearSearchLimit;
 _iss sqInt previousRememberedSetSize;
 _iss sqInt classNameIndex;
 _iss sqInt ephemeronQueue;
@@ -2410,7 +2411,7 @@
 /*560*/ -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, 0, 0, 0,-1,-1
  };
 char expensiveAsserts = 0;
-const char *interpreterVersion = "Newspeak Virtual Machine CoInterpreterPrimitives_VMMaker.oscog-eem.1426";
+const char *interpreterVersion = "Newspeak Virtual Machine CoInterpreterPrimitives_VMMaker.oscog-eem.1429";
 sqInt minBackwardJumpCountForCompile = MinBackwardJumpCountForCompile /* 40 */;
 volatile int sendTrace;
 
@@ -16569,53 +16570,33 @@
     CogMethod *cogMethod;
     CogMethod *cogMethod1;
     sqInt dictionary;
-    sqInt dictionary1;
     sqInt errSelIdx;
     sqInt found;
-    sqInt found1;
     sqInt hash;
-    sqInt hash1;
     sqInt index;
-    sqInt index1;
     usqInt length;
-    usqInt length1;
     usqInt mask;
-    usqInt mask1;
     sqInt methodArray;
-    sqInt methodArray1;
     sqInt methodHeader;
     sqInt methodHeader1;
     sqInt methodReceiverClassTag;
-    sqInt mixinApplication;
     CogMethod * newCogMethod;
     sqInt nextSelector;
-    sqInt nextSelector1;
     NSSendCache *nsSendCache;
     usqInt numSlots;
-    usqInt numSlots1;
     sqInt objOop;
     sqInt objOop1;
     sqInt objOop11;
-    sqInt objOop12;
     sqInt objOop2;
-    sqInt objOop21;
     sqInt objOop3;
-    sqInt objOop31;
     sqInt objOop4;
-    sqInt objOop41;
     sqInt objOop5;
-    sqInt objOop6;
-    sqInt objOop7;
-    sqInt receiverClass;
-    sqInt selector;
     sqInt tagBits;
     sqInt tagBits1;
     sqInt tagBits2;
-    sqInt tagBits3;
     sqInt top;
     sqInt top1;
     sqInt wrapAround;
-    sqInt wrapAround1;
 
  assertCStackWellAligned();
  assert(addressCouldBeOop(methodReceiver));
@@ -16694,241 +16675,112 @@
  /* begin numSlotsOf: */
  flag("endianness");
  assert((classIndexOf(dictionary)) > (isForwardedObjectClassIndexPun()));
- numSlots1 = byteAt(dictionary + 7);
- length1 = (numSlots1 == 0xFF
+ numSlots = byteAt(dictionary + 7);
+ length = (numSlots == 0xFF
  ? longAt(dictionary - BaseHeaderSize)
- : numSlots1);
+ : numSlots);
 
  /* Use linear search on small dictionaries; its cheaper.
    Also the limit can be set to force linear search of all dictionaries, which supports the
    booting of images that need rehashing (e.g. because a tracer has generated an image
    with different hashes but hasn't rehashed it yet.) */
 
- mask1 = (length1 - SelectorStart) - 1;
- if (mask1 <= GIV(methodDictLinearSearchLimit)) {
- index1 = 0;
- while (index1 <= mask1) {
- nextSelector1 = longAt((dictionary + BaseHeaderSize) + ((index1 + SelectorStart) << (shiftForWord())));
- if (((nextSelector1 & 3) == 0)
- && (((longAt(nextSelector1)) & 0x3FFFFF) == 8)) {
- nextSelector1 = fixFollowedFieldofObjectwithInitialValue(index1 + SelectorStart, dictionary, nextSelector1);
+ mask = (length - SelectorStart) - 1;
+ if (mask <= GIV(methodDictLinearSearchLimit)) {
+ index = 0;
+ while (index <= mask) {
+ nextSelector = longAt((dictionary + BaseHeaderSize) + ((index + SelectorStart) << (shiftForWord())));
+ if (((nextSelector & 3) == 0)
+ && (((longAt(nextSelector)) & 0x3FFFFF) == 8)) {
+ nextSelector = fixFollowedFieldofObjectwithInitialValue(index + SelectorStart, dictionary, nextSelector);
  }
- if (nextSelector1 == GIV(messageSelector)) {
+ if (nextSelector == GIV(messageSelector)) {
  /* begin followObjField:ofObject: */
- objOop7 = longAt((dictionary + BaseHeaderSize) + (MethodArrayIndex << (shiftForWord())));
- assert(isNonImmediate(objOop7));
- if (((longAt(objOop7)) & (0x3FFFFF - 8)) == 0) {
- objOop7 = fixFollowedFieldofObjectwithInitialValue(MethodArrayIndex, dictionary, objOop7);
+ objOop5 = longAt((dictionary + BaseHeaderSize) + (MethodArrayIndex << (shiftForWord())));
+ assert(isNonImmediate(objOop5));
+ if (((longAt(objOop5)) & (0x3FFFFF - 8)) == 0) {
+ objOop5 = fixFollowedFieldofObjectwithInitialValue(MethodArrayIndex, dictionary, objOop5);
  }
- methodArray1 = objOop7;
+ methodArray = objOop5;
  /* begin followField:ofObject: */
- objOop12 = longAt((methodArray1 + BaseHeaderSize) + (index1 << (shiftForWord())));
- if (((objOop12 & 3) == 0)
- && (((longAt(objOop12)) & 0x3FFFFF) == 8)) {
- objOop12 = fixFollowedFieldofObjectwithInitialValue(index1, methodArray1, objOop12);
+ objOop11 = longAt((methodArray + BaseHeaderSize) + (index << (shiftForWord())));
+ if (((objOop11 & 3) == 0)
+ && (((longAt(objOop11)) & 0x3FFFFF) == 8)) {
+ objOop11 = fixFollowedFieldofObjectwithInitialValue(index, methodArray, objOop11);
  }
- GIV(newMethod) = objOop12;
+ GIV(newMethod) = objOop11;
  found = 1;
- goto l4;
+ goto l2;
  }
- index1 += 1;
+ index += 1;
  }
  found = 0;
- goto l4;
+ goto l2;
  }
 
  /* It is assumed that there are some nils in this dictionary, and search will
    stop when one is encountered. However, if there are no nils, then wrapAround
    will be detected the second time the loop gets to the end of the table. */
 
- index1 = SelectorStart + (mask1 & (((GIV(messageSelector) & 3) != 0
+ index = SelectorStart + (mask & (((GIV(messageSelector) & 3) != 0
  ? ((GIV(messageSelector) & 1)
  ? (GIV(messageSelector) >> 1)
  : ((usqInt) (((usqInt)GIV(messageSelector)))) >> 2)
  : (/* begin hashBitsOf: */
- (objOop41 = GIV(messageSelector)),
- (hash1 = (long32At(objOop41 + 4)) & 0x3FFFFF),
- (hash1 == 0
- ? ((hash1 = (newObjectHash()) & 0x3FFFFF),
+ (objOop4 = GIV(messageSelector)),
+ (hash = (long32At(objOop4 + 4)) & 0x3FFFFF),
+ (hash == 0
+ ? ((hash = (newObjectHash()) & 0x3FFFFF),
  /* begin setHashBitsOf:to: */
  flag("endianness"),
- assert(((hash1 >= 0) && (hash1 <= (identityHashHalfWordMask())))),
- long32Atput(objOop41 + 4, ((((long32At(objOop41 + 4)) | 0x3FFFFF) - 0x3FFFFF)) + hash1))
+ assert(((hash >= 0) && (hash <= (identityHashHalfWordMask())))),
+ long32Atput(objOop4 + 4, ((((long32At(objOop4 + 4)) | 0x3FFFFF) - 0x3FFFFF)) + hash))
  : 0),
- hash1))));
- wrapAround1 = 0;
+ hash))));
+ wrapAround = 0;
  while (1) {
- nextSelector1 = longAt((dictionary + BaseHeaderSize) + (index1 << (shiftForWord())));
- if (nextSelector1 == GIV(nilObj)) {
+ nextSelector = longAt((dictionary + BaseHeaderSize) + (index << (shiftForWord())));
+ if (nextSelector == GIV(nilObj)) {
  found = 0;
- goto l4;
+ goto l2;
  }
- if (((nextSelector1 & 3) == 0)
- && (((longAt(nextSelector1)) & 0x3FFFFF) == 8)) {
- nextSelector1 = fixFollowedFieldofObjectwithInitialValue(index1 + SelectorStart, dictionary, nextSelector1);
+ if (((nextSelector & 3) == 0)
+ && (((longAt(nextSelector)) & 0x3FFFFF) == 8)) {
+ nextSelector = fixFollowedFieldofObjectwithInitialValue(index + SelectorStart, dictionary, nextSelector);
  }
- if (nextSelector1 == GIV(messageSelector)) {
+ if (nextSelector == GIV(messageSelector)) {
  /* begin followObjField:ofObject: */
- objOop21 = longAt((dictionary + BaseHeaderSize) + (MethodArrayIndex << (shiftForWord())));
- assert(isNonImmediate(objOop21));
- if (((longAt(objOop21)) & (0x3FFFFF - 8)) == 0) {
- objOop21 = fixFollowedFieldofObjectwithInitialValue(MethodArrayIndex, dictionary, objOop21);
+ objOop2 = longAt((dictionary + BaseHeaderSize) + (MethodArrayIndex << (shiftForWord())));
+ assert(isNonImmediate(objOop2));
+ if (((longAt(objOop2)) & (0x3FFFFF - 8)) == 0) {
+ objOop2 = fixFollowedFieldofObjectwithInitialValue(MethodArrayIndex, dictionary, objOop2);
  }
- methodArray1 = objOop21;
+ methodArray = objOop2;
  /* begin followField:ofObject: */
- objOop31 = longAt((methodArray1 + BaseHeaderSize) + ((index1 - SelectorStart) << (shiftForWord())));
- if (((objOop31 & 3) == 0)
- && (((longAt(objOop31)) & 0x3FFFFF) == 8)) {
- objOop31 = fixFollowedFieldofObjectwithInitialValue(index1 - SelectorStart, methodArray1, objOop31);
+ objOop3 = longAt((methodArray + BaseHeaderSize) + ((index - SelectorStart) << (shiftForWord())));
+ if (((objOop3 & 3) == 0)
+ && (((longAt(objOop3)) & 0x3FFFFF) == 8)) {
+ objOop3 = fixFollowedFieldofObjectwithInitialValue(index - SelectorStart, methodArray, objOop3);
  }
- GIV(newMethod) = objOop31;
+ GIV(newMethod) = objOop3;
  found = 1;
- goto l4;
+ goto l2;
  }
- index1 += 1;
- if (index1 == length1) {
- if (wrapAround1) {
+ index += 1;
+ if (index == length) {
+ if (wrapAround) {
  found = 0;
- goto l4;
+ goto l2;
  }
- wrapAround1 = 1;
- index1 = SelectorStart;
+ wrapAround = 1;
+ index = SelectorStart;
  }
  }
  found = 0;
- l4: /* end lookupMethodInDictionary: */;
+ l2: /* end lookupMethodInDictionary: */;
  if (found) {
  GIV(localAbsentReceiver) = candidateReceiver;
- /* begin lookupLexicalNoMNU:from:rule: */
- selector = GIV(messageSelector);
- if (((tagBits3 = GIV(localAbsentReceiver) & 3)) != 0) {
- receiverClass = longAt((GIV(classTableFirstPage) + BaseHeaderSize) + (tagBits3 << (shiftForWord())));
- }
- else {
- receiverClass = fetchClassOfNonImm(GIV(localAbsentReceiver));
- }
- mixinApplication = findApplicationOfTargetMixinstartingAtBehavior(candidateMixin, receiverClass);
- /* begin followObjField:ofObject: */
- objOop6 = longAt((mixinApplication + BaseHeaderSize) + (MethodDictionaryIndex << (shiftForWord())));
- assert(isNonImmediate(objOop6));
- if (((longAt(objOop6)) & (0x3FFFFF - 8)) == 0) {
- objOop6 = fixFollowedFieldofObjectwithInitialValue(MethodDictionaryIndex, mixinApplication, objOop6);
- }
- dictionary1 = objOop6;
- /* begin lookupMethodInDictionary: */
- /* begin numSlotsOf: */
- flag("endianness");
- assert((classIndexOf(dictionary1)) > (isForwardedObjectClassIndexPun()));
- numSlots = byteAt(dictionary1 + 7);
- length = (numSlots == 0xFF
- ? longAt(dictionary1 - BaseHeaderSize)
- : numSlots);
-
- /* Use linear search on small dictionaries; its cheaper.
-   Also the limit can be set to force linear search of all dictionaries, which supports the
-   booting of images that need rehashing (e.g. because a tracer has generated an image
-   with different hashes but hasn't rehashed it yet.) */
-
- mask = (length - SelectorStart) - 1;
- if (mask <= GIV(methodDictLinearSearchLimit)) {
- index = 0;
- while (index <= mask) {
- nextSelector = longAt((dictionary1 + BaseHeaderSize) + ((index + SelectorStart) << (shiftForWord())));
- if (((nextSelector & 3) == 0)
- && (((longAt(nextSelector)) & 0x3FFFFF) == 8)) {
- nextSelector = fixFollowedFieldofObjectwithInitialValue(index + SelectorStart, dictionary1, nextSelector);
- }
- if (nextSelector == GIV(messageSelector)) {
- /* begin followObjField:ofObject: */
- objOop5 = longAt((dictionary1 + BaseHeaderSize) + (MethodArrayIndex << (shiftForWord())));
- assert(isNonImmediate(objOop5));
- if (((longAt(objOop5)) & (0x3FFFFF - 8)) == 0) {
- objOop5 = fixFollowedFieldofObjectwithInitialValue(MethodArrayIndex, dictionary1, objOop5);
- }
- methodArray = objOop5;
- /* begin followField:ofObject: */
- objOop11 = longAt((methodArray + BaseHeaderSize) + (index << (shiftForWord())));
- if (((objOop11 & 3) == 0)
- && (((longAt(objOop11)) & 0x3FFFFF) == 8)) {
- objOop11 = fixFollowedFieldofObjectwithInitialValue(index, methodArray, objOop11);
- }
- GIV(newMethod) = objOop11;
- found1 = 1;
- goto l2;
- }
- index += 1;
- }
- found1 = 0;
- goto l2;
- }
-
- /* It is assumed that there are some nils in this dictionary, and search will
-   stop when one is encountered. However, if there are no nils, then wrapAround
-   will be detected the second time the loop gets to the end of the table. */
-
- index = SelectorStart + (mask & (((GIV(messageSelector) & 3) != 0
- ? ((GIV(messageSelector) & 1)
- ? (GIV(messageSelector) >> 1)
- : ((usqInt) (((usqInt)GIV(messageSelector)))) >> 2)
- : (/* begin hashBitsOf: */
- (objOop4 = GIV(messageSelector)),
- (hash = (long32At(objOop4 + 4)) & 0x3FFFFF),
- (hash == 0
- ? ((hash = (newObjectHash()) & 0x3FFFFF),
- /* begin setHashBitsOf:to: */
- flag("endianness"),
- assert(((hash >= 0) && (hash <= (identityHashHalfWordMask())))),
- long32Atput(objOop4 + 4, ((((long32At(objOop4 + 4)) | 0x3FFFFF) - 0x3FFFFF)) + hash))
- : 0),
- hash))));
- wrapAround = 0;
- while (1) {
- nextSelector = longAt((dictionary1 + BaseHeaderSize) + (index << (shiftForWord())));
- if (nextSelector == GIV(nilObj)) {
- found1 = 0;
- goto l2;
- }
- if (((nextSelector & 3) == 0)
- && (((longAt(nextSelector)) & 0x3FFFFF) == 8)) {
- nextSelector = fixFollowedFieldofObjectwithInitialValue(index + SelectorStart, dictionary1, nextSelector);
- }
- if (nextSelector == GIV(messageSelector)) {
- /* begin followObjField:ofObject: */
- objOop2 = longAt((dictionary1 + BaseHeaderSize) + (MethodArrayIndex << (shiftForWord())));
- assert(isNonImmediate(objOop2));
- if (((longAt(objOop2)) & (0x3FFFFF - 8)) == 0) {
- objOop2 = fixFollowedFieldofObjectwithInitialValue(MethodArrayIndex, dictionary1, objOop2);
- }
- methodArray = objOop2;
- /* begin followField:ofObject: */
- objOop3 = longAt((methodArray + BaseHeaderSize) + ((index - SelectorStart) << (shiftForWord())));
- if (((objOop3 & 3) == 0)
- && (((longAt(objOop3)) & 0x3FFFFF) == 8)) {
- objOop3 = fixFollowedFieldofObjectwithInitialValue(index - SelectorStart, methodArray, objOop3);
- }
- GIV(newMethod) = objOop3;
- found1 = 1;
- goto l2;
- }
- index += 1;
- if (index == length) {
- if (wrapAround) {
- found1 = 0;
- goto l2;
- }
- wrapAround = 1;
- index = SelectorStart;
- }
- }
- found1 = 0;
- l2: /* end lookupMethodInDictionary: */;
- if (found1
- && ((accessModifierOfMethod(GIV(newMethod))) == AccessModifierPrivate)) {
- errSelIdx = 0;
- goto l3;
- }
- errSelIdx = lookupProtectedNoMNUstartingAtrule(selector, receiverClass, LookupRuleImplicit);
- l3: /* end lookupLexicalNoMNU:from:rule: */;
+ errSelIdx = lookupLexicalNoMNUfromrule(GIV(messageSelector), candidateMixin, LookupRuleImplicit);
  goto l1;
  }
  /* begin followObjField:ofObject: */
@@ -20161,6 +20013,168 @@
 }
 
 
+/* A shared part of the lookup for implicit receiver sends that found a
+ lexically visible
+ method, and self and outer sends.
+ */
+
+ /* CoInterpreter>>#lookupLexicalNoMNU:from:rule: */
+static sqInt
+lookupLexicalNoMNUfromrule(sqInt selector, sqInt mixin, sqInt rule)
+{   DECL_MAYBE_SQ_GLOBAL_STRUCT
+    sqInt dictionary;
+    sqInt found;
+    sqInt hash;
+    sqInt index;
+    usqInt length;
+    usqInt mask;
+    sqInt methodArray;
+    sqInt mixinApplication;
+    sqInt nextSelector;
+    usqInt numSlots;
+    sqInt objOop;
+    sqInt objOop1;
+    sqInt objOop2;
+    sqInt objOop3;
+    sqInt objOop4;
+    sqInt objOop5;
+    sqInt receiverClass;
+    sqInt tagBits;
+    sqInt wrapAround;
+
+ if (((tagBits = GIV(localAbsentReceiver) & 3)) != 0) {
+ receiverClass = longAt((GIV(classTableFirstPage) + BaseHeaderSize) + (tagBits << (shiftForWord())));
+ }
+ else {
+ receiverClass = fetchClassOfNonImm(GIV(localAbsentReceiver));
+ }
+
+ /* For use by MNU */
+
+ GIV(lkupClass) = receiverClass;
+ mixinApplication = findApplicationOfTargetMixinstartingAtBehavior(mixin, receiverClass);
+ /* begin followObjField:ofObject: */
+ objOop = longAt((mixinApplication + BaseHeaderSize) + (MethodDictionaryIndex << (shiftForWord())));
+ assert(isNonImmediate(objOop));
+ if (((longAt(objOop)) & (0x3FFFFF - 8)) == 0) {
+ objOop = fixFollowedFieldofObjectwithInitialValue(MethodDictionaryIndex, mixinApplication, objOop);
+ }
+ dictionary = objOop;
+ /* begin lookupMethodInDictionary: */
+ /* begin numSlotsOf: */
+ flag("endianness");
+ assert((classIndexOf(dictionary)) > (isForwardedObjectClassIndexPun()));
+ numSlots = byteAt(dictionary + 7);
+ length = (numSlots == 0xFF
+ ? longAt(dictionary - BaseHeaderSize)
+ : numSlots);
+
+ /* Use linear search on small dictionaries; its cheaper.
+   Also the limit can be set to force linear search of all dictionaries, which supports the
+   booting of images that need rehashing (e.g. because a tracer has generated an image
+   with different hashes but hasn't rehashed it yet.) */
+
+ mask = (length - SelectorStart) - 1;
+ if (mask <= GIV(methodDictLinearSearchLimit)) {
+ index = 0;
+ while (index <= mask) {
+ nextSelector = longAt((dictionary + BaseHeaderSize) + ((index + SelectorStart) << (shiftForWord())));
+ if (((nextSelector & 3) == 0)
+ && (((longAt(nextSelector)) & 0x3FFFFF) == 8)) {
+ nextSelector = fixFollowedFieldofObjectwithInitialValue(index + SelectorStart, dictionary, nextSelector);
+ }
+ if (nextSelector == GIV(messageSelector)) {
+ /* begin followObjField:ofObject: */
+ objOop5 = longAt((dictionary + BaseHeaderSize) + (MethodArrayIndex << (shiftForWord())));
+ assert(isNonImmediate(objOop5));
+ if (((longAt(objOop5)) & (0x3FFFFF - 8)) == 0) {
+ objOop5 = fixFollowedFieldofObjectwithInitialValue(MethodArrayIndex, dictionary, objOop5);
+ }
+ methodArray = objOop5;
+ /* begin followField:ofObject: */
+ objOop1 = longAt((methodArray + BaseHeaderSize) + (index << (shiftForWord())));
+ if (((objOop1 & 3) == 0)
+ && (((longAt(objOop1)) & 0x3FFFFF) == 8)) {
+ objOop1 = fixFollowedFieldofObjectwithInitialValue(index, methodArray, objOop1);
+ }
+ GIV(newMethod) = objOop1;
+ found = 1;
+ goto l1;
+ }
+ index += 1;
+ }
+ found = 0;
+ goto l1;
+ }
+
+ /* It is assumed that there are some nils in this dictionary, and search will
+   stop when one is encountered. However, if there are no nils, then wrapAround
+   will be detected the second time the loop gets to the end of the table. */
+
+ index = SelectorStart + (mask & (((GIV(messageSelector) & 3) != 0
+ ? ((GIV(messageSelector) & 1)
+ ? (GIV(messageSelector) >> 1)
+ : ((usqInt) (((usqInt)GIV(messageSelector)))) >> 2)
+ : (/* begin hashBitsOf: */
+ (objOop4 = GIV(messageSelector)),
+ (hash = (long32At(objOop4 + 4)) & 0x3FFFFF),
+ (hash == 0
+ ? ((hash = (newObjectHash()) & 0x3FFFFF),
+ /* begin setHashBitsOf:to: */
+ flag("endianness"),
+ assert(((hash >= 0) && (hash <= (identityHashHalfWordMask())))),
+ long32Atput(objOop4 + 4, ((((long32At(objOop4 + 4)) | 0x3FFFFF) - 0x3FFFFF)) + hash))
+ : 0),
+ hash))));
+ wrapAround = 0;
+ while (1) {
+ nextSelector = longAt((dictionary + BaseHeaderSize) + (index << (shiftForWord())));
+ if (nextSelector == GIV(nilObj)) {
+ found = 0;
+ goto l1;
+ }
+ if (((nextSelector & 3) == 0)
+ && (((longAt(nextSelector)) & 0x3FFFFF) == 8)) {
+ nextSelector = fixFollowedFieldofObjectwithInitialValue(index + SelectorStart, dictionary, nextSelector);
+ }
+ if (nextSelector == GIV(messageSelector)) {
+ /* begin followObjField:ofObject: */
+ objOop2 = longAt((dictionary + BaseHeaderSize) + (MethodArrayIndex << (shiftForWord())));
+ assert(isNonImmediate(objOop2));
+ if (((longAt(objOop2)) & (0x3FFFFF - 8)) == 0) {
+ objOop2 = fixFollowedFieldofObjectwithInitialValue(MethodArrayIndex, dictionary, objOop2);
+ }
+ methodArray = objOop2;
+ /* begin followField:ofObject: */
+ objOop3 = longAt((methodArray + BaseHeaderSize) + ((index - SelectorStart) << (shiftForWord())));
+ if (((objOop3 & 3) == 0)
+ && (((longAt(objOop3)) & 0x3FFFFF) == 8)) {
+ objOop3 = fixFollowedFieldofObjectwithInitialValue(index - SelectorStart, methodArray, objOop3);
+ }
+ GIV(newMethod) = objOop3;
+ found = 1;
+ goto l1;
+ }
+ index += 1;
+ if (index == length) {
+ if (wrapAround) {
+ found = 0;
+ goto l1;
+ }
+ wrapAround = 1;
+ index = SelectorStart;
+ }
+ }
+ found = 0;
+l1: /* end lookupMethodInDictionary: */;
+ if (found
+ && ((accessModifierOfMethod(GIV(newMethod))) == AccessModifierPrivate)) {
+ return 0;
+ }
+ return lookupProtectedNoMNUstartingAtrule(selector, receiverClass, rule);
+}
+
+
 /* Lookup selector in rcvr, without doing MNU processing, and answer either a
  method or an error code if the message was not understood. Used to
  populate closed PICs. */
@@ -20296,30 +20310,10 @@
 lookupOuterSendNoMNUdepth(sqInt methodReceiver, sqInt depth)
 {   DECL_MAYBE_SQ_GLOBAL_STRUCT
     sqInt count;
-    sqInt dictionary;
-    sqInt found;
-    sqInt hash;
-    sqInt index;
-    usqInt length;
-    usqInt mask;
-    sqInt methodArray;
     sqInt mixinApplication;
-    sqInt mixinApplication1;
-    sqInt nextSelector;
-    usqInt numSlots;
     sqInt objOop;
-    sqInt objOop1;
-    sqInt objOop11;
-    sqInt objOop2;
-    sqInt objOop3;
-    sqInt objOop4;
-    sqInt objOop5;
-    sqInt receiverClass;
-    sqInt selector;
     sqInt tagBits;
-    sqInt tagBits1;
     sqInt targetMixin;
-    sqInt wrapAround;
 
  GIV(localAbsentReceiver) = methodReceiver;
  GIV(localAbsentReceiverOrZero) = 0;
@@ -20339,134 +20333,7 @@
  }
  targetMixin = objOop;
  }
- /* begin lookupLexicalNoMNU:from:rule: */
- selector = GIV(messageSelector);
- if (((tagBits1 = GIV(localAbsentReceiver) & 3)) != 0) {
- receiverClass = longAt((GIV(classTableFirstPage) + BaseHeaderSize) + (tagBits1 << (shiftForWord())));
- }
- else {
- receiverClass = fetchClassOfNonImm(GIV(localAbsentReceiver));
- }
- mixinApplication1 = findApplicationOfTargetMixinstartingAtBehavior(targetMixin, receiverClass);
- /* begin followObjField:ofObject: */
- objOop1 = longAt((mixinApplication1 + BaseHeaderSize) + (MethodDictionaryIndex << (shiftForWord())));
- assert(isNonImmediate(objOop1));
- if (((longAt(objOop1)) & (0x3FFFFF - 8)) == 0) {
- objOop1 = fixFollowedFieldofObjectwithInitialValue(MethodDictionaryIndex, mixinApplication1, objOop1);
- }
- dictionary = objOop1;
- /* begin lookupMethodInDictionary: */
- /* begin numSlotsOf: */
- flag("endianness");
- assert((classIndexOf(dictionary)) > (isForwardedObjectClassIndexPun()));
- numSlots = byteAt(dictionary + 7);
- length = (numSlots == 0xFF
- ? longAt(dictionary - BaseHeaderSize)
- : numSlots);
-
- /* Use linear search on small dictionaries; its cheaper.
-   Also the limit can be set to force linear search of all dictionaries, which supports the
-   booting of images that need rehashing (e.g. because a tracer has generated an image
-   with different hashes but hasn't rehashed it yet.) */
-
- mask = (length - SelectorStart) - 1;
- if (mask <= GIV(methodDictLinearSearchLimit)) {
- index = 0;
- while (index <= mask) {
- nextSelector = longAt((dictionary + BaseHeaderSize) + ((index + SelectorStart) << (shiftForWord())));
- if (((nextSelector & 3) == 0)
- && (((longAt(nextSelector)) & 0x3FFFFF) == 8)) {
- nextSelector = fixFollowedFieldofObjectwithInitialValue(index + SelectorStart, dictionary, nextSelector);
- }
- if (nextSelector == GIV(messageSelector)) {
- /* begin followObjField:ofObject: */
- objOop5 = longAt((dictionary + BaseHeaderSize) + (MethodArrayIndex << (shiftForWord())));
- assert(isNonImmediate(objOop5));
- if (((longAt(objOop5)) & (0x3FFFFF - 8)) == 0) {
- objOop5 = fixFollowedFieldofObjectwithInitialValue(MethodArrayIndex, dictionary, objOop5);
- }
- methodArray = objOop5;
- /* begin followField:ofObject: */
- objOop11 = longAt((methodArray + BaseHeaderSize) + (index << (shiftForWord())));
- if (((objOop11 & 3) == 0)
- && (((longAt(objOop11)) & 0x3FFFFF) == 8)) {
- objOop11 = fixFollowedFieldofObjectwithInitialValue(index, methodArray, objOop11);
- }
- GIV(newMethod) = objOop11;
- found = 1;
- goto l1;
- }
- index += 1;
- }
- found = 0;
- goto l1;
- }
-
- /* It is assumed that there are some nils in this dictionary, and search will
-   stop when one is encountered. However, if there are no nils, then wrapAround
-   will be detected the second time the loop gets to the end of the table. */
-
- index = SelectorStart + (mask & (((GIV(messageSelector) & 3) != 0
- ? ((GIV(messageSelector) & 1)
- ? (GIV(messageSelector) >> 1)
- : ((usqInt) (((usqInt)GIV(messageSelector)))) >> 2)
- : (/* begin hashBitsOf: */
- (objOop4 = GIV(messageSelector)),
- (hash = (long32At(objOop4 + 4)) & 0x3FFFFF),
- (hash == 0
- ? ((hash = (newObjectHash()) & 0x3FFFFF),
- /* begin setHashBitsOf:to: */
- flag("endianness"),
- assert(((hash >= 0) && (hash <= (identityHashHalfWordMask())))),
- long32Atput(objOop4 + 4, ((((long32At(objOop4 + 4)) | 0x3FFFFF) - 0x3FFFFF)) + hash))
- : 0),
- hash))));
- wrapAround = 0;
- while (1) {
- nextSelector = longAt((dictionary + BaseHeaderSize) + (index << (shiftForWord())));
- if (nextSelector == GIV(nilObj)) {
- found = 0;
- goto l1;
- }
- if (((nextSelector & 3) == 0)
- && (((longAt(nextSelector)) & 0x3FFFFF) == 8)) {
- nextSelector = fixFollowedFieldofObjectwithInitialValue(index + SelectorStart, dictionary, nextSelector);
- }
- if (nextSelector == GIV(messageSelector)) {
- /* begin followObjField:ofObject: */
- objOop2 = longAt((dictionary + BaseHeaderSize) + (MethodArrayIndex << (shiftForWord())));
- assert(isNonImmediate(objOop2));
- if (((longAt(objOop2)) & (0x3FFFFF - 8)) == 0) {
- objOop2 = fixFollowedFieldofObjectwithInitialValue(MethodArrayIndex, dictionary, objOop2);
- }

@@ Diff output truncated at 50000 characters. @@