Skip to content

Commit

Permalink
Merge branch 'Cog' of github.com:OpenSmalltalk/opensmalltalk-vm into …
Browse files Browse the repository at this point in the history
…merge-with-pharo
  • Loading branch information
estebanlm committed Nov 3, 2016
2 parents ba96153 + 5551b4d commit 7616bcf
Show file tree
Hide file tree
Showing 57 changed files with 625 additions and 866 deletions.
2 changes: 1 addition & 1 deletion nsspur64src/vm/cogit.h
@@ -1,5 +1,5 @@
/* Automatically generated by
CCodeGenerator VMMaker.oscog-eem.1972 uuid: 0e6a54ad-d62f-4b69-9f0d-7b66f8350984
CCodeGenerator VMMaker.oscog-eem.1975 uuid: 76250913-236f-47e0-832c-27b05d488807
*/


Expand Down
31 changes: 11 additions & 20 deletions nsspur64src/vm/cogitX64.c
@@ -1,9 +1,9 @@
/* Automatically generated by
CCodeGenerator VMMaker.oscog-eem.1972 uuid: 0e6a54ad-d62f-4b69-9f0d-7b66f8350984
CCodeGenerator VMMaker.oscog-eem.1975 uuid: 76250913-236f-47e0-832c-27b05d488807
from
StackToRegisterMappingCogit VMMaker.oscog-eem.1972 uuid: 0e6a54ad-d62f-4b69-9f0d-7b66f8350984
StackToRegisterMappingCogit VMMaker.oscog-eem.1975 uuid: 76250913-236f-47e0-832c-27b05d488807
*/
static char __buildInfo[] = "StackToRegisterMappingCogit VMMaker.oscog-eem.1972 uuid: 0e6a54ad-d62f-4b69-9f0d-7b66f8350984 " __DATE__ ;
static char __buildInfo[] = "StackToRegisterMappingCogit VMMaker.oscog-eem.1975 uuid: 76250913-236f-47e0-832c-27b05d488807 " __DATE__ ;
char *__cogitBuildInfo = __buildInfo;


Expand Down Expand Up @@ -1317,7 +1317,6 @@ static sqInt expectedFPAlignment;
static sqInt expectedSPAlignment;
static sqInt extA;
static sqInt extB;
static sqInt extBFirstZero;
static sqInt externalPrimCallOffsets[MaxNumArgs + 1];
static sqInt externalPrimJumpOffsets[MaxNumArgs + 1];
static sqInt externalSetPrimOffsets[MaxNumArgs + 1];
Expand Down Expand Up @@ -2872,7 +2871,7 @@ bytecodePCForstartBcpcin(sqInt mcpc, sqInt startbcpc, CogBlockMethod *cogMethod)
sqInt byte;
BytecodeDescriptor *descriptor;
sqInt distance;
sqInt endbcpc;
usqInt endbcpc;
CogMethod *homeMethod;
sqInt isBackwardBranch;
sqInt isInBlock;
Expand Down Expand Up @@ -5333,11 +5332,9 @@ static sqInt
extBBytecode(void)
{
extB = ((extB == 0)
&& ((!extBFirstZero)
&& (byte1 > 0x7F))
&& (byte1 > 0x7F)
? byte1 - 256
: (((usqInt) extB << 8)) + byte1);
extBFirstZero = extB == 0;
return 0;
}

