Closed Bug 585930 Opened 16 years ago Closed 3 years ago

Replacing stub functions with NULL

Categories

(Core :: JavaScript Engine, enhancement)

enhancement

Tracking

()

RESOLVED FIXED

People

(Reporter: igor, Unassigned)

Details

Current to define a JS class SM requires to use a few stub functions like JSPropertyStub, JSREsolveStub etc. to refer to the default implementation, not NULL. The idea was to avoid taking a branch when calling JSClass methods. But in practice due to specialization the code queries for such stub methods in any case so not-null stubs just adds code bloat and increases loading time due to the need to resolve stub pointers in the class structs. So the idea is to define stubs to be NULL. This should be source-compatible with the current embeddings unless they call the stubs functions themselves. But in the latter case the code can be fixed to check for a stub pointer and avoid the call if so. The altered code should continue to against null stubs and non-null stubs.
Assignee: igor → general
Assignee: general → nobody
Severity: normal → S3
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.