Skip to content

Commit

Permalink
CogVM source as per VMMaker.oscog-eem.2509
Browse files Browse the repository at this point in the history
StackInterpreter:
Both 64 and 32-bit Spur can and oops together to check for two SmallIntegers.

Cogit:
blockAlignment macro should not take a parameter
Nuke the obsolete pushClosureTempsBytecode.
  • Loading branch information
eliotmiranda committed Jan 21, 2019
1 parent 5a38b34 commit 0bd10a5
Show file tree
Hide file tree
Showing 51 changed files with 1,055 additions and 1,588 deletions.
4 changes: 2 additions & 2 deletions nsspur64src/vm/cogit.h
@@ -1,5 +1,5 @@
/* Automatically generated by
CCodeGenerator VMMaker.oscog-eem.2504 uuid: a00b0fad-c04c-47a6-8a11-5dbff110ac11
CCodeGenerator VMMaker.oscog-eem.2509 uuid: 91e81f64-95de-4914-a960-8f842be3a194
*/


Expand Down Expand Up @@ -136,7 +136,7 @@ VM_EXPORT sqInt traceStores;


/*** Macros ***/
#define blockAlignment(self) 8
#define blockAlignment() 8
#define breakOnImplicitReceiver() (traceFlags & 64)
#define ceBaseFrameReturnPC() ceBaseFrameReturnTrampoline
#define ceCannotResumePC() ((usqInt)ceCannotResumeTrampoline)
Expand Down
27 changes: 5 additions & 22 deletions nsspur64src/vm/cogitX64SysV.c
@@ -1,9 +1,9 @@
/* Automatically generated by
CCodeGenerator VMMaker.oscog-eem.2504 uuid: a00b0fad-c04c-47a6-8a11-5dbff110ac11
CCodeGenerator VMMaker.oscog-eem.2509 uuid: 91e81f64-95de-4914-a960-8f842be3a194
from
StackToRegisterMappingCogit VMMaker.oscog-eem.2504 uuid: a00b0fad-c04c-47a6-8a11-5dbff110ac11
StackToRegisterMappingCogit VMMaker.oscog-eem.2509 uuid: 91e81f64-95de-4914-a960-8f842be3a194
*/
static char __buildInfo[] = "StackToRegisterMappingCogit VMMaker.oscog-eem.2504 uuid: a00b0fad-c04c-47a6-8a11-5dbff110ac11 " __DATE__ ;
static char __buildInfo[] = "StackToRegisterMappingCogit VMMaker.oscog-eem.2509 uuid: 91e81f64-95de-4914-a960-8f842be3a194 " __DATE__ ;
char *__cogitBuildInfo = __buildInfo;


Expand Down Expand Up @@ -1072,7 +1072,6 @@ static sqInt NoDbgRegParms genLookupForPerformNumArgs(sqInt numArgs);
static AbstractInstruction * NoDbgRegParms genMoveConstantR(sqInt constant, sqInt reg);
static sqInt NoDbgRegParms genMustBeBooleanTrampolineForcalled(sqInt boolean, char *trampolineName);
static void NoDbgRegParms genPrimReturnEnterCogCodeEnilopmart(sqInt profiling);
static sqInt genPushClosureTempsBytecode(void);
static sqInt genPushConstantFalseBytecode(void);
static sqInt genPushConstantNilBytecode(void);
static sqInt genPushConstantOneBytecode(void);
Expand Down Expand Up @@ -1974,7 +1973,7 @@ static usqInt youngReferrers;
blockStarts = (numBlocks) ? alloca(sizeof(BlockStart) * (numBlocks)) : 0; \
} while (0)
#define backEnd() backEnd
#define blockAlignment(self) 8
#define blockAlignment() 8
#define blockStartAt(index) (&blockStarts[index])
#define breakOnImplicitReceiver() (traceFlags & 64)
#define ceBaseFrameReturnPC() ceBaseFrameReturnTrampoline
Expand Down Expand Up @@ -25316,21 +25315,6 @@ genPrimReturnEnterCogCodeEnilopmart(sqInt profiling)
}
}


/* SistaV1: 230 11100110 iiiiiiii PushNClosureTemps iiiiiiii */

/* SimpleStackBasedCogit>>#genPushClosureTempsBytecode */
static sqInt
genPushClosureTempsBytecode(void)
{
sqInt i;

for (i = 1; i <= byte1; i += 1) {
genPushLiteral(nilObject());
}
return 0;
}