Expand Down Expand Up @@ -8420,7 +8417,7 @@ mcPCForBackwardBranchstartBcpcin(sqInt bcpc, sqInt startbcpc, CogBlockMethod *co
sqInt byte;
BytecodeDescriptor *descriptor;
sqInt distance;
sqInt endbcpc;
usqInt endbcpc;
CogMethod *homeMethod;
sqInt isBackwardBranch;
sqInt isInBlock;
Expand Down Expand Up @@ -21282,7 +21279,7 @@ instructionSizeAt(AbstractInstruction * self_in_instructionSizeAt, sqInt pc)
static sqInt NoDbgRegParms
is32BitSignedImmediate(AbstractInstruction * self_in_is32BitSignedImmediate, sqInt a64BitUnsignedOperand)
{
return (((int) a64BitUnsignedOperand)) == (((long) a64BitUnsignedOperand));
return (((int) a64BitUnsignedOperand)) == (((sqLong) a64BitUnsignedOperand));
}


Expand Down Expand Up @@ -22689,9 +22686,7 @@ genExtPushIntegerBytecode(void)
{
sqInt value;

value = byte1 + (((usqInt) ((extB > 0x7F
? extB - 256
: extB)) << 8));
value = byte1 + (((sqInt)((usqInt)(extB) << 8)));
extB = 0;
return genPushLiteral(((value << 3) | 1));
}
Expand Down Expand Up @@ -23018,9 +23013,7 @@ genExtUnconditionalJump(void)
sqInt distance;
sqInt target;

distance = byte1 + (((usqInt) ((extB > 0x7F
? extB - 256
: extB)) << 8));
distance = byte1 + (((sqInt)((usqInt)(extB) << 8)));
assert(distance == (v4LongBranchDistance(generatorAt(byte0), bytecodePC, ((extA != 0
? 1
: 0)) + ((extB != 0
Expand Down Expand Up @@ -23775,7 +23768,7 @@ mapPCDataForinto(CogMethod *cogMethod, sqInt arrayObj)
CogBlockMethod *cogMethod1;
BytecodeDescriptor *descriptor;
sqInt distance;
sqInt endbcpc;
usqInt endbcpc;
sqInt errCode;
CogMethod *homeMethod;
sqInt isBackwardBranch;
Expand Down Expand Up @@ -24897,7 +24890,7 @@ v4LongBranchDistance(BytecodeDescriptor *descriptor, sqInt pc, sqInt nExts, sqIn
}
extBValue = extBValue1;

return (fetchByteofObject(pc + 1, aMethodObj)) + (((usqInt) extBValue << 8));
return (fetchByteofObject(pc + 1, aMethodObj)) + (((sqInt)((usqInt)(extBValue) << 8)));
}

/* SimpleStackBasedCogit>>#voidCogCompiledCode */
Expand Down Expand Up @@ -28625,7 +28618,6 @@ scanBlock(BlockStart *blockStart)
pc = (blockStart->startpc);
end = ((blockStart->startpc)) + ((blockStart->span));
framelessStackDelta = (nExts = (extA = (extB = 0)));
extBFirstZero = 0;
pushingNils = 1;
while (pc < end) {
byte0 = (fetchByteofObject(pc, methodObj)) + bytecodeSetOffset;
Expand Down Expand Up @@ -28723,7 +28715,6 @@ scanMethod(void)
}
pc = (latestContinuation = initialPC);
numBlocks = (framelessStackDelta = (nExts = (extA = (extB = 0))));
extBFirstZero = 0;
while (pc <= endPC) {
byte0 = (fetchByteofObject(pc, methodObj)) + bytecodeSetOffset;
descriptor = generatorAt(byte0);
Expand Down
41 changes: 17 additions & 24 deletions nsspur64src/vm/cointerp.c
@@ -1,9 +1,9 @@
/* Automatically generated by
CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1972 uuid: 0e6a54ad-d62f-4b69-9f0d-7b66f8350984
CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1975 uuid: 76250913-236f-47e0-832c-27b05d488807
from
CoInterpreter VMMaker.oscog-eem.1972 uuid: 0e6a54ad-d62f-4b69-9f0d-7b66f8350984
CoInterpreter VMMaker.oscog-eem.1975 uuid: 76250913-236f-47e0-832c-27b05d488807
*/
static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.1972 uuid: 0e6a54ad-d62f-4b69-9f0d-7b66f8350984 " __DATE__ ;
static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.1975 uuid: 76250913-236f-47e0-832c-27b05d488807 " __DATE__ ;
char *__interpBuildInfo = __buildInfo;


Expand Down Expand Up @@ -2474,7 +2474,7 @@ static signed char primitiveAccessorDepthTable[MaxPrimitiveIndex + 2 /* 577 */]
};
sqInt checkedPluginName;
char expensiveAsserts = 0;
const char *interpreterVersion = "Newspeak Virtual Machine CoInterpreterPrimitives_VMMaker.oscog-eem.1972";
const char *interpreterVersion = "Newspeak Virtual Machine CoInterpreterPrimitives_VMMaker.oscog-eem.1975";
sqInt minBackwardJumpCountForCompile = MinBackwardJumpCountForCompile /* 40 */;
volatile int sendTrace;

Expand Down Expand Up @@ -2603,7 +2603,6 @@ interpret(void)
sqInt currentBytecode;
sqInt extA;
sqInt extB;
sqInt extBFirstZero;
char * localFP;
char * localIP;
sqInt localReturnValue;
Expand Down Expand Up @@ -2639,8 +2638,6 @@ interpret(void)

/* begin initExtensions */
extA = (extB = 0);
extBFirstZero = 0;

while (1) {
bytecodeDispatchDebugHook();

Expand Down Expand Up @@ -11933,11 +11930,9 @@ interpret(void)
currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector);

extB = ((extB == 0)
&& ((!extBFirstZero)
&& (byte > 0x7F))
&& (byte > 0x7F)
? byte - 256
: (((usqInt) extB << 8)) + byte);
extBFirstZero = extB == 0;
}
break;
case 482: /*226*/
Expand Down Expand Up @@ -12118,9 +12113,7 @@ interpret(void)
sqInt value;

VM_LABEL(extPushIntegerBytecode);
value = (byteAtPointer(++localIP)) + (((usqInt) ((extB > 0x7F
? extB - 256
: extB)) << 8));
value = (byteAtPointer(++localIP)) + (((sqInt)((usqInt)(extB) << 8)));
/* begin fetchNextBytecode */
currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector);

Expand Down Expand Up @@ -13596,9 +13589,7 @@ interpret(void)

VM_LABEL(extUnconditionalJump);
byte = byteAtPointer(++localIP);
offset = byte + (((usqInt) ((extB > 0x7F
? extB - 256
: extB)) << 8));
offset = byte + (((sqInt)((usqInt)(extB) << 8)));
extB = 0;
localIP += offset;
/* begin ifBackwardsCheckForEvents: */
Expand Down Expand Up @@ -17754,7 +17745,7 @@ checkStackIntegrity(void)
sqInt i;
sqInt methodField;
sqInt ok;
sqInt oop;
usqInt oop;
char *theFP;
StackPage *thePage;
char *theSP;
Expand Down Expand Up @@ -28785,13 +28776,15 @@ primitiveClockLogAddresses(void)
sqInt oop1;
sqInt oop2;
sqInt result;
int runInNOut;
sqInt runInNOut;
char *sp;
sqInt uidx;
void *usecs;
sqInt v1;
sqInt v2;


/* bypass type inference which would deduce int */
midx = 0;
msecs = 0;
uidx = 0;
Expand Down Expand Up @@ -40597,7 +40590,7 @@ changeClassOfto(sqInt rcvr, sqInt argClass)
sqInt fmt;
usqInt instBytes;
sqInt instFormat;
usqInt newFormat;
sqInt newFormat;
sqInt normalizedInstFormat;
usqInt numBytes;
usqInt numSlots;
Expand Down Expand Up @@ -40766,7 +40759,7 @@ changeClassOfto(sqInt rcvr, sqInt argClass)
/* begin set:classIndexTo:formatTo: */
assert(((classIndex >= 0) && (classIndex <= (classIndexMask()))));
assert(((newFormat >= 0) && (newFormat <= (formatMask()))));
longAtput(rcvr, ((longAt(rcvr)) & (~((((sqInt)((usqInt)((formatMask())) << (formatShift())))) + (classIndexMask())))) + (classIndex + (newFormat << (formatShift()))));
longAtput(rcvr, ((longAt(rcvr)) & (~((((sqInt)((usqInt)((formatMask())) << (formatShift())))) + (classIndexMask())))) + (classIndex + (((sqInt)((usqInt)(newFormat) << (formatShift()))))));
return 0;
}

Expand Down Expand Up @@ -47792,7 +47785,7 @@ eliminateAndFreeForwardersForPigCompact(void)
{ DECL_MAYBE_SQ_GLOBAL_STRUCT
sqInt address;
sqInt address1;
usqInt bytes;
sqInt bytes;
sqInt endOfFreeRun;
sqInt f;
sqInt firstOfFreeRun;
Expand Down Expand Up @@ -53989,7 +53982,7 @@ maybeSplObj(sqInt index)
static sqInt NoDbgRegParms
moveARunOfObjectsStartingAtupTo(usqInt startAddress, usqInt limit)
{ DECL_MAYBE_SQ_GLOBAL_STRUCT
usqInt chunkBytes;
sqInt chunkBytes;
sqInt classIndex;
sqInt classIndex1;
sqInt dest;
Expand Down Expand Up @@ -59907,7 +59900,7 @@ static void NoDbgRegParms
bridgeFromto(SpurSegmentInfo *aSegment, SpurSegmentInfo *nextSegmentOrNil)
{
usqInt bridgeSpan;
usqInt clifton;
sqInt clifton;
usqInt segEnd;

segEnd = ((aSegment->segSize)) + ((aSegment->segStart));
Expand Down Expand Up @@ -60374,7 +60367,7 @@ shrinkObjectMemory(usqInt delta)
}
else {
if ((shrinkage >= (((seg->segSize)) * 0.75))
&& ((SQABS((((seg->segSize)) - shrinkage))) < delta1)) {
&& ((SQABS((((sqInt) (((seg->segSize)) - shrinkage))))) < delta1)) {
best = seg;
delta1 = SQABS((((seg->segSize)) - shrinkage));
}
Expand Down
2 changes: 1 addition & 1 deletion nsspur64src/vm/cointerp.h
@@ -1,5 +1,5 @@
/* Automatically generated by
CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1972 uuid: 0e6a54ad-d62f-4b69-9f0d-7b66f8350984
CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1975 uuid: 76250913-236f-47e0-832c-27b05d488807
*/


Expand Down

0 comments on commit 7616bcf

Please sign in to comment.