Closed Bug 876454 Opened 8 years ago Closed 8 years ago

BaselineCompiler: Compile JSOP_LEAVEBLOCKEXPR and JSOP_LEAVEFORLETIN

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla24

People

(Reporter: jandem, Assigned: jandem)

References

Details

Attachments

(1 file)

Attached patch PatchSplinter Review
We can now compile things like

  for (let x in y) { }

and

  print(let (x = a) x * 3);
Attachment #754488 - Flags: review?(evilpies)
Comment on attachment 754488 [details] [diff] [review]
Patch

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

::: js/src/ion/BaselineCompiler.cpp
@@ +2208,5 @@
> +        return false;
> +
> +    // Pop slots pushed by JSOP_ENTERBLOCK, but leave the topmost value
> +    // on the stack.
> +    frame.popRegsAndSync(1);

This threw me of, but the interpreter also does something weird, so carry on :)
Attachment #754488 - Flags: review?(evilpies) → review+
https://hg.mozilla.org/mozilla-central/rev/fc0a521fad43
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla24
You need to log in before you can comment on or make changes to this bug.