Closed Bug 407327 Opened 18 years ago Closed 4 years ago

JSOP_DEFFUN: Optimizing js_CheckRedeclaration/OBJ_DEFINE_PROPERTY sequnce

Categories

(Core :: JavaScript Engine, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED INCOMPLETE

People

(Reporter: igor, Unassigned)

References

Details

Currently JSOP_DEFUN case in the interpreter calls js_CheckRedeclaration followed by OBJ_DEFINE_PROPERTY. Both calls will do a property lookup. It would be nice to combine both calls so the property lookup will be done only once.
Depends on: 406477
OBJ_DEFINE_PROPERTY => js_DefineNativeProperty (via js_DefineProperty), but js_DefineNativeProperty calls js_LookupProperty iff a getter or setter is being defined, which can happen via JSOP_DEFFUN (top-level getter function foo(){}, etc. -- rare these days). Is this the lookup you mean, or just the scope search? /be
(In reply to comment #1) > Is this the lookup you mean, or just the scope search? I meant the scope search done by js_AddScopeProperty when js_DefineNativeProperty calls it.
Assignee: general → nobody
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.