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
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
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
Javier Neira
GHC
Commits
2e63a0fb
Commit
2e63a0fb
authored
4 years ago
by
davide
Committed by
Marge Bot
4 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Add code comments for StgInfoTable and StgStack structs
parent
fa344d33
Loading
Loading
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
includes/rts/storage/Closures.h
+5
-0
5 additions, 0 deletions
includes/rts/storage/Closures.h
includes/rts/storage/TSO.h
+14
-2
14 additions, 2 deletions
includes/rts/storage/TSO.h
with
19 additions
and
2 deletions
includes/rts/storage/Closures.h
+
5
−
0
View file @
2e63a0fb
...
...
@@ -63,6 +63,11 @@ typedef struct {
-------------------------------------------------------------------------- */
typedef
struct
{
// If TABLES_NEXT_TO_CODE is defined, then `info` is offset by
// `sizeof(StgInfoTable)` and so points to the `code` field of the
// StgInfoTable! You may want to use `get_itbl` to get the pointer to the
// start of the info table. See
// https://gitlab.haskell.org/ghc/ghc/-/wikis/commentary/rts/storage/heap-objects#tables_next_to_code.
const
StgInfoTable
*
info
;
#if defined(PROFILING)
StgProfHeader
prof
;
...
...
This diff is collapsed.
Click to expand it.
includes/rts/storage/TSO.h
+
14
−
2
View file @
2e63a0fb
...
...
@@ -242,10 +242,22 @@ typedef struct StgTSO_ {
typedef
struct
StgStack_
{
StgHeader
header
;
StgWord32
stack_size
;
// stack size in *words*
/* Size of the `stack` field in *words*. This is not affected by how much of
* the stack space is used, nor if more stack space is linked to by an
* UNDERFLOW_FRAME.
*/
StgWord32
stack_size
;
StgWord8
dirty
;
// non-zero => dirty
StgWord8
marking
;
// non-zero => someone is currently marking the stack
StgPtr
sp
;
// current stack pointer
/* Pointer to the "top" of the stack i.e. the most recently written address.
* The stack is filled downwards, so the "top" of the stack starts with `sp
* = stack + stack_size` and is decremented as the stack fills with data.
* See comment on "Invariants" below.
*/
StgPtr
sp
;
StgWord
stack
[];
}
StgStack
;
...
...
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