Closed Bug 876670 Opened 11 years ago Closed 11 years ago

BaselineCompiler: Compile JSOP_GETTER and JSOP_SETTER

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla24

People

(Reporter: jandem, Assigned: jandem)

References

Details

Attachments

(1 file, 1 obsolete file)

The interpreter code for these ops could also use some refactoring..
Attached patch Patch (obsolete) — Splinter Review
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)
Attached patch PatchSplinter Review
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
Closed: 11 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla24
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: