Closed Bug 477052 Opened 16 years ago Closed 16 years ago

Make some nanojit classes initialize their members

Categories

(Core :: JavaScript Engine, defect)

Other Branch
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: jorendorff, Assigned: jorendorff)

Details

(Keywords: fixed1.9.1)

Attachments

(1 file)

We go through the silliness of allocating our nanojit objects with an avmplus::GC, but the only reason for that is that LirBuffer's constructor (and maybe others) doesn't initialize its members. All the GC does is zero them. Low priority but I find this embarrassing.
Second this, IIRC Adobe wanted it to be optional so we'd have to #ifdef it.
Attached patch v1Splinter Review
The "#ifndef __MMgc__" here is because of comment 1. I didn't bother in the case of LirBuffer or Fragmento, as I think they are long-lived and so the performance of the constructor doesn't matter.
Assignee: general → jorendorff
Status: NEW → ASSIGNED
Attachment #361564 - Flags: review?(gal)
Attachment #361564 - Flags: review?(edwsmith)
Attachment #361564 - Flags: review?(edwsmith) → review+
Comment on attachment 361564 [details] [diff] [review] v1 you're right that it's both embarrasing and low priority. in terms of code size there are plenty other places we can reduce before size of initializers really matters. (cough) macros. no #ifdef necessary.
Attachment #361564 - Flags: review?(gal) → review+
Pushed to the Tracemonkey branch. http://hg.mozilla.org/tracemonkey/rev/780189ed095c
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Flags: in-testsuite-
Flags: in-litmus-
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: