[hazard] Use mangled names everywhere

RESOLVED FIXED in Firefox 64

Status

()

enhancement
P3
normal
RESOLVED FIXED
10 months ago
7 months ago

People

(Reporter: sfink, Assigned: sfink)

Tracking

(Blocks 1 bug)

unspecified
mozilla64
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox64 fixed)

Details

Attachments

(1 attachment)

Assignee

Description

10 months ago
I continue to have missing callgraph edges because the calling side and the called side have slightly different names for types.
Assignee

Comment 1

10 months ago
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)
Assignee

Updated

10 months ago
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+
Assignee

Comment 3

10 months ago
(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.
Assignee

Updated

8 months ago
Priority: -- → P3

Comment 4

7 months ago
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

Comment 5

7 months ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/a188327354ab
Status: ASSIGNED → RESOLVED
Last Resolved: 7 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla64
You need to log in before you can comment on or make changes to this bug.