On 3/27/15 9:24 AM, obastemur wrote:
AFAIK all the getter setter stuff are moved from JS_DefineProperty.. to JSNative types.
Correct. JSPropertyOp is on the chopping block, certainly on a per-property basis. Its semantics aren't really a match for anything in the ES spec, unlike JSNative and actual slot properties.
Note that you can keep using JSPropertyOP in JS_DefineProperty and company for now if you really have to. See the JSPROP_PROPOP_ACCESSORS flag and the JS_PROPERTYOP_GETTER/JS_PROPERTYOP_SETTER macros. But this is meant just to allow people to transition. In particular, there are _very_ few uses of JSPropertyOp left in SpiderMonkey, and only one in Firefox. Once those are all gone, I'd expect this stuff to disappear.
On the other hand, JSClass still requires JSPropertyOp, JSStrictPropertyOp.
Yes. It's not clear yet when (or whether) we'll kill that off, or exactly what the story is.
1 - Is it a temporary thing?
Yes, but timeframes are unclear.
2 - It was possible to read the property name from JSPropertyOp etc. how this will be working for JSNative ?
Use different JSNatives for different properties. Or a single JSNative, but allocate the function yourself and use extra reserved slots on it to store the property name...
-Boris _______________________________________________ dev-tech-js-engine-internals mailing list dev-tech-js-engine-internals@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-tech-js-engine-internals