/* SimpleStackBasedCogit>>#genPushConstantFalseBytecode */
static sqInt
genPushConstantFalseBytecode(void)
Expand Down Expand Up @@ -31079,8 +31063,7 @@ scanBlock(BlockStart *blockStart)
Rarely we may end up over-estimating. We will correct by checking the stack depth
at the end of the block in compileBlockBodies. */
if (((numPushNils = numPushNilsFunction(descriptor, pc, nExts, methodObj))) > 0) {
assert((((descriptor->numBytes)) == 1)
|| (((descriptor->generator)) == genPushClosureTempsBytecode));
assert(((descriptor->numBytes)) == 1);
(blockStart->numInitialNils = ((blockStart->numInitialNils)) + numPushNils);
}
else {
Expand Down
27 changes: 5 additions & 22 deletions nsspur64src/vm/cogitX64WIN64.c
@@ -1,9 +1,9 @@
/* Automatically generated by
CCodeGenerator VMMaker.oscog-eem.2504 uuid: a00b0fad-c04c-47a6-8a11-5dbff110ac11
CCodeGenerator VMMaker.oscog-eem.2509 uuid: 91e81f64-95de-4914-a960-8f842be3a194
from
StackToRegisterMappingCogit VMMaker.oscog-eem.2504 uuid: a00b0fad-c04c-47a6-8a11-5dbff110ac11
StackToRegisterMappingCogit VMMaker.oscog-eem.2509 uuid: 91e81f64-95de-4914-a960-8f842be3a194
*/
static char __buildInfo[] = "StackToRegisterMappingCogit VMMaker.oscog-eem.2504 uuid: a00b0fad-c04c-47a6-8a11-5dbff110ac11 " __DATE__ ;
static char __buildInfo[] = "StackToRegisterMappingCogit VMMaker.oscog-eem.2509 uuid: 91e81f64-95de-4914-a960-8f842be3a194 " __DATE__ ;
char *__cogitBuildInfo = __buildInfo;


Expand Down Expand Up @@ -1072,7 +1072,6 @@ static sqInt NoDbgRegParms genLookupForPerformNumArgs(sqInt numArgs);
static AbstractInstruction * NoDbgRegParms genMoveConstantR(sqInt constant, sqInt reg);
static sqInt NoDbgRegParms genMustBeBooleanTrampolineForcalled(sqInt boolean, char *trampolineName);
static void NoDbgRegParms genPrimReturnEnterCogCodeEnilopmart(sqInt profiling);
static sqInt genPushClosureTempsBytecode(void);
static sqInt genPushConstantFalseBytecode(void);
static sqInt genPushConstantNilBytecode(void);
static sqInt genPushConstantOneBytecode(void);
Expand Down Expand Up @@ -1974,7 +1973,7 @@ static usqInt youngReferrers;
blockStarts = (numBlocks) ? alloca(sizeof(BlockStart) * (numBlocks)) : 0; \
} while (0)
#define backEnd() backEnd
#define blockAlignment(self) 8
#define blockAlignment() 8
#define blockStartAt(index) (&blockStarts[index])
#define breakOnImplicitReceiver() (traceFlags & 64)
#define ceBaseFrameReturnPC() ceBaseFrameReturnTrampoline
Expand Down Expand Up @@ -25345,21 +25344,6 @@ genPrimReturnEnterCogCodeEnilopmart(sqInt profiling)
}
}


/* SistaV1: 230 11100110 iiiiiiii PushNClosureTemps iiiiiiii */

/* SimpleStackBasedCogit>>#genPushClosureTempsBytecode */
static sqInt
genPushClosureTempsBytecode(void)
{
sqInt i;

for (i = 1; i <= byte1; i += 1) {
genPushLiteral(nilObject());
}
return 0;
}

/* SimpleStackBasedCogit>>#genPushConstantFalseBytecode */
static sqInt
genPushConstantFalseBytecode(void)
Expand Down Expand Up @@ -31108,8 +31092,7 @@ scanBlock(BlockStart *blockStart)
Rarely we may end up over-estimating. We will correct by checking the stack depth
at the end of the block in compileBlockBodies. */
if (((numPushNils = numPushNilsFunction(descriptor, pc, nExts, methodObj))) > 0) {
assert((((descriptor->numBytes)) == 1)
|| (((descriptor->generator)) == genPushClosureTempsBytecode));
assert(((descriptor->numBytes)) == 1);
(blockStart->numInitialNils = ((blockStart->numInitialNils)) + numPushNils);
}
else {
Expand Down

0 comments on commit 0bd10a5

Please sign in to comment.