Closed Bug 1023609 Opened 6 years ago Closed 5 years ago

Remove SpiderMonkey support for let expressions

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

VERIFIED FIXED
mozilla41
Tracking Status
firefox40 --- wontfix
firefox41 --- fixed

People

(Reporter: shu, Assigned: cpeterson)

References

(Blocks 1 open bug)

Details

(Keywords: addon-compat, dev-doc-complete, site-compat, Whiteboard: [DocArea=JS])

Attachments

(2 files)

ES6 does not spec let blocks and let expressions. We should remove them.
Blocks: es6:let
Depends on: 1023686
Whiteboard: [DocArea=JS]
Depends on: 1102131
Depends on: 1108304
Depends on: 1108305
Depends on: 1108310
Depends on: 1108311
Depends on: 1113819
Depends on: 1120051
Depends on: 1121323
Blocks: 1103158
Depends on: 1129321
Depends on: 1129325
Depends on: 1129326
Depends on: 1129330
Depends on: 1129331
Depends on: 1129333
Depends on: 1129336
Depends on: 1129923
Depends on: 1133185
Depends on: 1133277
Depends on: 1133279
Depends on: 1137987
Depends on: 1149001
Part 1: Remove SpiderMonkey tests for nonstandard let expressions.

This patch removes fuzz tests that use let expressions and updates functional tests to not use let expressions.
Assignee: nobody → cpeterson
Status: NEW → ASSIGNED
Attachment #8607350 - Flags: review?(shu)
Part 2: Remove SpiderMonkey support for nonstandard let expressions.

This patch removes let expressions, but leaves let blocks for now. This work was easier to do in separate steps.
Attachment #8607351 - Flags: review?(shu)
Duplicate of this bug: 1149001
Comment on attachment 8607350 [details] [diff] [review]
part-1-remove-let-extension-tests.patch

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

Wondrous removal
Attachment #8607350 - Flags: review?(shu) → review+
Comment on attachment 8607351 [details] [diff] [review]
part-2-remove-let-extension-code.patch

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

Wondrous removal.

::: js/src/frontend/Parser.cpp
@@ +8106,2 @@
>           *   }
> +         *   array

Nit: could you change the pseudocode to

{
  let array = new Array, i, j;
  ...
  array
}

That is, add an extra pair of { } around everything. Otherwise it looks like we're introducing new bindings into an existing block scope.
Attachment #8607351 - Flags: review?(shu) → review+
Summary: Delete support for let blocks and let expressions for ES6 → Remove SpiderMonkey support for let expressions
Blocks: 1167029
https://hg.mozilla.org/mozilla-central/rev/fc18eefd9329
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla41
Keywords: addon-compat
(In reply to Tooru Fujisawa [:arai] from comment #8)
> Updated following documents:

Thanks, Tooru! :)
Status: RESOLVED → VERIFIED
Depends on: 1168085
Does this mean SM is now ES6-spec-compliant wrt let?
Flags: needinfo?(cpeterson)
(In reply to Florian Bender from comment #11)
> Does this mean SM is now ES6-spec-compliant wrt let?

Not yet. There are some remaining let issues described in tracking bug 950547.
Flags: needinfo?(cpeterson)
Yeah, sorry, forgot about that one.
You need to log in before you can comment on or make changes to this bug.