Closed Bug 838361 Opened 12 years ago Closed 12 years ago

BaselineCompiler: Use identity comparison on type tests for singleton objects

Categories

(Core :: JavaScript Engine, defect)

Other Branch
x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: bhackett1024, Unassigned)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

Attached patch patch (deleted) — Splinter Review
When generating IC stubs to test whether objects have a type that has seen before, the type of singleton objects is explicitly instantiated with a getType(cx) call. Instead, an identity comparison on the input object can be used. Doing the identity comparison is preferable because (a) it requires one less load, and more importantly (b) instantiating singleton types can bloat memory usage unnecessarily. Many objects with lazy singleton types will flow around the program without any need to ever instantiate the type.
Attachment #710418 - Flags: review?(kvijayan)
Comment on attachment 710418 [details] [diff] [review] patch Review of attachment 710418 [details] [diff] [review]: ----------------------------------------------------------------- Good find.
Attachment #710418 - Flags: review?(kvijayan) → review+
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: