Skip to content

Commit d1f3fb1

Browse files
committed
CogVM source as per VMMaker.oscog-eem.2424
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.
1 parent 07f1e89 commit d1f3fb1

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+2595
-3500
lines changed

nsspur64src/vm/cogit.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* Automatically generated by
2-
CCodeGenerator VMMaker.oscog-eem.2420 uuid: f303796f-283f-4d4c-a910-bf205a0b4600
2+
CCodeGenerator VMMaker.oscog-eem.2424 uuid: 84c4eaef-c4f2-4d8e-85d8-01b8aebfa554
33
*/
44

55

nsspur64src/vm/cogitX64SysV.c

Lines changed: 64 additions & 110 deletions
Large diffs are not rendered by default.

nsspur64src/vm/cogitX64WIN64.c

Lines changed: 62 additions & 108 deletions
Large diffs are not rendered by default.

nsspur64src/vm/cointerp.c

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
/* Automatically generated by
2-
CCodeGeneratorGlobalStructure VMMaker.oscog-eem.2420 uuid: f303796f-283f-4d4c-a910-bf205a0b4600
2+
CCodeGeneratorGlobalStructure VMMaker.oscog-eem.2424 uuid: 84c4eaef-c4f2-4d8e-85d8-01b8aebfa554
33
from
4-
CoInterpreter VMMaker.oscog-eem.2420 uuid: f303796f-283f-4d4c-a910-bf205a0b4600
4+
CoInterpreter VMMaker.oscog-eem.2424 uuid: 84c4eaef-c4f2-4d8e-85d8-01b8aebfa554
55
*/
6-
static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.2420 uuid: f303796f-283f-4d4c-a910-bf205a0b4600 " __DATE__ ;
6+
static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.2424 uuid: 84c4eaef-c4f2-4d8e-85d8-01b8aebfa554 " __DATE__ ;
77
char *__interpBuildInfo = __buildInfo;
88

99

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

@@ -18056,12 +18056,20 @@ ceSendFromInLineCacheMiss(CogMethod *cogMethodOrPIC)
1805618056
}
1805718057

1805818058

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

1806618074
/* CoInterpreter>>#ceSendMustBeBooleanTo:interpretingAtDelta: */
1806718075
void

nsspur64src/vm/cointerp.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* Automatically generated by
2-
CCodeGeneratorGlobalStructure VMMaker.oscog-eem.2420 uuid: f303796f-283f-4d4c-a910-bf205a0b4600
2+
CCodeGeneratorGlobalStructure VMMaker.oscog-eem.2424 uuid: 84c4eaef-c4f2-4d8e-85d8-01b8aebfa554
33
*/
44

55

nsspur64src/vm/gcc3x-cointerp.c

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22

33

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

1212

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

@@ -18065,12 +18065,20 @@ ceSendFromInLineCacheMiss(CogMethod *cogMethodOrPIC)
1806518065
}
1806618066

1806718067

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

1807518083
/* CoInterpreter>>#ceSendMustBeBooleanTo:interpretingAtDelta: */
1807618084
void

nsspursrc/vm/cogit.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* Automatically generated by
2-
CCodeGenerator VMMaker.oscog-eem.2420 uuid: f303796f-283f-4d4c-a910-bf205a0b4600
2+
CCodeGenerator VMMaker.oscog-eem.2424 uuid: 84c4eaef-c4f2-4d8e-85d8-01b8aebfa554
33
*/
44

55

0 commit comments

Comments
 (0)