Closed Bug 1923190 Opened 1 month ago Closed 1 month ago

[Outreachy] Add placeholder implementation for Iterator.Range

Categories

(Core :: JavaScript Engine, task, P3)

task

Tracking

()

RESOLVED FIXED
133 Branch
Tracking Status
firefox133 --- fixed

People

(Reporter: dminor, Assigned: tanishkasingh2004)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

This bug is about adding a placeholder implementation for the Iterator.Range proposal. The steps to do this are:

  1. Make sure that you are able to build SpiderMonkey and run the existing tests. There are instructions here. You want to run the jstests, using this command ./mach jstests.
  2. In Iterator.js add a placeholder method for IteratorRange. We use NIGHTLY_BUILD so this will only be built for Nightly, and will not be available in release. Returning false means this method will fail all the time for now.
#ifdef NIGHTLY_BUILD
/**
 *  Iterator.range ( start, end, optionOrStep )
 *
 * https://tc39.es/proposal-iterator.range/#sec-iterator.range
 */
function IteratorRange(start, end optionOrStep) {
  return false;
}
#endif
  1. Add the new function as a static method on Iterators. Please use #ifndef NIGHTLY_BUILD / #endif here as well.
  2. You can check that your new method is available in the shell, e.g. print(Iterator.range) from the JavaScript shell.
  3. The final step is to remove it from the Iterator object when the pref for joint iteration is not enabled. There's an example of how to do this in this patch. Note that you'll have to add range to CommonPropertyNames.h if it's not already there.
  4. Make sure you can still build and run the tests.
  5. Once the tests all pass for you, you can commit your changes. Your commit message should look like: Bug X - Add placeholder for Iterator.range; r=dminor!, where X is the number for this bug.
  6. Once you have your changes committed, request review. There are instructions on using phabricator and on getting reviews.

im working on this!

Assignee: nobody → tanishkasingh2004
Status: NEW → ASSIGNED
Severity: -- → N/A
Priority: -- → P3
Pushed by dminor@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/d40d989f392a Add placeholder for Iterator.range; r=dminor
Status: ASSIGNED → RESOLVED
Closed: 1 month ago
Resolution: --- → FIXED
Target Milestone: --- → 133 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: