Closed Bug 566143 Opened 15 years ago Closed 3 years ago

Eliminate Shape from ObjectOps API

Categories

(Core :: JavaScript Engine, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME
Tracking Status
blocking2.0 --- -

People

(Reporter: gal, Unassigned)

References

Details

Its a hazard when objects change nativeness and without it we can also get rid of dropProperty if we play our cards right.
Assignee: general → gal
Blocks: 566818
No longer blocks: 566818
gal, do you work on this? I would like to eliminate at least the drop method as the first step with the ultimate goal of avoiding recursive lookupProperty calls on non-native prototypes in js_LookupProperty and friends.
We can buddy up on this. I am planning major surgery on this, but we can do it in steps. My goal was to eliminate lookupProperty/dropProperty/get+setAttributes and replace them with hasProperty/getPropertyDescriptor/setPropertyDescriptor (getting/setting via JSPropertyDescriptor). get/setPropertyDescriptor will do its own lookup. JSScopeProperty is no longer exposed. Basically we will mirror the level of abstraction of procies with a few mild modifications and simplifications (merging enumerate and enumerateOwn) for example. I am also trying to figure out whether to do the proto walk inside or outside the API. Both has merit. Proxies (and e4x) want to lookup along proto on their own (or in case of e4x skip to NULL and stop the lookup). I was thinking maybe I will return the proto to consult next, then the loop is outside the api, but the api can stop the lookup.
Depends on: 566836
blocking2.0: --- → betaN+
No activity in a long time. Are we still doing this?
Yeah, but not for FF4 and we found a way around this for swap.
blocking2.0: betaN+ → -
No longer blocks: harmony:proxy
It isn't clear to me whether this bug is still relevant. Is it?
(In reply to David Bruant from comment #5) > It isn't clear to me whether this bug is still relevant. Is it? NI?ing Jason.
Flags: needinfo?(jorendorff)
Barely relevant. I think the right way to interpret this now is to s/JSProperty/js::Shape/, at which point the only remaining op is lookupProperty. Once that operation dies, we can consider this bug fixed. Looking now, it appears at a skim that lookupProperty and LookupProperty and friends are basically used only for scope lookups of a name. I'm not sure how much work it would be to remove that, just yet, but certainly we're closer to it than we've ever been.
Summary: Eliminate JSProperty from ObjectOps api → Eliminate Shape from ObjectOps API
Flags: needinfo?(jorendorff)

The bug assignee didn't login in Bugzilla in the last 7 months.
:sdetar, could you have a look please?
For more information, please visit auto_nag documentation.

Assignee: gal → nobody
Flags: needinfo?(sdetar)

lookupProperty now uses PropertyResult* instead of Shape.

We should get rid of lookupProperty at some point, but I don't think we should keep this bug open for that.

Status: NEW → RESOLVED
Closed: 3 years ago
Flags: needinfo?(sdetar)
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.