[Git][ghc/ghc][master] Minor RTS refactoring:

Marge Bot gitlab at gitlab.haskell.org
Thu Apr 25 18:41:14 UTC 2019



 Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC


Commits:
4e228267 by Ömer Sinan Ağacan at 2019-04-25T18:35:09Z
Minor RTS refactoring:

- Remove redundant casting in evacuate_static_object
- Remove redundant parens in STATIC_LINK
- Fix a typo in GC.c

- - - - -


3 changed files:

- includes/rts/storage/ClosureMacros.h
- rts/sm/Evac.c
- rts/sm/GC.c


Changes:

=====================================
includes/rts/storage/ClosureMacros.h
=====================================
@@ -184,8 +184,8 @@ STATIC_LINK(const StgInfoTable *info, StgClosure *p)
     case IND_STATIC:
         return IND_STATIC_LINK(p);
     default:
-        return &(p)->payload[info->layout.payload.ptrs +
-                             info->layout.payload.nptrs];
+        return &p->payload[info->layout.payload.ptrs +
+                           info->layout.payload.nptrs];
     }
 }
 


=====================================
rts/sm/Evac.c
=====================================
@@ -333,7 +333,7 @@ evacuate_static_object (StgClosure **link_field, StgClosure *q)
     StgWord link = (StgWord)*link_field;
 
     // See Note [STATIC_LINK fields] for how the link field bits work
-    if ((((StgWord)(link)&STATIC_BITS) | prev_static_flag) != 3) {
+    if (((link & STATIC_BITS) | prev_static_flag) != 3) {
         StgWord new_list_head = (StgWord)q | static_flag;
 #if !defined(THREADED_RTS)
         *link_field = gct->static_objects;


=====================================
rts/sm/GC.c
=====================================
@@ -281,7 +281,7 @@ GarbageCollect (uint32_t collect_gen,
       // lose locality by moving cached data into another CPU's cache
       // (this effect can be quite significant).
       //
-      // We could have a more complex way to deterimine whether to do
+      // We could have a more complex way to determine whether to do
       // work stealing or not, e.g. it might be a good idea to do it
       // if the heap is big.  For now, we just turn it on or off with
       // a flag.



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/commit/4e22826716dc0d3b4ab8bdd538c569a280cd8083

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/commit/4e22826716dc0d3b4ab8bdd538c569a280cd8083
You're receiving this email because of your account on gitlab.haskell.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20190425/9664a0af/attachment-0001.html>


More information about the ghc-commits mailing list