Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
GHC
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Gesh
GHC
Commits
9736b607
Commit
9736b607
authored
28 years ago
by
sof
Browse files
Options
Downloads
Patches
Plain Diff
[project @ 1997-03-14 05:00:47 by sof]
Stk underflow fix (HWL)
parent
3aa6eac7
Loading
Loading
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
ghc/runtime/main/StgThreads.lhc
+46
-1
46 additions, 1 deletion
ghc/runtime/main/StgThreads.lhc
with
46 additions
and
1 deletion
ghc/runtime/main/StgThreads.lhc
+
46
−
1
View file @
9736b607
...
...
@@ -356,7 +356,7 @@ DO_RETURN_TEMPLATE(UnderflowVect7, ((P_)RetReg)[RVREL(7)])
DO_RETURN_TEMPLATE(StackUnderflowEnterNode, EnterNodeCode)
#else
#else
/* PAR */
\end{code}
...
...
@@ -436,6 +436,9 @@ STGFUN(PrimUnderflow)
* because R2 is dead, and R1 points to a PAP. Only R1 is live.
*/
#if 0
/* old version of the code */
STGFUN(StackUnderflowEnterNode)
{
FB_
...
...
@@ -445,8 +448,50 @@ STGFUN(StackUnderflowEnterNode)
FE_
}
#else
/*
We've inlined CommonUnderFlow because setting RetReg would zap
the return vector that the node needs.
We pick up the RetReg from the STkO header instead.
KH/HWL 14/2/97
*/
STGFUN(StackUnderflowEnterNode)
{
P_ temp;
FB_
RetReg = STKO_RETURN(StkOReg); /* pick up return code from the StkO hdr
needed because we come from UpdatePAP */
LivenessReg = LIVENESS_R1;
temp = STKO_LINK(StkOReg);
/*? fprintf(stderr,"Stk Underflow from: %lx to: %lx size abandoned: %d\n",StkOReg,temp,STKO_CLOSURE_CTS_SIZE(StkOReg)); ?*/
/* change the guy we are abandoning into something
that will not be "interesting" on the mutables
list. (As long as it is there, it will be
scavenged in GC, and we cannot guarantee that
it is still a "sane" StkO object). (And, besides,
why continue to keep it [and all it pts to] alive?)
Will & Phil 95/10
*/
FREEZE_MUT_HDR(StkOReg, ImMutArrayOfPtrs_info);
MUTUPLE_CLOSURE_SIZE(StkOReg) = MUTUPLE_VHS;
StkOReg = temp;
/* ToDo: Fetch the remote stack object here! */
RestoreStackStgRegs();
JMP_(EnterNodeCode); /* this will enter a PAP containing the old stkos
A and B stacks */
FE_
}
#endif
#endif /* !PAR */
const W_
vtbl_Underflow[] = {
/* "MAX_VECTORED_RTN" elements (see GhcConstants.lh) */
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment