[Vm-dev] [commit][3399] CogVM source as per VMMaker.oscog-eem.1407
commits at squeakvm.org
commits at squeakvm.org
Tue Jul 7 20:53:27 UTC 2015
Revision: 3399
Author: eliot
Date: 2015-07-07 13:53:26 -0700 (Tue, 07 Jul 2015)
Log Message:
-----------
CogVM source as per VMMaker.oscog-eem.1407
Implement the relevant implicitReceiveCacheAt: for the ARM Cogits.
Eliminate compile-time warnings from Newspeak ARM Cogit.
Modified Paths:
--------------
branches/Cog/nsspursrc/vm/cogitARMv5.c
Property Changed:
----------------
branches/Cog/platforms/Cross/vm/sqSCCSVersion.h
Modified: branches/Cog/nsspursrc/vm/cogitARMv5.c
===================================================================
--- branches/Cog/nsspursrc/vm/cogitARMv5.c 2015-07-07 19:03:10 UTC (rev 3398)
+++ branches/Cog/nsspursrc/vm/cogitARMv5.c 2015-07-07 20:53:26 UTC (rev 3399)
@@ -1,9 +1,9 @@
/* Automatically generated by
- CCodeGenerator VMMaker.oscog-eem.1401 uuid: 036f0933-639a-49dd-8a1d-a03bcdcb0a0a
+ CCodeGenerator VMMaker.oscog-eem.1407 uuid: cc7c9003-2145-44b0-a3bd-937c285968bb
from
- StackToRegisterMappingCogit VMMaker.oscog-eem.1401 uuid: 036f0933-639a-49dd-8a1d-a03bcdcb0a0a
+ StackToRegisterMappingCogit VMMaker.oscog-eem.1407 uuid: cc7c9003-2145-44b0-a3bd-937c285968bb
*/
-static char __buildInfo[] = "StackToRegisterMappingCogit VMMaker.oscog-eem.1401 uuid: 036f0933-639a-49dd-8a1d-a03bcdcb0a0a " __DATE__ ;
+static char __buildInfo[] = "StackToRegisterMappingCogit VMMaker.oscog-eem.1407 uuid: cc7c9003-2145-44b0-a3bd-937c285968bb " __DATE__ ;
char *__cogitBuildInfo = __buildInfo;
@@ -912,7 +912,8 @@
static sqInt slotOffsetOfInstVarIndex(sqInt index) NoDbgRegParms;
static sqInt smallIntegerIsOnlyImmediateType(void);
static AbstractInstruction * concretizeLiteral(AbstractInstruction * self_in_concretizeLiteral) NoDbgRegParms;
-static sqInt inlineCacheTagAt(AbstractInstruction * self_in_inlineCacheTagAt, sqInt followingAddress) NoDbgRegParms;
+static sqInt implicitReceiveCacheAt(AbstractInstruction * self_in_implicitReceiveCacheAt, sqInt callSiteReturnAddress) NoDbgRegParms;
+static sqInt inlineCacheTagAt(AbstractInstruction * self_in_inlineCacheTagAt, sqInt callSiteReturnAddress) NoDbgRegParms;
static sqInt isPCDependent(AbstractInstruction * self_in_isPCDependent) NoDbgRegParms;
static usqInt isSharable(AbstractInstruction * self_in_isSharable) NoDbgRegParms;
static sqInt literalLoadInstructionBytes(AbstractInstruction * self_in_literalLoadInstructionBytes) NoDbgRegParms;
@@ -8044,7 +8045,7 @@
return ceSendFromInLineCacheMiss(cPIC);
}
cogExtendPICCaseNMethodtagisMNUCase(cPIC, newTargetMethodOrNil, cacheTag, errorSelectorOrNil == SelectorDoesNotUnderstand);
- executeCogPICfromLinkedSendWithReceiverandCacheTag(cPIC, receiver, inlineCacheTagAt(backEnd, outerReturn));
+ executeCogPICfromLinkedSendWithReceiverandCacheTag(cPIC, receiver, longAt(pcRelativeAddressAt(backEnd, ((usqInt)(outerReturn - 8)))));
return null;
}
@@ -8163,7 +8164,7 @@
cacheTag = inlineCacheTagForInstance(receiver);
if (((errorSelectorOrNil != null)
&& (errorSelectorOrNil != SelectorDoesNotUnderstand))
- || (((inlineCacheTagAt(backEnd, outerReturn)) == 0)
+ || (((longAt(pcRelativeAddressAt(backEnd, ((usqInt)(outerReturn - 8))))) == 0)
|| ((newTargetMethodOrNil == null)
|| (isYoung(newTargetMethodOrNil))))) {
result = patchToOpenPICFornumArgsreceiver((targetMethod->selector), (targetMethod->cmNumArgs), receiver);
@@ -8192,7 +8193,7 @@
? rewriteInlineCacheAttagtarget(backEnd, outerReturn, (targetMethod->selector), (((sqInt)pic)) + cmEntryOffset)
: rewriteCallAttarget(backEnd, outerReturn, (((sqInt)pic)) + cmEntryOffset));
flushICacheFromto(processor, (((usqInt)outerReturn)) - extent, ((usqInt)outerReturn));
- executeCogPICfromLinkedSendWithReceiverandCacheTag(pic, receiver, inlineCacheTagAt(backEnd, outerReturn));
+ executeCogPICfromLinkedSendWithReceiverandCacheTag(pic, receiver, longAt(pcRelativeAddressAt(backEnd, ((usqInt)(outerReturn - 8)))));
return null;
}
@@ -8251,7 +8252,7 @@
mcpc1 = ((char *) (((sqInt)mcpc)));
entryPoint1 = callTargetFromReturnAddress(backEnd, ((sqInt)mcpc1));
assert(entryPoint1 < methodZoneBase);
- cacheAddress = ((usqInt)(implicitReceiveCacheAt(backEnd, mcpc1)));
+ cacheAddress = ((usqInt)(longAt(pcRelativeAddressAt(backEnd, ((usqInt)(mcpc1 - 8))))));
assert(isInOldSpace(cacheAddress));
nsSendCache = ((NSSendCache *) cacheAddress);
if (!(asserta(checkValidOopReference((nsSendCache->selector))))) {
@@ -8281,7 +8282,7 @@
return 3;
}
/* begin offsetCacheTagAndCouldBeObjectAt:annotation:into: */
- cacheTag1 = inlineCacheTagAt(backEnd, ((sqInt)mcpc));
+ cacheTag1 = longAt(pcRelativeAddressAt(backEnd, ((usqInt)((((sqInt)mcpc)) - 8))));
/* in-line cache tags are the selectors of sends if sends are unlinked,
the selectors of super sends (entry offset = cmNoCheckEntryOffset),
@@ -8396,7 +8397,7 @@
mcpc1 = ((char *) (((sqInt)mcpc)));
entryPoint1 = callTargetFromReturnAddress(backEnd, ((sqInt)mcpc1));
assert(entryPoint1 < methodZoneBase);
- cacheAddress = ((usqInt)(implicitReceiveCacheAt(backEnd, mcpc1)));
+ cacheAddress = ((usqInt)(longAt(pcRelativeAddressAt(backEnd, ((usqInt)(mcpc1 - 8))))));
assert(isInOldSpace(cacheAddress));
nsSendCache = ((NSSendCache *) cacheAddress);
if (!(checkValidOopReference((nsSendCache->selector)))) {
@@ -8451,7 +8452,7 @@
offset = offset1;
}
- selectorOrCacheTag = inlineCacheTagAt(backEnd, ((sqInt)mcpc));
+ selectorOrCacheTag = longAt(pcRelativeAddressAt(backEnd, ((usqInt)((((sqInt)mcpc)) - 8))));
if ((entryPoint > methodZoneBase)
&& ((offset != cmNoCheckEntryOffset)
&& ((((((CogMethod *) (entryPoint - offset)))->cmType)) != CMOpenPIC))) {
@@ -9848,7 +9849,7 @@
{
sqInt classIndex;
sqInt i;
- sqInt pc;
+ usqInt pc;
pc = (((((usqInt)cPIC)) + firstCPICCaseOffset) + cPICCaseSize) - (jumpLongConditionalByteSize(backEnd));
for (i = 2; i <= ((cPIC->cPICNumCases)); i += 1) {
@@ -10824,12 +10825,12 @@
generateMapAtstart(sqInt addressOrNull, sqInt startAddress)
{
unsigned char annotation;
- usqInt delta;
+ sqInt delta;
sqInt i;
AbstractInstruction *instruction;
sqInt length;
- usqInt location;
- usqInt mapEntry;
+ sqInt location;
+ sqInt mapEntry;
sqInt maxDelta;
usqInt mcpc;
@@ -11507,7 +11508,7 @@
mcpc1 = ((char *) (((sqInt)mcpc)));
entryPoint1 = callTargetFromReturnAddress(backEnd, ((sqInt)mcpc1));
assert(entryPoint1 < methodZoneBase);
- cacheAddress = ((usqInt)(implicitReceiveCacheAt(backEnd, mcpc1)));
+ cacheAddress = ((usqInt)(longAt(pcRelativeAddressAt(backEnd, ((usqInt)(mcpc1 - 8))))));
assert(isInOldSpace(cacheAddress));
nsSendCache = ((NSSendCache *) cacheAddress);
if (((nsSendCache->classTag)) != 2) {
@@ -12704,7 +12705,7 @@
sqInt *sendTable1;
sqInt tagCouldBeObj;
sqInt tagCouldBeObj1;
- sqInt targetMethod;
+ CogMethod * targetMethod;
CogMethod *targetMethod1;
sqInt unlinkedRoutine;
sqInt val;
@@ -12722,7 +12723,7 @@
mcpc1 = ((char *) (((sqInt)mcpc)));
entryPoint1 = callTargetFromReturnAddress(backEnd, ((sqInt)mcpc1));
assert(entryPoint1 < methodZoneBase);
- cacheAddress = ((usqInt)(implicitReceiveCacheAt(backEnd, mcpc1)));
+ cacheAddress = ((usqInt)(longAt(pcRelativeAddressAt(backEnd, ((usqInt)(mcpc1 - 8))))));
assert(isInOldSpace(cacheAddress));
nsSendCache = ((NSSendCache *) cacheAddress);
entryPoint = (nsSendCache->target);
@@ -12730,7 +12731,7 @@
/* Send is linked */
- targetMethod = entryPoint - cmNoCheckEntryOffset;
+ targetMethod = ((CogMethod *) (entryPoint - cmNoCheckEntryOffset));
if (markAndTraceOrFreeCogMethodfirstVisit(targetMethod, (((usqInt)targetMethod)) > (((usqInt)mcpc)))) {
/* begin voidNSSendCache: */
(nsSendCache->classTag = 2);
@@ -12762,7 +12763,7 @@
if (annotation >= IsSendCall) {
/* begin offsetCacheTagAndCouldBeObjectAt:annotation:into: */
- cacheTag1 = inlineCacheTagAt(backEnd, ((sqInt)mcpc));
+ cacheTag1 = longAt(pcRelativeAddressAt(backEnd, ((usqInt)((((sqInt)mcpc)) - 8))));
/* in-line cache tags are the selectors of sends if sends are unlinked,
the selectors of super sends (entry offset = cmNoCheckEntryOffset),
@@ -12866,7 +12867,7 @@
mcpc1 = ((char *) (((sqInt)mcpc)));
entryPoint1 = callTargetFromReturnAddress(backEnd, ((sqInt)mcpc1));
assert(entryPoint1 < methodZoneBase);
- cacheAddress = ((usqInt)(implicitReceiveCacheAt(backEnd, mcpc1)));
+ cacheAddress = ((usqInt)(longAt(pcRelativeAddressAt(backEnd, ((usqInt)(mcpc1 - 8))))));
assert(isInOldSpace(cacheAddress));
nsSendCache = ((NSSendCache *) cacheAddress);
sel = (nsSendCache->selector);
@@ -12893,7 +12894,7 @@
if (annotation >= IsSendCall) {
/* begin offsetCacheTagAndCouldBeObjectAt:annotation:into: */
- cacheTag1 = inlineCacheTagAt(backEnd, ((sqInt)mcpc));
+ cacheTag1 = longAt(pcRelativeAddressAt(backEnd, ((usqInt)((((sqInt)mcpc)) - 8))));
/* in-line cache tags are the selectors of sends if sends are unlinked,
the selectors of super sends (entry offset = cmNoCheckEntryOffset),
@@ -14046,7 +14047,7 @@
mcpc1 = ((char *) (((sqInt)mcpc)));
entryPoint1 = callTargetFromReturnAddress(backEnd, ((sqInt)mcpc1));
assert(entryPoint1 < methodZoneBase);
- cacheAddress = ((usqInt)(implicitReceiveCacheAt(backEnd, mcpc1)));
+ cacheAddress = ((usqInt)(longAt(pcRelativeAddressAt(backEnd, ((usqInt)(mcpc1 - 8))))));
assert(isInOldSpace(cacheAddress));
nsSendCache = ((NSSendCache *) cacheAddress);
relocateCallBeforeReturnPCby(backEnd, ((sqInt)mcpc), -delta);
@@ -14176,7 +14177,7 @@
/* begin nsSendCacheFromReturnAddress: */
entryPoint1 = callTargetFromReturnAddress(backEnd, ((sqInt)mcpc));
assert(entryPoint1 < methodZoneBase);
- cacheAddress = ((usqInt)(implicitReceiveCacheAt(backEnd, mcpc)));
+ cacheAddress = ((usqInt)(longAt(pcRelativeAddressAt(backEnd, ((usqInt)(mcpc - 8))))));
assert(isInOldSpace(cacheAddress));
nsSendCache = ((NSSendCache *) cacheAddress);
oop = (nsSendCache->selector);
@@ -14204,7 +14205,7 @@
if (annotation >= IsSendCall) {
/* begin offsetCacheTagAndCouldBeObjectAt:annotation:into: */
- cacheTag1 = inlineCacheTagAt(backEnd, ((sqInt)mcpc));
+ cacheTag1 = longAt(pcRelativeAddressAt(backEnd, ((usqInt)((((sqInt)mcpc)) - 8))));
/* in-line cache tags are the selectors of sends if sends are unlinked,
the selectors of super sends (entry offset = cmNoCheckEntryOffset),
@@ -14494,7 +14495,7 @@
mcpc1 = ((char *) (((sqInt)mcpc)));
entryPoint1 = callTargetFromReturnAddress(backEnd, ((sqInt)mcpc1));
assert(entryPoint1 < methodZoneBase);
- cacheAddress = ((usqInt)(implicitReceiveCacheAt(backEnd, mcpc1)));
+ cacheAddress = ((usqInt)(longAt(pcRelativeAddressAt(backEnd, ((usqInt)(mcpc1 - 8))))));
assert(isInOldSpace(cacheAddress));
nsSendCache = ((NSSendCache *) cacheAddress);
if (((entryPoint = (nsSendCache->target))) != 0) {
@@ -14572,7 +14573,7 @@
mcpc1 = ((char *) (((sqInt)mcpc)));
entryPoint1 = callTargetFromReturnAddress(backEnd, ((sqInt)mcpc1));
assert(entryPoint1 < methodZoneBase);
- cacheAddress = ((usqInt)(implicitReceiveCacheAt(backEnd, mcpc1)));
+ cacheAddress = ((usqInt)(longAt(pcRelativeAddressAt(backEnd, ((usqInt)(mcpc1 - 8))))));
assert(isInOldSpace(cacheAddress));
nsSendCache = ((NSSendCache *) cacheAddress);
if ((((nsSendCache->classTag)) != 2)
@@ -14617,7 +14618,7 @@
if (!(((annotation == IsSuperSend)
|| (0))
|| (((targetMethod1->cmType)) == CMOpenPIC))) {
- if (!(isValidClassTag(inlineCacheTagAt(backEnd, ((sqInt)mcpc))))) {
+ if (!(isValidClassTag(longAt(pcRelativeAddressAt(backEnd, ((usqInt)((((sqInt)mcpc)) - 8))))))) {
/* begin unlinkSendAt:targetMethod:sendTable: */
unlinkedRoutine = sendTable1[((((targetMethod1->cmNumArgs)) < (NumSendTrampolines - 1)) ? ((targetMethod1->cmNumArgs)) : (NumSendTrampolines - 1))];
rewriteInlineCacheAttagtarget(backEnd, ((sqInt)mcpc), (targetMethod1->selector), unlinkedRoutine);
@@ -14651,7 +14652,7 @@
mcpc1 = ((char *) (((sqInt)mcpc)));
entryPoint1 = callTargetFromReturnAddress(backEnd, ((sqInt)mcpc1));
assert(entryPoint1 < methodZoneBase);
- cacheAddress = ((usqInt)(implicitReceiveCacheAt(backEnd, mcpc1)));
+ cacheAddress = ((usqInt)(longAt(pcRelativeAddressAt(backEnd, ((usqInt)(mcpc1 - 8))))));
assert(isInOldSpace(cacheAddress));
nsSendCache = ((NSSendCache *) cacheAddress);
if (((entryPoint = (nsSendCache->target))) != 0) {
@@ -14730,7 +14731,7 @@
mcpc1 = ((char *) (((sqInt)mcpc)));
entryPoint1 = callTargetFromReturnAddress(backEnd, ((sqInt)mcpc1));
assert(entryPoint1 < methodZoneBase);
- cacheAddress = ((usqInt)(implicitReceiveCacheAt(backEnd, mcpc1)));
+ cacheAddress = ((usqInt)(longAt(pcRelativeAddressAt(backEnd, ((usqInt)(mcpc1 - 8))))));
assert(isInOldSpace(cacheAddress));
nsSendCache = ((NSSendCache *) cacheAddress);
if (((nsSendCache->classTag)) != 2) {
@@ -14804,7 +14805,7 @@
mcpc1 = ((char *) (((sqInt)mcpc)));
entryPoint1 = callTargetFromReturnAddress(backEnd, ((sqInt)mcpc1));
assert(entryPoint1 < methodZoneBase);
- cacheAddress = ((usqInt)(implicitReceiveCacheAt(backEnd, mcpc1)));
+ cacheAddress = ((usqInt)(longAt(pcRelativeAddressAt(backEnd, ((usqInt)(mcpc1 - 8))))));
assert(isInOldSpace(cacheAddress));
nsSendCache = ((NSSendCache *) cacheAddress);
if (((entryPoint = (nsSendCache->target))) != 0) {
@@ -19775,11 +19776,22 @@
return self_in_concretizeLiteral;
}
+
+/* Answer the implicit receiver cache for the return address
+ of a call to one of the ceImplicitReceiver... trampolines. */
+
+ /* CogOutOfLineLiteralsARMCompiler>>#implicitReceiveCacheAt: */
+static sqInt
+implicitReceiveCacheAt(AbstractInstruction * self_in_implicitReceiveCacheAt, sqInt callSiteReturnAddress)
+{
+ return longAt(pcRelativeAddressAt(self_in_implicitReceiveCacheAt, ((usqInt)(callSiteReturnAddress - 8))));
+}
+
/* CogOutOfLineLiteralsARMCompiler>>#inlineCacheTagAt: */
static sqInt
-inlineCacheTagAt(AbstractInstruction * self_in_inlineCacheTagAt, sqInt followingAddress)
+inlineCacheTagAt(AbstractInstruction * self_in_inlineCacheTagAt, sqInt callSiteReturnAddress)
{
- return longAt(pcRelativeAddressAt(self_in_inlineCacheTagAt, followingAddress - 8));
+ return longAt(pcRelativeAddressAt(self_in_inlineCacheTagAt, ((usqInt)(callSiteReturnAddress - 8))));
}
Property changes on: branches/Cog/platforms/Cross/vm/sqSCCSVersion.h
___________________________________________________________________
Modified: checkindate
- Mon Jul 6 11:56:22 PDT 2015
+ Tue Jul 7 13:52:43 PDT 2015
More information about the Vm-dev
mailing list