[Outreachy] Add placeholder implementation for Iterator.Zip
Categories
(Core :: JavaScript Engine, task, P3)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox133 | --- | fixed |
People
(Reporter: dminor, Assigned: moyotawanda)
References
(Blocks 1 open bug)
Details
Attachments
(1 file, 3 obsolete files)
This bug is about adding a placeholder implementation for the Iterator.Zip method of the joint iteration proposal. The steps to do this are:
- 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. - In Iterator.js add a placeholder method for IteratorZip. 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.zip ( iterables [, options] )
*
* https://tc39.es/proposal-joint-iteration/#sec-iterator.zip
*/
function IteratorZip(predicate) {
return false;
}
#endif
- Add the new function as a static method on Iterators. Please use #ifndef NIGHTLY_BUILD / #endif here as well.
- You can check that your new method is available in the shell, e.g.
print(Iterator.zip)from the JavaScript shell. - 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, you'll want to do a check on
JSProto_Iterator. Note that you'll have to addzipto CommonPropertyNames.h. - Make sure you can still build and run the tests.
- Once the tests all pass for you, you can commit your changes. Your commit message should look like:
Bug X - Add placeholder for Iterator.zip; r=dminor!, where X is the number for this bug. - Once you have your changes committed, request review. There are instructions on using phabricator and on getting reviews.
| Reporter | ||
Updated•1 year ago
|
| Reporter | ||
Comment 2•1 year ago
|
||
Let's save this one for a new contributor, I know that you are capable of doing this one already :)
| Reporter | ||
Updated•1 year ago
|
Comment 3•1 year ago
|
||
I'd like to work on this issue.
(In reply to Serah Nderi from comment #3)
I'd like to work on this issue.
Hi Serah, already working on this issue
Updated•1 year ago
|
| Reporter | ||
Comment 6•1 year ago
|
||
Hi Tawanda, your changes are good, but need to be rebased on the latest mozilla-central because of merge conflicts (https://lando.services.mozilla.com/D224921/) before I can land this.
(In reply to Dan Minor [:dminor] from comment #6)
Hi Tawanda, your changes are good, but need to be rebased on the latest mozilla-central because of merge conflicts (https://lando.services.mozilla.com/D224921/) before I can land this.
I have pushed another revision/diff , is that sufficient ?
Comment 10•1 year ago
|
||
:dminor, This is removing the math_sumprecise conditional in the JSObject.cpp file.
| Reporter | ||
Comment 11•1 year ago
|
||
Oops, I missed that, and it's already landed. I'll open a new bug.
Comment 12•1 year ago
|
||
Comment 13•1 year ago
|
||
Comment 14•1 year ago
|
||
Comment 15•1 year ago
|
||
| bugherder | ||
Comment 16•1 year ago
|
||
Comment on attachment 9430009 [details]
Bug 1923146 - Re-add sumPrecise check. r=syedbarimanjan
Revision D225134 was moved to bug 1923710. Setting attachment 9430009 [details] to obsolete.
Updated•1 year ago
|
Updated•1 year ago
|
Description
•