Skip to content

Commit

Permalink
CogVM source as per VMMaker.oscog-eem.2424
Browse files Browse the repository at this point in the history
Cogits.
Fix bad bug in pc mapping of methods containing primitives.
methodUsesPrimitiveErrorCode:header: used the initialPC inst var, rather than
deriving the initialPC of the method parameter.  initialPC is stale/over ripe,
being that of the last JITTED method.  So many methods containing primitives
get their PC mapping wrong.  We haven't noticed this much because primitives
typically succeed.  Nuke an obsolete version of the method.

Have the Spur immutability store generators voidReceiverOptStatus, since with
immutability, stores are suspension pioints (when an immutability check fails)
and so receiverResultReg cannot be assumed to be live after a store.

Remove ssAllocateRequiredRegMask:upThrough:, inlining it into its callers,
ssAllocateCall/RequiredReg:... et al.

Clean up the computation of the register mask in SistaCogit>>genForwardersInlinedIdenticalOrNotIf: et al.
  • Loading branch information
eliotmiranda committed Jul 26, 2018
1 parent 07f1e89 commit d1f3fb1
Show file tree
Hide file tree
Showing 68 changed files with 2,595 additions and 3,500 deletions.
2 changes: 1 addition & 1 deletion nsspur64src/vm/cogit.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* Automatically generated by
CCodeGenerator VMMaker.oscog-eem.2420 uuid: f303796f-283f-4d4c-a910-bf205a0b4600
CCodeGenerator VMMaker.oscog-eem.2424 uuid: 84c4eaef-c4f2-4d8e-85d8-01b8aebfa554
*/


Expand Down
174 changes: 64 additions & 110 deletions nsspur64src/vm/cogitX64SysV.c

Large diffs are not rendered by default.

170 changes: 62 additions & 108 deletions nsspur64src/vm/cogitX64WIN64.c

Large diffs are not rendered by default.

28 changes: 18 additions & 10 deletions nsspur64src/vm/cointerp.c
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
/* Automatically generated by
CCodeGeneratorGlobalStructure VMMaker.oscog-eem.2420 uuid: f303796f-283f-4d4c-a910-bf205a0b4600
CCodeGeneratorGlobalStructure VMMaker.oscog-eem.2424 uuid: 84c4eaef-c4f2-4d8e-85d8-01b8aebfa554
from
CoInterpreter VMMaker.oscog-eem.2420 uuid: f303796f-283f-4d4c-a910-bf205a0b4600
CoInterpreter VMMaker.oscog-eem.2424 uuid: 84c4eaef-c4f2-4d8e-85d8-01b8aebfa554
*/
static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.2420 uuid: f303796f-283f-4d4c-a910-bf205a0b4600 " __DATE__ ;
static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.2424 uuid: 84c4eaef-c4f2-4d8e-85d8-01b8aebfa554 " __DATE__ ;
char *__interpBuildInfo = __buildInfo;


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

Expand Down Expand Up @@ -18056,12 +18056,20 @@ ceSendFromInLineCacheMiss(CogMethod *cogMethodOrPIC)
}


/* For RegisterAllocatingCogit we want the address following a conditional
branch not to be reachable, so we
don't have to generate code to reload registers. Instead simply convert to
an interpreter frame,
backup the pc to the branch, reenter the interpreter and hence retry the
mustBeBoolean send therein. */
/* For RegisterAllocatingCogit we want the pc following a conditional branch
not to be reachable, so
we don't have to generate code to reload registers. But notionally the pc
following a conditional
branch is reached when continuing from a mustBeBoolean error. Instead of
supporting this in the
JIT, simply convert to an interpreter frame, backup the pc to the branch,
reenter the interpreter
and hence retry the mustBeBoolean send therein. N.B. We could do this for
immutability violations
too, but immutability is used in actual applications and so should be
performant, whereas
mustBeBoolean errors are extremely rare and so we choose brevity over
performance in this case. */

/* CoInterpreter>>#ceSendMustBeBooleanTo:interpretingAtDelta: */
void
Expand Down
2 changes: 1 addition & 1 deletion nsspur64src/vm/cointerp.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* Automatically generated by
CCodeGeneratorGlobalStructure VMMaker.oscog-eem.2420 uuid: f303796f-283f-4d4c-a910-bf205a0b4600
CCodeGeneratorGlobalStructure VMMaker.oscog-eem.2424 uuid: 84c4eaef-c4f2-4d8e-85d8-01b8aebfa554
*/


Expand Down
28 changes: 18 additions & 10 deletions nsspur64src/vm/gcc3x-cointerp.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@


/* Automatically generated by
CCodeGeneratorGlobalStructure VMMaker.oscog-eem.2420 uuid: f303796f-283f-4d4c-a910-bf205a0b4600
CCodeGeneratorGlobalStructure VMMaker.oscog-eem.2424 uuid: 84c4eaef-c4f2-4d8e-85d8-01b8aebfa554
from
CoInterpreter VMMaker.oscog-eem.2420 uuid: f303796f-283f-4d4c-a910-bf205a0b4600
CoInterpreter VMMaker.oscog-eem.2424 uuid: 84c4eaef-c4f2-4d8e-85d8-01b8aebfa554
*/
static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.2420 uuid: f303796f-283f-4d4c-a910-bf205a0b4600 " __DATE__ ;
static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.2424 uuid: 84c4eaef-c4f2-4d8e-85d8-01b8aebfa554 " __DATE__ ;
char *__interpBuildInfo = __buildInfo;


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

Expand Down Expand Up @@ -18065,12 +18065,20 @@ ceSendFromInLineCacheMiss(CogMethod *cogMethodOrPIC)
}


/* For RegisterAllocatingCogit we want the address following a conditional
branch not to be reachable, so we
don't have to generate code to reload registers. Instead simply convert to
an interpreter frame,
backup the pc to the branch, reenter the interpreter and hence retry the
mustBeBoolean send therein. */
/* For RegisterAllocatingCogit we want the pc following a conditional branch
not to be reachable, so
we don't have to generate code to reload registers. But notionally the pc
following a conditional
branch is reached when continuing from a mustBeBoolean error. Instead of
supporting this in the
JIT, simply convert to an interpreter frame, backup the pc to the branch,
reenter the interpreter
and hence retry the mustBeBoolean send therein. N.B. We could do this for
immutability violations
too, but immutability is used in actual applications and so should be
performant, whereas
mustBeBoolean errors are extremely rare and so we choose brevity over
performance in this case. */

/* CoInterpreter>>#ceSendMustBeBooleanTo:interpretingAtDelta: */
void
Expand Down
2 changes: 1 addition & 1 deletion nsspursrc/vm/cogit.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* Automatically generated by
CCodeGenerator VMMaker.oscog-eem.2420 uuid: f303796f-283f-4d4c-a910-bf205a0b4600
CCodeGenerator VMMaker.oscog-eem.2424 uuid: 84c4eaef-c4f2-4d8e-85d8-01b8aebfa554
*/


Expand Down

0 comments on commit d1f3fb1

Please sign in to comment.