[BinAST] Do not clone list node in appendDirectivesToBody

RESOLVED FIXED in Firefox 65

Status

()

enhancement
P3
normal
RESOLVED FIXED
6 months ago
5 months ago

People

(Reporter: arai, Assigned: arai)

Tracking

(Blocks 1 bug)

Trunk
mozilla65
Points:
---

Firefox Tracking Flags

(firefox65 fixed)

Details

Attachments

(1 attachment)

(Assignee)

Description

6 months ago
Now BinASTParser::appendDirectivesToBody creates a clone of body list node, and appends all contents to new one.
We can skip those steps by prepending directives to existing body.
this should benefit especially for the case body is long.
(Assignee)

Updated

6 months ago
Assignee: nobody → arai.unmht
Status: NEW → ASSIGNED
Priority: -- → P3
(Assignee)

Comment 1

6 months ago
Renamed appendDirectivesToBody to prependDirectivesToBody (given we're actually prepend them).

Now it prepends directives to the passed body, without cloning it.
It uses helper method prependDirectivesImpl to prepend in the reverse order, recursively.
Attachment #9023181 - Flags: review?(dteller)
Comment on attachment 9023181 [details] [diff] [review]
Do not clone list node in appendDirectivesToBody.

Review of attachment 9023181 [details] [diff] [review]:
-----------------------------------------------------------------

lgtm, thanks!
Attachment #9023181 - Flags: review?(dteller) → review+

Comment 4

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