Closed Bug 1479965 Opened 7 years ago Closed 6 years ago

[hazard] Use mangled names everywhere

Categories

(Core :: JavaScript: GC, enhancement, P3)

enhancement

Tracking

()

RESOLVED FIXED
mozilla64
Tracking Status
firefox64 --- fixed

People

(Reporter: sfink, Assigned: sfink)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

I continue to have missing callgraph edges because the calling side and the called side have slightly different names for types.
Do what I should have done long ago: use mangled names everywhere, recording unmangled names for pattern matching and human-readable outputs.
Attachment #8996515 - Flags: review?(jcoppeard)
Blocks: 1480927
Comment on attachment 8996515 [details] [diff] [review] Use mangled names everywhere, recording unmangled names for pattern matching and human-readable outputs Review of attachment 8996515 [details] [diff] [review]: ----------------------------------------------------------------- ::: js/src/devtools/rootAnalysis/computeCallgraph.js @@ +29,5 @@ > + if (id !== undefined) > + return id; > + > + id = memoized.size + 1; > + memoized.set(name, "" + id); I'm not sure why you're doing |"" + id| here. @@ +39,1 @@ > function memo(name) memo and memo_data could use some more descriptive names.
Attachment #8996515 - Flags: review?(jcoppeard) → review+
(In reply to Jon Coppeard (:jonco) from comment #2) > Comment on attachment 8996515 [details] [diff] [review] > Use mangled names everywhere, recording unmangled names for pattern matching > and human-readable outputs > > Review of attachment 8996515 [details] [diff] [review]: > ----------------------------------------------------------------- > > ::: js/src/devtools/rootAnalysis/computeCallgraph.js > @@ +29,5 @@ > > + if (id !== undefined) > > + return id; > > + > > + id = memoized.size + 1; > > + memoized.set(name, "" + id); > > I'm not sure why you're doing |"" + id| here. I don't remember exactly, but I think it was because I wrote out a JSON data structure containing ids, then read it back into Python. I also read in callgraph.txt, parsing it by splitting up a string or perhaps parsing it with a regex. Lookups on the table I built from the regex never found any of the things I read in from the JSON, because the JSON ids were numbers but the parsed ids were strings. So I decided to make ids always be strings. I guess it would be better to go the other way and make ids always be integers. It should use a bit less memory. > @@ +39,1 @@ > > function memo(name) > > memo and memo_data could use some more descriptive names. Agreed, I'll rename them.
Priority: -- → P3
Pushed by sfink@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/a188327354ab Use mangled names everywhere, recording unmangled names for pattern matching and human-readable outputs, r=jonco
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla64
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: