Closed Bug 244921 Opened 21 years ago Closed 21 years ago

tweak nsGenericHTMLElement for code size

Categories

(Core :: DOM: Core & HTML, defect, P1)

defect

Tracking

()

RESOLVED FIXED

People

(Reporter: roc, Assigned: roc)

Details

Attachments

(1 file, 1 obsolete file)

The DOM attribute mapping macros can be improved slightly by using slightly better helpers. Patch coming up.
Attached patch fix (obsolete) — Splinter Review
0) Add helpers for every situation 1) ensure that all helpers return NS_OK when appropriate, so all macro methods can do a tail call. This may help some compilers to tail-call optimizations. 2) pass only the minimum number of parameters to each helper 3) pass a const char* to GetAttrWithDefault to avoid NS_LITERAL usage.
Attachment #149469 - Flags: superreview?(jst)
Attachment #149469 - Flags: review?(jst)
Attached patch fix2Splinter Review
fix compiler error
Attachment #149473 - Flags: superreview?(jst)
Attachment #149473 - Flags: review?(jst)
Comment on attachment 149473 [details] [diff] [review] fix2 Got any savings numbers (no sweat if you don't)? r+sr=jst
Attachment #149473 - Flags: superreview?(jst)
Attachment #149473 - Flags: superreview+
Attachment #149473 - Flags: review?(jst)
Attachment #149473 - Flags: review+
Attachment #149469 - Flags: superreview?(jst)
Attachment #149469 - Flags: review?(jst)
I was hoping to get some from Tinderbox :-)
This saved 3-4K of code. It also caused a slowdown on btek, although not on other tinderboxes. I'm not sure what the deal is. I'll probably back this out.
Backed out.
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → WONTFIX
Backing it out didn't seem to fix btek. So I'm putting it back in.
Status: RESOLVED → REOPENED
Resolution: WONTFIX → ---
Status: REOPENED → RESOLVED
Closed: 21 years ago21 years ago
Resolution: --- → FIXED
Component: DOM: Core → DOM: Core & HTML
QA Contact: ian → general
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: