[Vm-dev] [commit] r2459 - CogVM source as per VMMaker.oscog-eem.101. A couple more option: NewspeakVM.

commits at squeakvm.org commits at squeakvm.org
Wed Jul 13 20:45:23 UTC 2011


Author: eliot
Date: 2011-07-13 13:45:23 -0700 (Wed, 13 Jul 2011)
New Revision: 2459

Modified:
   branches/Cog/nscogsrc/vm/cogit.c
   branches/Cog/nscogsrc/vm/cogit.h
   branches/Cog/nscogsrc/vm/cogmethod.h
   branches/Cog/scripts/mkvmarchives
   branches/Cog/src/vm/cogit.c
   branches/Cog/src/vm/cogit.h
   branches/Cog/src/vm/cogmethod.h
Log:
CogVM source as per VMMaker.oscog-eem.101.  A couple more option: NewspeakVM.


Modified: branches/Cog/nscogsrc/vm/cogit.c
===================================================================
--- branches/Cog/nscogsrc/vm/cogit.c	2011-07-13 19:44:06 UTC (rev 2458)
+++ branches/Cog/nscogsrc/vm/cogit.c	2011-07-13 20:45:23 UTC (rev 2459)
@@ -1,9 +1,9 @@
 /* Automatically generated by
-	CCodeGenerator VMMaker.oscog-eem.100 uuid: 0f2efd1e-0fd4-4544-b32b-91a0b38c6354
+	CCodeGenerator VMMaker.oscog-eem.101 uuid: dd839613-bebe-47f7-94a8-1bf3667f253f
    from
-	SimpleStackBasedCogit VMMaker.oscog-eem.100 uuid: 0f2efd1e-0fd4-4544-b32b-91a0b38c6354
+	SimpleStackBasedCogit VMMaker.oscog-eem.101 uuid: dd839613-bebe-47f7-94a8-1bf3667f253f
  */
-static char __buildInfo[] = "SimpleStackBasedCogit VMMaker.oscog-eem.100 uuid: 0f2efd1e-0fd4-4544-b32b-91a0b38c6354 " __DATE__ ;
+static char __buildInfo[] = "SimpleStackBasedCogit VMMaker.oscog-eem.101 uuid: dd839613-bebe-47f7-94a8-1bf3667f253f " __DATE__ ;
 char *__cogitBuildInfo = __buildInfo;
 
 

Modified: branches/Cog/nscogsrc/vm/cogit.h
===================================================================
--- branches/Cog/nscogsrc/vm/cogit.h	2011-07-13 19:44:06 UTC (rev 2458)
+++ branches/Cog/nscogsrc/vm/cogit.h	2011-07-13 20:45:23 UTC (rev 2459)
@@ -1,5 +1,5 @@
 /* Automatically generated by
-	CCodeGenerator VMMaker.oscog-eem.100 uuid: 0f2efd1e-0fd4-4544-b32b-91a0b38c6354
+	CCodeGenerator VMMaker.oscog-eem.101 uuid: dd839613-bebe-47f7-94a8-1bf3667f253f
  */
 
 

Modified: branches/Cog/nscogsrc/vm/cogmethod.h
===================================================================
--- branches/Cog/nscogsrc/vm/cogmethod.h	2011-07-13 19:44:06 UTC (rev 2458)
+++ branches/Cog/nscogsrc/vm/cogmethod.h	2011-07-13 20:45:23 UTC (rev 2459)
@@ -1,5 +1,5 @@
 /* Automatically generated by
-	CCodeGenerator VMMaker.oscog-eem.100 uuid: 0f2efd1e-0fd4-4544-b32b-91a0b38c6354
+	CCodeGenerator VMMaker.oscog-eem.101 uuid: dd839613-bebe-47f7-94a8-1bf3667f253f
  */
 
 typedef struct {

Modified: branches/Cog/scripts/mkvmarchives
===================================================================
--- branches/Cog/scripts/mkvmarchives	2011-07-13 19:44:06 UTC (rev 2458)
+++ branches/Cog/scripts/mkvmarchives	2011-07-13 20:45:23 UTC (rev 2459)
@@ -79,7 +79,7 @@
 do
 	echo
 	echo checking $vm version
-	strings - $vm | egrep "Interp.*VMMaker|Cogit.*VMMaker| built on " | grep -v 'Unix built on "__DATE__ " "__TIME__" Compiler: "__VERSION__'
+	strings - $vm | egrep "Interp.*VMMaker|Cogit.*VMMaker| built on " | grep -v 'Unix built on "__DATE__ " "__TIME__" Compiler: "__VERSION__' | sed 's/ uuid:.*//'
 	echo checking $vm for asserts
 	strings - $vm | grep "assert[^0-9]*[0-9][0-9][0-9]"
 done

Modified: branches/Cog/src/vm/cogit.c
===================================================================
--- branches/Cog/src/vm/cogit.c	2011-07-13 19:44:06 UTC (rev 2458)
+++ branches/Cog/src/vm/cogit.c	2011-07-13 20:45:23 UTC (rev 2459)
@@ -1,9 +1,9 @@
 /* Automatically generated by
-	CCodeGenerator VMMaker.oscog-eem.100 uuid: 0f2efd1e-0fd4-4544-b32b-91a0b38c6354
+	CCodeGenerator VMMaker.oscog-eem.101 uuid: dd839613-bebe-47f7-94a8-1bf3667f253f
    from
-	StackToRegisterMappingCogit VMMaker.oscog-eem.100 uuid: 0f2efd1e-0fd4-4544-b32b-91a0b38c6354
+	StackToRegisterMappingCogit VMMaker.oscog-eem.101 uuid: dd839613-bebe-47f7-94a8-1bf3667f253f
  */
-static char __buildInfo[] = "StackToRegisterMappingCogit VMMaker.oscog-eem.100 uuid: 0f2efd1e-0fd4-4544-b32b-91a0b38c6354 " __DATE__ ;
+static char __buildInfo[] = "StackToRegisterMappingCogit VMMaker.oscog-eem.101 uuid: dd839613-bebe-47f7-94a8-1bf3667f253f " __DATE__ ;
 char *__cogitBuildInfo = __buildInfo;
 
 
@@ -831,7 +831,6 @@
 void markAndTraceObjectsOrFreeMachineCode(sqInt inFullGC);
 static sqInt markAndTraceOrFreeCogMethodfirstVisit(CogMethod *cogMethod, sqInt firstVisit);
 static void markAndTraceOrFreeMachineCodeForFullGC(void);
-static sqInt markLiteralsAndUnlinkIfUnmarkedSendOrPushImplicitpcmethod(sqInt annotation, char *mcpc, sqInt cogMethod);
 static sqInt markLiteralsAndUnlinkIfUnmarkedSendpcmethod(sqInt annotation, char *mcpc, sqInt cogMethod);
 void markMethodAndReferents(CogBlockMethod *aCogMethod);
 static sqInt markYoungObjectspcmethod(sqInt annotation, char *mcpc, sqInt cogMethod);
@@ -899,7 +898,6 @@
 static void relocateMethodReferenceBeforeAddressby(AbstractInstruction * self_in_relocateMethodReferenceBeforeAddressby, sqInt pc, sqInt delta);
 static sqInt relocateMethodsPreCompaction(void);
 static sqInt remapIfObjectRefpchasYoung(sqInt annotation, char *mcpc, sqInt hasYoungPtr);
-static sqInt remapNSIfObjectRefpchasYoung(sqInt annotation, char *mcpc, sqInt hasYoungPtr);
 static sqInt remapOop(sqInt oop);
 static void removeFromOpenPICList(CogMethod *anOpenPIC);
 static void resolveJumpTarget(AbstractInstruction * self_in_resolveJumpTarget);
@@ -13466,137 +13464,6 @@
  */
 
 static sqInt
-markLiteralsAndUnlinkIfUnmarkedSendOrPushImplicitpcmethod(sqInt annotation, char *mcpc, sqInt cogMethod)
-{
-    sqInt cacheTag;
-    sqInt cacheTagMarked;
-    sqInt class;
-    sqInt classpc;
-    sqInt entryPoint;
-    sqInt literal;
-    sqInt mixin;
-    sqInt mixinpc;
-    sqInt off;
-    sqInt offset;
-    sqInt *sendTable;
-    sqInt table;
-    CogMethod *targetMethod;
-    sqInt unlinkedRoutine;
-
-	if (annotation == IsObjectReference) {
-		literal = literalBeforeFollowingAddress(backEnd, ((sqInt)mcpc));
-		markAndTraceLiteral(literal);
-	}
-	if (
-#  if NewspeakVM
-		((annotation == IsSendCall)
-		 || (annotation == IsNSSendCall))
-#  else /* NewspeakVM */
-		(annotation == IsSendCall)
-#  endif /* NewspeakVM */
-		) {
-		entryPoint = callTargetFromReturnAddress(backEnd, ((sqInt)mcpc));
-		cacheTag = inlineCacheTagAt(backEnd, ((sqInt)mcpc));
-		cacheTagMarked = cacheTagIsMarked(cacheTag);
-		markAndTraceLiteral(cacheTag);
-		if (entryPoint == ceImplicitReceiverTrampoline) {
-			assert(cacheTagMarked);
-			classpc = (((sqInt)mcpc)) + (jumpShortByteSize(backEnd));
-			mixinpc = ((((sqInt)mcpc)) + (jumpShortByteSize(backEnd))) + BytesPerOop;
-			class = unalignedLongAt(backEnd, classpc);
-			assert((class == 0)
-			 || (addressCouldBeObj(class)));
-			if (cacheTagIsMarked(class)) {
-				if (((mixin = unalignedLongAt(backEnd, mixinpc))) != 0) {
-					markAndTraceLiteral(mixin);
-				}
-			}
-			else {
-				unalignedLongAtput(backEnd, classpc, 0);
-				unalignedLongAtput(backEnd, mixinpc, 0);
-				codeModified = 1;
-			}
-		}
-		else {
-			if (entryPoint > methodZoneBase) {
-				/* begin offsetAndSendTableFor:annotation:into: */
-				VM_LABEL(1offsetAndSendTableForannotationinto);
-				
-#        if NewspeakVM
-				if ((entryPoint & entryPointMask) == checkedEntryAlignment) {
-					assert(annotation == IsSendCall);
-					
-					/* It's a linked send. */
-
-					offset = cmEntryOffset;
-					sendTable = sendTrampolines;
-
-				}
-				else {
-					if ((entryPoint & entryPointMask) == dynSuperEntryAlignment) {
-						assert(annotation == IsNSSendCall);
-						
-						/* It's a linked send. */
-
-						offset = cmDynSuperEntryOffset;
-						sendTable = dynamicSuperSendTrampolines;
-
-					}
-					else {
-						assert(annotation == IsSendCall);
-						
-						/* It's a linked send. */
-
-						offset = cmNoCheckEntryOffset;
-						sendTable = superSendTrampolines;
-
-					}
-				}
-
-#        else /* NewspeakVM */
-				if ((entryPoint & entryPointMask) == checkedEntryAlignment) {
-					
-					/* It's a linked send. */
-
-					offset = cmEntryOffset;
-					sendTable = sendTrampolines;
-
-				}
-				else {
-					
-					/* It's a linked send. */
-
-					offset = cmNoCheckEntryOffset;
-					sendTable = superSendTrampolines;
-
-				}
-
-#        endif /* NewspeakVM */
-
-				targetMethod = ((CogMethod *) (entryPoint - offset));
-				if ((!cacheTagMarked)
-				 || (markAndTraceOrFreeCogMethodfirstVisit(targetMethod, (((usqInt)targetMethod)) > (((usqInt)mcpc))))) {
-
-					/* Either the cacheTag is unmarked (e.g. new class) or the target
-						  has been freed (because it is unmarked) so unlink the send. */
-
-					unlinkedRoutine = sendTable[((((targetMethod->cmNumArgs)) < (NumSendTrampolines - 1)) ? ((targetMethod->cmNumArgs)) : (NumSendTrampolines - 1))];
-					rewriteInlineCacheAttagtarget(backEnd, ((sqInt)mcpc), (targetMethod->selector), unlinkedRoutine);
-					codeModified = 1;
-					markAndTraceLiteral((targetMethod->selector));
-				}
-			}
-		}
-	}
-	return 0;
-}
-
-
-/*	Mark and trace literals. Unlink sends that have unmarked cache tags or
-	targets. 
- */
-
-static sqInt
 markLiteralsAndUnlinkIfUnmarkedSendpcmethod(sqInt annotation, char *mcpc, sqInt cogMethod)
 {
     sqInt cacheTag;
@@ -13628,7 +13495,7 @@
 		entryPoint = callTargetFromReturnAddress(backEnd, ((sqInt)mcpc));
 		if (entryPoint > methodZoneBase) {
 			/* begin offsetAndSendTableFor:annotation:into: */
-			VM_LABEL(2offsetAndSendTableForannotationinto);
+			VM_LABEL(1offsetAndSendTableForannotationinto);
 			
 #      if NewspeakVM
 			if ((entryPoint & entryPointMask) == checkedEntryAlignment) {
@@ -14730,7 +14597,7 @@
 			return 0;
 		}
 		/* begin offsetAndSendTableFor:annotation:into: */
-		VM_LABEL(3offsetAndSendTableForannotationinto);
+		VM_LABEL(2offsetAndSendTableForannotationinto);
 		
 #    if NewspeakVM
 		if ((entryPoint & entryPointMask) == checkedEntryAlignment) {
@@ -14894,86 +14761,6 @@
 }
 
 static sqInt
-remapNSIfObjectRefpchasYoung(sqInt annotation, char *mcpc, sqInt hasYoungPtr)
-{
-    sqInt cacheTag;
-    sqInt entryPoint;
-    sqInt literal;
-    sqInt mappedCacheTag;
-    sqInt mappedLiteral;
-    sqInt mappedOop;
-    sqInt offset;
-    sqInt oop;
-    sqInt pc;
-    CogMethod *targetMethod;
-
-	if (annotation == IsObjectReference) {
-		literal = literalBeforeFollowingAddress(backEnd, ((sqInt)mcpc));
-		if (couldBeObject(literal)) {
-			mappedLiteral = remap(literal);
-			if (literal != mappedLiteral) {
-				storeLiteralbeforeFollowingAddress(backEnd, mappedLiteral, ((sqInt)mcpc));
-				codeModified = 1;
-			}
-			if ((hasYoungPtr != 0)
-			 && (isYoung(mappedLiteral))) {
-				(((sqInt *) hasYoungPtr))[0] = 1;
-			}
-		}
-	}
-	if (
-#  if NewspeakVM
-		((annotation == IsSendCall)
-		 || (annotation == IsNSSendCall))
-#  else /* NewspeakVM */
-		(annotation == IsSendCall)
-#  endif /* NewspeakVM */
-		) {
-		cacheTag = inlineCacheTagAt(backEnd, ((sqInt)mcpc));
-		if (couldBeObject(cacheTag)) {
-			mappedCacheTag = remap(cacheTag);
-			if (cacheTag != mappedCacheTag) {
-				rewriteInlineCacheTagat(backEnd, mappedCacheTag, ((sqInt)mcpc));
-				codeModified = 1;
-			}
-			if ((hasYoungPtr != 0)
-			 && (isYoung(mappedCacheTag))) {
-				(((sqInt *) hasYoungPtr))[0] = 1;
-			}
-		}
-		entryPoint = callTargetFromReturnAddress(backEnd, ((sqInt)mcpc));
-		if (entryPoint == ceImplicitReceiverTrampoline) {
-			pc = (((sqInt)mcpc)) + (jumpShortByteSize(backEnd));
-			if (((oop = unalignedLongAt(backEnd, pc))) != 0) {
-				mappedOop = remap(oop);
-				if (mappedOop != oop) {
-					unalignedLongAtput(backEnd, pc, mappedOop);
-				}
-				pc = ((((sqInt)mcpc)) + (jumpShortByteSize(backEnd))) + BytesPerOop;
-				if (((oop = unalignedLongAt(backEnd, pc))) != 0) {
-					mappedOop = remap(oop);
-					if (mappedOop != oop) {
-						unalignedLongAtput(backEnd, pc, mappedOop);
-					}
-				}
-			}
-		}
-		if (hasYoungPtr != 0) {
-			if (entryPoint > methodZoneBase) {
-				offset = ((entryPoint & entryPointMask) == checkedEntryAlignment
-					? (cmEntryOffset)
-					: (cmNoCheckEntryOffset));
-				targetMethod = ((CogMethod *) (entryPoint - offset));
-				if (isYoung((targetMethod->selector))) {
-					(((sqInt *) hasYoungPtr))[0] = 1;
-				}
-			}
-		}
-	}
-	return 0;
-}
-
-static sqInt
 remapOop(sqInt oop)
 {
 	return ((oop & 1)
@@ -16017,7 +15804,7 @@
 		entryPoint = callTargetFromReturnAddress(backEnd, ((sqInt)mcpc));
 		if (entryPoint > methodZoneBase) {
 			/* begin offsetAndSendTableFor:annotation:into: */
-			VM_LABEL(4offsetAndSendTableForannotationinto);
+			VM_LABEL(3offsetAndSendTableForannotationinto);
 			
 #      if NewspeakVM
 			if ((entryPoint & entryPointMask) == checkedEntryAlignment) {
@@ -16103,7 +15890,7 @@
 		entryPoint = callTargetFromReturnAddress(backEnd, ((sqInt)mcpc));
 		if (entryPoint > methodZoneBase) {
 			/* begin offsetAndSendTableFor:annotation:into: */
-			VM_LABEL(5offsetAndSendTableForannotationinto);
+			VM_LABEL(4offsetAndSendTableForannotationinto);
 			
 #      if NewspeakVM
 			if ((entryPoint & entryPointMask) == checkedEntryAlignment) {
@@ -16197,7 +15984,7 @@
 
 		if (entryPoint > methodZoneBase) {
 			/* begin offsetAndSendTableFor:annotation:into: */
-			VM_LABEL(6offsetAndSendTableForannotationinto);
+			VM_LABEL(5offsetAndSendTableForannotationinto);
 			
 #      if NewspeakVM
 			if ((entryPoint & entryPointMask) == checkedEntryAlignment) {
@@ -16283,7 +16070,7 @@
 		entryPoint = callTargetFromReturnAddress(backEnd, ((sqInt)mcpc));
 		if (entryPoint > methodZoneBase) {
 			/* begin offsetAndSendTableFor:annotation:into: */
-			VM_LABEL(7offsetAndSendTableForannotationinto);
+			VM_LABEL(6offsetAndSendTableForannotationinto);
 			
 #      if NewspeakVM
 			if ((entryPoint & entryPointMask) == checkedEntryAlignment) {

Modified: branches/Cog/src/vm/cogit.h
===================================================================
--- branches/Cog/src/vm/cogit.h	2011-07-13 19:44:06 UTC (rev 2458)
+++ branches/Cog/src/vm/cogit.h	2011-07-13 20:45:23 UTC (rev 2459)
@@ -1,5 +1,5 @@
 /* Automatically generated by
-	CCodeGenerator VMMaker.oscog-eem.100 uuid: 0f2efd1e-0fd4-4544-b32b-91a0b38c6354
+	CCodeGenerator VMMaker.oscog-eem.101 uuid: dd839613-bebe-47f7-94a8-1bf3667f253f
  */
 
 

Modified: branches/Cog/src/vm/cogmethod.h
===================================================================
--- branches/Cog/src/vm/cogmethod.h	2011-07-13 19:44:06 UTC (rev 2458)
+++ branches/Cog/src/vm/cogmethod.h	2011-07-13 20:45:23 UTC (rev 2459)
@@ -1,5 +1,5 @@
 /* Automatically generated by
-	CCodeGenerator VMMaker.oscog-eem.100 uuid: 0f2efd1e-0fd4-4544-b32b-91a0b38c6354
+	CCodeGenerator VMMaker.oscog-eem.101 uuid: dd839613-bebe-47f7-94a8-1bf3667f253f
  */
 
 typedef struct {



More information about the Vm-dev mailing list