Bug 166988 - Heap uses pointers way too much
Summary: Heap uses pointers way too much
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks: 165909
  Show dependency treegraph
 
Reported: 2017-01-12 14:49 PST by Filip Pizlo
Modified: 2017-01-12 14:52 PST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Filip Pizlo 2017-01-12 14:49:21 PST
The Heap uses pointers in a lot of places where we would ordinarily use references.  In JSC we use references when:

- Not pointing to the JSC heap.  (Most of Heap's pointers are not heap pointers.)
- The pointer is immutable.
- Using references would not introduce lots of * to & (and vice-versa) conversions.
- The pointer is non-null.

Under these rules, we could move most of Heap's pointers to references.  I think we should do it all at once or in a short burst of patches right next to each other.
Comment 1 Filip Pizlo 2017-01-12 14:52:43 PST
I'm going to use this bug for planting FIXMEs at all of the Heap's undesirable uses of pointers.  I don't want to change this code right now because I have bigger fish to fry, but I want a way to track all of the places that bother me.