Closed Bug 1377051 Opened 7 years ago Closed 7 years ago

Support JSOP_SETPROP_SUPER in Baseline

Categories

(Core :: JavaScript Engine: JIT, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla56
Tracking Status
firefox56 --- fixed

People

(Reporter: tcampbell, Assigned: tcampbell)

References

Details

Attachments

(2 files)

There are only a few remaining opcodes for Baseline support of ES6 Classes.
JSOP_SETPROP_SUPER
JSOP_STRICTSETPROP_SUPER
JSOP_SETELEM_SUPER
JSOP_STRICTSETELEM_SUPER

The complexities out-weight the usefulness, so use a VMCall to implement. Will also include a jit-test for some of the special complexities that SetPropIRGenerator does not support.
Blocks: 1167472
Assignee: nobody → tcampbell
Comment on attachment 8882444 [details]
Bug 1377051 - Support JSOP_SETPROP_SUPER in Baseline

https://reviewboard.mozilla.org/r/153570/#review158936

Thanks for adding the tests.

::: js/src/vm/Interpreter.cpp:2874
(Diff revision 1)
>  
> -
>      ReservedRooted<Value> receiver(&rootValue0, REGS.sp[-3]);
>      ReservedRooted<JSObject*> obj(&rootObject0, &REGS.sp[-2].toObject());
>      ReservedRooted<Value> rval(&rootValue1, REGS.sp[-1]);
> -    ReservedRooted<jsid> id(&rootId0, NameToId(script->getName(REGS.pc)));
> +    ReservedRooted<PropertyName*> id(&rootName0, script->getName(REGS.pc));

Nit: rename id -> name

::: js/src/vm/Interpreter.cpp:5263
(Diff revision 1)
> +js::SetPropertySuper(JSContext* cx, HandleObject obj, HandleValue receiver,
> +                     HandlePropertyName name, HandleValue rval, bool strict)
> +{
> +    RootedId id(cx, NameToId(name));
> +    ObjectOpResult result;
> +    if (!SetProperty(cx, obj, name, rval, receiver, result))

Nit: can pass id instead of name, I think the name version will do NameToId(name) a second time.
Attachment #8882444 - Flags: review?(jdemooij) → review+
Comment on attachment 8882445 [details]
Bug 1377051 - Support JSOP_SETELEM_SUPER in Baseline

https://reviewboard.mozilla.org/r/153572/#review158942

Do we have decent tests for this that run in Baseline?
Attachment #8882445 - Flags: review?(jdemooij) → review+
(In reply to Jan de Mooij [:jandem] from comment #4)
> Comment on attachment 8882445 [details]
> Bug 1377051 - Support JSOP_SETELEM_SUPER in Baseline
> 
> https://reviewboard.mozilla.org/r/153572/#review158942
> 
> Do we have decent tests for this that run in Baseline?
Tests are included in previous patch tests.
Pushed by tcampbell@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/52c00746ebc4
Support JSOP_SETPROP_SUPER in Baseline r=jandem
https://hg.mozilla.org/integration/autoland/rev/2319ae1c0f8a
Support JSOP_SETELEM_SUPER in Baseline r=jandem
https://hg.mozilla.org/mozilla-central/rev/52c00746ebc4
https://hg.mozilla.org/mozilla-central/rev/2319ae1c0f8a
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla56
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: