BaselineCompiler: Compile JSOP_GETTER and JSOP_SETTER

RESOLVED FIXED in mozilla24

Status

()

RESOLVED FIXED
6 years ago
5 years ago

People

(Reporter: jandem, Assigned: jandem)

Tracking

unspecified
mozilla24
Points:
---
Dependency tree / graph
Bug Flags:
in-testsuite +

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

(Assignee)

Description

6 years ago
The interpreter code for these ops could also use some refactoring..
(Assignee)

Comment 1

6 years ago
Created attachment 755239 [details] [diff] [review]
Patch

The way these ops currently work is that JSOP_GETTER and JSOP_SETTER are always followed by either JSOP_INITPROP or JSOP_INITELEM and the interpreter then fuses the two ops.

To avoid having to do the same in the baseline compiler, I replaced JSOP_GETTER/SETTER with JSOP_INITPROP_GETTER/SETTER and JSOP_INITELEM_GETTER/SETTER. With that change these ops are much simpler/cleaner to implement in both the interpreter and Baseline (and Ion later on).
Attachment #755239 - Flags: review?(bhackett1024)
(Assignee)

Comment 2

6 years ago
Created attachment 755240 [details] [diff] [review]
Patch

Forgot to qref the test.
Attachment #755239 - Attachment is obsolete: true
Attachment #755239 - Flags: review?(bhackett1024)
Attachment #755240 - Flags: review?(bhackett1024)
Comment on attachment 755240 [details] [diff] [review]
Patch

Review of attachment 755240 [details] [diff] [review]:
-----------------------------------------------------------------

::: js/src/jsinterp.cpp
@@ +2602,5 @@
> +    obj = &regs.sp[-2].toObject();
> +    name = script->getName(regs.pc);
> +    val = regs.sp[-1];
> +
> +    if (!InitGetterSetter(cx, regs.pc, obj, name, val))

Maybe InitGetterSetterOperation?
Attachment #755240 - Flags: review?(bhackett1024) → review+
https://hg.mozilla.org/mozilla-central/rev/005c4f452f1e
Status: ASSIGNED → RESOLVED
Last Resolved: 6 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla24
Depends on: 881461
You need to log in before you can comment on or make changes to this bug.