[Vm-dev] [commit][3341] CogVM source as per VMMaker.oscog-eem.1301

commits at squeakvm.org commits at squeakvm.org
Thu May 14 22:34:55 UTC 2015


Revision: 3341
Author:   eliot
Date:     2015-05-14 15:34:53 -0700 (Thu, 14 May 2015)
Log Message:
-----------
CogVM source as per VMMaker.oscog-eem.1301

Cogit:
Since the method zone does not scavenge PICs, the MNU method in an MNU PIC entry
cannot be young.  If it is, void the cache (load 0 instead of the method).

Modified Paths:
--------------
    branches/Cog/nsspursrc/vm/cogit.h
    branches/Cog/nsspursrc/vm/cogitARMv5.c
    branches/Cog/nsspursrc/vm/cogitIA32.c
    branches/Cog/spursistasrc/vm/cogit.h
    branches/Cog/spursrc/vm/cogit.h
    branches/Cog/spursrc/vm/cogitARMv5.c
    branches/Cog/spursrc/vm/cogitIA32.c
    branches/Cog/src/vm/cogit.h
    branches/Cog/src/vm/cogitARMv5.c
    branches/Cog/src/vm/cogitIA32.c

Property Changed:
----------------
    branches/Cog/platforms/Cross/vm/sqSCCSVersion.h

Modified: branches/Cog/nsspursrc/vm/cogit.h
===================================================================
--- branches/Cog/nsspursrc/vm/cogit.h	2015-05-14 00:52:09 UTC (rev 3340)
+++ branches/Cog/nsspursrc/vm/cogit.h	2015-05-14 22:34:53 UTC (rev 3341)
@@ -1,5 +1,5 @@
 /* Automatically generated by
-	CCodeGenerator VMMaker.oscog-eem.1299 uuid: cbe293c4-e086-4dbf-bb1c-055f8c47b3ef
+	CCodeGenerator VMMaker.oscog-eem.1301 uuid: ce7e12a9-6ef4-412e-942d-8b9d3b3b2980
  */
 
 

Modified: branches/Cog/nsspursrc/vm/cogitARMv5.c
===================================================================
--- branches/Cog/nsspursrc/vm/cogitARMv5.c	2015-05-14 00:52:09 UTC (rev 3340)
+++ branches/Cog/nsspursrc/vm/cogitARMv5.c	2015-05-14 22:34:53 UTC (rev 3341)
@@ -1,9 +1,9 @@
 /* Automatically generated by
-	CCodeGenerator VMMaker.oscog-eem.1299 uuid: cbe293c4-e086-4dbf-bb1c-055f8c47b3ef
+	CCodeGenerator VMMaker.oscog-eem.1301 uuid: ce7e12a9-6ef4-412e-942d-8b9d3b3b2980
    from
-	StackToRegisterMappingCogit VMMaker.oscog-eem.1299 uuid: cbe293c4-e086-4dbf-bb1c-055f8c47b3ef
+	StackToRegisterMappingCogit VMMaker.oscog-eem.1301 uuid: ce7e12a9-6ef4-412e-942d-8b9d3b3b2980
  */
-static char __buildInfo[] = "StackToRegisterMappingCogit VMMaker.oscog-eem.1299 uuid: cbe293c4-e086-4dbf-bb1c-055f8c47b3ef " __DATE__ ;
+static char __buildInfo[] = "StackToRegisterMappingCogit VMMaker.oscog-eem.1301 uuid: ce7e12a9-6ef4-412e-942d-8b9d3b3b2980 " __DATE__ ;
 char *__cogitBuildInfo = __buildInfo;
 
 
@@ -9343,9 +9343,13 @@
 		targetEntry = ((void *)((((sqInt)(cogMethodOf(case1Method)))) + cmNoCheckEntryOffset));
 	}
 	else {
-		assert((case1Method == null)
-		 || (!(isYoungObject(case1Method))));
-		operand = case1Method;
+
+		/* We do not scavenge PICs, hence we cannot cache the MNU method if it is in new space. */
+
+		operand = ((case1Method == null)
+		 || (isYoungObject(case1Method))
+			? 0
+			: case1Method);
 		targetEntry = (case1Method == null
 			? picMNUAbort
 			: picInterpretAbort);
@@ -9433,11 +9437,19 @@
 {
     AbstractInstruction *jumpNext;
     sqInt jumpTarget;
+    sqInt operand;
 
 	compilePICAbort(numArgs);
+
+	/* We do not scavenge PICs, hence we cannot cache the MNU method if it is in new space. */
+
 	jumpNext = compileCPICEntry();
+	operand = ((methodOperand == null)
+	 || (isYoungObject(methodOperand))
+		? 0
+		: methodOperand);
 	/* begin MoveCw:R: */
-	genoperandoperand(MoveCwR, methodOperand, SendNumArgsReg);
+	genoperandoperand(MoveCwR, operand, SendNumArgsReg);
 	/* begin JumpLong: */
 	genoperand(JumpLong, ((sqInt)picMNUAbort));
 	jmpTarget(jumpNext, gMoveCwR(((sqInt)cPIC), ClassReg));
@@ -10564,6 +10576,10 @@
     sqInt oldMethodZoneBase;
     sqInt oldTrampolineTableIndex;
 
+
+	/* For the benefit of the following assert, assume the minimum at first. */
+
+	cFramePointerInUse = 0;
 	assertCStackWellAligned();
 	oldMethodZoneBase = methodZoneBase;
 	oldTrampolineTableIndex = trampolineTableIndex;
@@ -10574,6 +10590,7 @@
 		trampolineTableIndex = oldTrampolineTableIndex;
 		generateCaptureCStackPointers(0);
 	}
+	assertCStackWellAligned();
 }
 
 

Modified: branches/Cog/nsspursrc/vm/cogitIA32.c
===================================================================
--- branches/Cog/nsspursrc/vm/cogitIA32.c	2015-05-14 00:52:09 UTC (rev 3340)
+++ branches/Cog/nsspursrc/vm/cogitIA32.c	2015-05-14 22:34:53 UTC (rev 3341)
@@ -1,9 +1,9 @@
 /* Automatically generated by
-	CCodeGenerator VMMaker.oscog-eem.1299 uuid: cbe293c4-e086-4dbf-bb1c-055f8c47b3ef
+	CCodeGenerator VMMaker.oscog-eem.1301 uuid: ce7e12a9-6ef4-412e-942d-8b9d3b3b2980
    from
-	StackToRegisterMappingCogit VMMaker.oscog-eem.1299 uuid: cbe293c4-e086-4dbf-bb1c-055f8c47b3ef
+	StackToRegisterMappingCogit VMMaker.oscog-eem.1301 uuid: ce7e12a9-6ef4-412e-942d-8b9d3b3b2980
  */
-static char __buildInfo[] = "StackToRegisterMappingCogit VMMaker.oscog-eem.1299 uuid: cbe293c4-e086-4dbf-bb1c-055f8c47b3ef " __DATE__ ;
+static char __buildInfo[] = "StackToRegisterMappingCogit VMMaker.oscog-eem.1301 uuid: ce7e12a9-6ef4-412e-942d-8b9d3b3b2980 " __DATE__ ;
 char *__cogitBuildInfo = __buildInfo;
 
 
@@ -8124,9 +8124,13 @@
 		targetEntry = ((void *)((((sqInt)(cogMethodOf(case1Method)))) + cmNoCheckEntryOffset));
 	}
 	else {
-		assert((case1Method == null)
-		 || (!(isYoungObject(case1Method))));
-		operand = case1Method;
+
+		/* We do not scavenge PICs, hence we cannot cache the MNU method if it is in new space. */
+
+		operand = ((case1Method == null)
+		 || (isYoungObject(case1Method))
+			? 0
+			: case1Method);
 		targetEntry = (case1Method == null
 			? picMNUAbort
 			: picInterpretAbort);
@@ -8207,11 +8211,19 @@
 {
     AbstractInstruction *jumpNext;
     sqInt jumpTarget;
+    sqInt operand;
 
 	compilePICAbort(numArgs);
+
+	/* We do not scavenge PICs, hence we cannot cache the MNU method if it is in new space. */
+
 	jumpNext = compileCPICEntry();
+	operand = ((methodOperand == null)
+	 || (isYoungObject(methodOperand))
+		? 0
+		: methodOperand);
 	/* begin MoveCw:R: */
-	genoperandoperand(MoveCwR, methodOperand, SendNumArgsReg);
+	genoperandoperand(MoveCwR, operand, SendNumArgsReg);
 	/* begin JumpLong: */
 	genoperand(JumpLong, ((sqInt)picMNUAbort));
 	jmpTarget(jumpNext, gMoveCwR(((sqInt)cPIC), ClassReg));
@@ -9321,6 +9333,10 @@
     sqInt oldMethodZoneBase;
     sqInt oldTrampolineTableIndex;
 
+
+	/* For the benefit of the following assert, assume the minimum at first. */
+
+	cFramePointerInUse = 0;
 	assertCStackWellAligned();
 	oldMethodZoneBase = methodZoneBase;
 	oldTrampolineTableIndex = trampolineTableIndex;
@@ -9331,6 +9347,7 @@
 		trampolineTableIndex = oldTrampolineTableIndex;
 		generateCaptureCStackPointers(0);
 	}
+	assertCStackWellAligned();
 }
 
 


Property changes on: branches/Cog/platforms/Cross/vm/sqSCCSVersion.h
___________________________________________________________________
Modified: checkindate
   - Mon May 11 18:24:24 PDT 2015
   + Thu May 14 15:34:28 PDT 2015

Modified: branches/Cog/spursistasrc/vm/cogit.h
===================================================================
--- branches/Cog/spursistasrc/vm/cogit.h	2015-05-14 00:52:09 UTC (rev 3340)
+++ branches/Cog/spursistasrc/vm/cogit.h	2015-05-14 22:34:53 UTC (rev 3341)
@@ -1,5 +1,5 @@
 /* Automatically generated by
-	CCodeGenerator VMMaker.oscog-eem.1299 uuid: cbe293c4-e086-4dbf-bb1c-055f8c47b3ef
+	CCodeGenerator VMMaker.oscog-eem.1301 uuid: ce7e12a9-6ef4-412e-942d-8b9d3b3b2980
  */
 
 

Modified: branches/Cog/spursrc/vm/cogit.h
===================================================================
--- branches/Cog/spursrc/vm/cogit.h	2015-05-14 00:52:09 UTC (rev 3340)
+++ branches/Cog/spursrc/vm/cogit.h	2015-05-14 22:34:53 UTC (rev 3341)
@@ -1,5 +1,5 @@
 /* Automatically generated by
-	CCodeGenerator VMMaker.oscog-eem.1299 uuid: cbe293c4-e086-4dbf-bb1c-055f8c47b3ef
+	CCodeGenerator VMMaker.oscog-eem.1301 uuid: ce7e12a9-6ef4-412e-942d-8b9d3b3b2980
  */
 
 

Modified: branches/Cog/spursrc/vm/cogitARMv5.c
===================================================================
--- branches/Cog/spursrc/vm/cogitARMv5.c	2015-05-14 00:52:09 UTC (rev 3340)
+++ branches/Cog/spursrc/vm/cogitARMv5.c	2015-05-14 22:34:53 UTC (rev 3341)
@@ -1,9 +1,9 @@
 /* Automatically generated by
-	CCodeGenerator VMMaker.oscog-eem.1299 uuid: cbe293c4-e086-4dbf-bb1c-055f8c47b3ef
+	CCodeGenerator VMMaker.oscog-eem.1301 uuid: ce7e12a9-6ef4-412e-942d-8b9d3b3b2980
    from
-	StackToRegisterMappingCogit VMMaker.oscog-eem.1299 uuid: cbe293c4-e086-4dbf-bb1c-055f8c47b3ef
+	StackToRegisterMappingCogit VMMaker.oscog-eem.1301 uuid: ce7e12a9-6ef4-412e-942d-8b9d3b3b2980
  */
-static char __buildInfo[] = "StackToRegisterMappingCogit VMMaker.oscog-eem.1299 uuid: cbe293c4-e086-4dbf-bb1c-055f8c47b3ef " __DATE__ ;
+static char __buildInfo[] = "StackToRegisterMappingCogit VMMaker.oscog-eem.1301 uuid: ce7e12a9-6ef4-412e-942d-8b9d3b3b2980 " __DATE__ ;
 char *__cogitBuildInfo = __buildInfo;
 
 
@@ -8881,9 +8881,13 @@
 		targetEntry = ((void *)((((sqInt)(cogMethodOf(case1Method)))) + cmNoCheckEntryOffset));
 	}
 	else {
-		assert((case1Method == null)
-		 || (!(isYoungObject(case1Method))));
-		operand = case1Method;
+
+		/* We do not scavenge PICs, hence we cannot cache the MNU method if it is in new space. */
+
+		operand = ((case1Method == null)
+		 || (isYoungObject(case1Method))
+			? 0
+			: case1Method);
 		targetEntry = (case1Method == null
 			? picMNUAbort
 			: picInterpretAbort);
@@ -8971,11 +8975,19 @@
 {
     AbstractInstruction *jumpNext;
     sqInt jumpTarget;
+    sqInt operand;
 
 	compilePICAbort(numArgs);
+
+	/* We do not scavenge PICs, hence we cannot cache the MNU method if it is in new space. */
+
 	jumpNext = compileCPICEntry();
+	operand = ((methodOperand == null)
+	 || (isYoungObject(methodOperand))
+		? 0
+		: methodOperand);
 	/* begin MoveCw:R: */
-	genoperandoperand(MoveCwR, methodOperand, SendNumArgsReg);
+	genoperandoperand(MoveCwR, operand, SendNumArgsReg);
 	/* begin JumpLong: */
 	genoperand(JumpLong, ((sqInt)picMNUAbort));
 	jmpTarget(jumpNext, gMoveCwR(((sqInt)cPIC), ClassReg));
@@ -9144,7 +9156,7 @@
 {
     sqInt classIndex;
     sqInt i;
-    sqInt pc;
+    usqInt pc;
 
 	pc = (((((usqInt)cPIC)) + firstCPICCaseOffset) + cPICCaseSize) - (jumpLongConditionalByteSize(backEnd));
 	for (i = 2; i <= ((cPIC->cPICNumCases)); i += 1) {
@@ -10065,6 +10077,10 @@
     sqInt oldMethodZoneBase;
     sqInt oldTrampolineTableIndex;
 
+
+	/* For the benefit of the following assert, assume the minimum at first. */
+
+	cFramePointerInUse = 0;
 	assertCStackWellAligned();
 	oldMethodZoneBase = methodZoneBase;
 	oldTrampolineTableIndex = trampolineTableIndex;
@@ -10075,6 +10091,7 @@
 		trampolineTableIndex = oldTrampolineTableIndex;
 		generateCaptureCStackPointers(0);
 	}
+	assertCStackWellAligned();
 }
 
 

Modified: branches/Cog/spursrc/vm/cogitIA32.c
===================================================================
--- branches/Cog/spursrc/vm/cogitIA32.c	2015-05-14 00:52:09 UTC (rev 3340)
+++ branches/Cog/spursrc/vm/cogitIA32.c	2015-05-14 22:34:53 UTC (rev 3341)
@@ -1,9 +1,9 @@
 /* Automatically generated by
-	CCodeGenerator VMMaker.oscog-eem.1299 uuid: cbe293c4-e086-4dbf-bb1c-055f8c47b3ef
+	CCodeGenerator VMMaker.oscog-eem.1301 uuid: ce7e12a9-6ef4-412e-942d-8b9d3b3b2980
    from
-	StackToRegisterMappingCogit VMMaker.oscog-eem.1299 uuid: cbe293c4-e086-4dbf-bb1c-055f8c47b3ef
+	StackToRegisterMappingCogit VMMaker.oscog-eem.1301 uuid: ce7e12a9-6ef4-412e-942d-8b9d3b3b2980
  */
-static char __buildInfo[] = "StackToRegisterMappingCogit VMMaker.oscog-eem.1299 uuid: cbe293c4-e086-4dbf-bb1c-055f8c47b3ef " __DATE__ ;
+static char __buildInfo[] = "StackToRegisterMappingCogit VMMaker.oscog-eem.1301 uuid: ce7e12a9-6ef4-412e-942d-8b9d3b3b2980 " __DATE__ ;
 char *__cogitBuildInfo = __buildInfo;
 
 
@@ -7651,9 +7651,13 @@
 		targetEntry = ((void *)((((sqInt)(cogMethodOf(case1Method)))) + cmNoCheckEntryOffset));
 	}
 	else {
-		assert((case1Method == null)
-		 || (!(isYoungObject(case1Method))));
-		operand = case1Method;
+
+		/* We do not scavenge PICs, hence we cannot cache the MNU method if it is in new space. */
+
+		operand = ((case1Method == null)
+		 || (isYoungObject(case1Method))
+			? 0
+			: case1Method);
 		targetEntry = (case1Method == null
 			? picMNUAbort
 			: picInterpretAbort);
@@ -7734,11 +7738,19 @@
 {
     AbstractInstruction *jumpNext;
     sqInt jumpTarget;
+    sqInt operand;
 
 	compilePICAbort(numArgs);
+
+	/* We do not scavenge PICs, hence we cannot cache the MNU method if it is in new space. */
+
 	jumpNext = compileCPICEntry();
+	operand = ((methodOperand == null)
+	 || (isYoungObject(methodOperand))
+		? 0
+		: methodOperand);
 	/* begin MoveCw:R: */
-	genoperandoperand(MoveCwR, methodOperand, SendNumArgsReg);
+	genoperandoperand(MoveCwR, operand, SendNumArgsReg);
 	/* begin JumpLong: */
 	genoperand(JumpLong, ((sqInt)picMNUAbort));
 	jmpTarget(jumpNext, gMoveCwR(((sqInt)cPIC), ClassReg));
@@ -8811,6 +8823,10 @@
     sqInt oldMethodZoneBase;
     sqInt oldTrampolineTableIndex;
 
+
+	/* For the benefit of the following assert, assume the minimum at first. */
+
+	cFramePointerInUse = 0;
 	assertCStackWellAligned();
 	oldMethodZoneBase = methodZoneBase;
 	oldTrampolineTableIndex = trampolineTableIndex;
@@ -8821,6 +8837,7 @@
 		trampolineTableIndex = oldTrampolineTableIndex;
 		generateCaptureCStackPointers(0);
 	}
+	assertCStackWellAligned();
 }
 
 

Modified: branches/Cog/src/vm/cogit.h
===================================================================
--- branches/Cog/src/vm/cogit.h	2015-05-14 00:52:09 UTC (rev 3340)
+++ branches/Cog/src/vm/cogit.h	2015-05-14 22:34:53 UTC (rev 3341)
@@ -1,5 +1,5 @@
 /* Automatically generated by
-	CCodeGenerator VMMaker.oscog-eem.1299 uuid: cbe293c4-e086-4dbf-bb1c-055f8c47b3ef
+	CCodeGenerator VMMaker.oscog-eem.1301 uuid: ce7e12a9-6ef4-412e-942d-8b9d3b3b2980
  */
 
 

Modified: branches/Cog/src/vm/cogitARMv5.c
===================================================================
--- branches/Cog/src/vm/cogitARMv5.c	2015-05-14 00:52:09 UTC (rev 3340)
+++ branches/Cog/src/vm/cogitARMv5.c	2015-05-14 22:34:53 UTC (rev 3341)
@@ -1,9 +1,9 @@
 /* Automatically generated by
-	CCodeGenerator VMMaker.oscog-eem.1299 uuid: cbe293c4-e086-4dbf-bb1c-055f8c47b3ef
+	CCodeGenerator VMMaker.oscog-eem.1301 uuid: ce7e12a9-6ef4-412e-942d-8b9d3b3b2980
    from
-	StackToRegisterMappingCogit VMMaker.oscog-eem.1299 uuid: cbe293c4-e086-4dbf-bb1c-055f8c47b3ef
+	StackToRegisterMappingCogit VMMaker.oscog-eem.1301 uuid: ce7e12a9-6ef4-412e-942d-8b9d3b3b2980
  */
-static char __buildInfo[] = "StackToRegisterMappingCogit VMMaker.oscog-eem.1299 uuid: cbe293c4-e086-4dbf-bb1c-055f8c47b3ef " __DATE__ ;
+static char __buildInfo[] = "StackToRegisterMappingCogit VMMaker.oscog-eem.1301 uuid: ce7e12a9-6ef4-412e-942d-8b9d3b3b2980 " __DATE__ ;
 char *__cogitBuildInfo = __buildInfo;
 
 
@@ -8924,9 +8924,13 @@
 		targetEntry = ((void *)((((sqInt)(cogMethodOf(case1Method)))) + cmNoCheckEntryOffset));
 	}
 	else {
-		assert((case1Method == null)
-		 || (!(isYoungObject(case1Method))));
-		operand = case1Method;
+
+		/* We do not scavenge PICs, hence we cannot cache the MNU method if it is in new space. */
+
+		operand = ((case1Method == null)
+		 || (isYoungObject(case1Method))
+			? 0
+			: case1Method);
 		targetEntry = (case1Method == null
 			? picMNUAbort
 			: picInterpretAbort);
@@ -9014,11 +9018,19 @@
 {
     AbstractInstruction *jumpNext;
     sqInt jumpTarget;
+    sqInt operand;
 
 	compilePICAbort(numArgs);
+
+	/* We do not scavenge PICs, hence we cannot cache the MNU method if it is in new space. */
+
 	jumpNext = compileCPICEntry();
+	operand = ((methodOperand == null)
+	 || (isYoungObject(methodOperand))
+		? 0
+		: methodOperand);
 	/* begin MoveCw:R: */
-	genoperandoperand(MoveCwR, methodOperand, SendNumArgsReg);
+	genoperandoperand(MoveCwR, operand, SendNumArgsReg);
 	/* begin JumpLong: */
 	genoperand(JumpLong, ((sqInt)picMNUAbort));
 	jmpTarget(jumpNext, gMoveCwR(((sqInt)cPIC), ClassReg));
@@ -9934,6 +9946,10 @@
     sqInt oldMethodZoneBase;
     sqInt oldTrampolineTableIndex;
 
+
+	/* For the benefit of the following assert, assume the minimum at first. */
+
+	cFramePointerInUse = 0;
 	assertCStackWellAligned();
 	oldMethodZoneBase = methodZoneBase;
 	oldTrampolineTableIndex = trampolineTableIndex;
@@ -9944,6 +9960,7 @@
 		trampolineTableIndex = oldTrampolineTableIndex;
 		generateCaptureCStackPointers(0);
 	}
+	assertCStackWellAligned();
 }
 
 

Modified: branches/Cog/src/vm/cogitIA32.c
===================================================================
--- branches/Cog/src/vm/cogitIA32.c	2015-05-14 00:52:09 UTC (rev 3340)
+++ branches/Cog/src/vm/cogitIA32.c	2015-05-14 22:34:53 UTC (rev 3341)
@@ -1,9 +1,9 @@
 /* Automatically generated by
-	CCodeGenerator VMMaker.oscog-eem.1299 uuid: cbe293c4-e086-4dbf-bb1c-055f8c47b3ef
+	CCodeGenerator VMMaker.oscog-eem.1301 uuid: ce7e12a9-6ef4-412e-942d-8b9d3b3b2980
    from
-	StackToRegisterMappingCogit VMMaker.oscog-eem.1299 uuid: cbe293c4-e086-4dbf-bb1c-055f8c47b3ef
+	StackToRegisterMappingCogit VMMaker.oscog-eem.1301 uuid: ce7e12a9-6ef4-412e-942d-8b9d3b3b2980
  */
-static char __buildInfo[] = "StackToRegisterMappingCogit VMMaker.oscog-eem.1299 uuid: cbe293c4-e086-4dbf-bb1c-055f8c47b3ef " __DATE__ ;
+static char __buildInfo[] = "StackToRegisterMappingCogit VMMaker.oscog-eem.1301 uuid: ce7e12a9-6ef4-412e-942d-8b9d3b3b2980 " __DATE__ ;
 char *__cogitBuildInfo = __buildInfo;
 
 
@@ -7693,9 +7693,13 @@
 		targetEntry = ((void *)((((sqInt)(cogMethodOf(case1Method)))) + cmNoCheckEntryOffset));
 	}
 	else {
-		assert((case1Method == null)
-		 || (!(isYoungObject(case1Method))));
-		operand = case1Method;
+
+		/* We do not scavenge PICs, hence we cannot cache the MNU method if it is in new space. */
+
+		operand = ((case1Method == null)
+		 || (isYoungObject(case1Method))
+			? 0
+			: case1Method);
 		targetEntry = (case1Method == null
 			? picMNUAbort
 			: picInterpretAbort);
@@ -7776,11 +7780,19 @@
 {
     AbstractInstruction *jumpNext;
     sqInt jumpTarget;
+    sqInt operand;
 
 	compilePICAbort(numArgs);
+
+	/* We do not scavenge PICs, hence we cannot cache the MNU method if it is in new space. */
+
 	jumpNext = compileCPICEntry();
+	operand = ((methodOperand == null)
+	 || (isYoungObject(methodOperand))
+		? 0
+		: methodOperand);
 	/* begin MoveCw:R: */
-	genoperandoperand(MoveCwR, methodOperand, SendNumArgsReg);
+	genoperandoperand(MoveCwR, operand, SendNumArgsReg);
 	/* begin JumpLong: */
 	genoperand(JumpLong, ((sqInt)picMNUAbort));
 	jmpTarget(jumpNext, gMoveCwR(((sqInt)cPIC), ClassReg));
@@ -8679,6 +8691,10 @@
     sqInt oldMethodZoneBase;
     sqInt oldTrampolineTableIndex;
 
+
+	/* For the benefit of the following assert, assume the minimum at first. */
+
+	cFramePointerInUse = 0;
 	assertCStackWellAligned();
 	oldMethodZoneBase = methodZoneBase;
 	oldTrampolineTableIndex = trampolineTableIndex;
@@ -8689,6 +8705,7 @@
 		trampolineTableIndex = oldTrampolineTableIndex;
 		generateCaptureCStackPointers(0);
 	}
+	assertCStackWellAligned();
 }
 
 



More information about the Vm-dev mailing list