New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
lib: the REPL should survive deletion of Array.prototype methods #31457
base: main
Are you sure you want to change the base?
Conversation
This comment has been minimized.
This comment has been minimized.
|
Rebased, and added a bunch of other primordials I found when poking around the repl. |
44f2d96
to
418352d
Compare
|
Not sure why the python tests are failing :-/ |
For the same reason Travis is failing; there are several failing repl tests. |
This comment has been minimized.
This comment has been minimized.
c1219b5
to
907de90
Compare
|
alright, got tests passing :-D this is ready for any additional/final/repeat reviews, and is ready to land whenever it's allowed to! |
This comment has been minimized.
This comment has been minimized.
|
I took the liberty of adding a test. Hope that's OK. (It's in a separate commit so it is easy to rebase out.) |
|
The performance overhead should be much less after we land V8 8.0: https://v8.dev/blog/v8-release-80#optimizing-higher-order-builtins |
|
I don’t think it’s true that any other program would necessarily fail in the case of these methods being removed; altho many people don’t code robustly, there are many of us that do. Either way, it’s one thing for a user modifying the env to break their own app; it’s another for it to break the platform itself. As for the performance overhead, that’s definitely an issue :-/ but my personal philosophy is that correctness always trumps performance. Where does this go from here? What are possible next steps? |
8ae28ff
to
2935f72
Compare
Specifically, `delete Array.prototype.lastIndexOf` immediately crashes the REPL, as does deletion of a few other Array prototype methods.
| const longestNameLength = ArrayPrototypeReduce( | ||
| names, | ||
| (max, name) => MathMax(max, name.length), | ||
| 0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we wait for #37005 to land, we could use MathMaxApply and get better perf results.
|
Removed the "Author Ready" given @BridgeAR's request changes on this. |
|
I'd just give it a couple more days, then if there's no response the objection can likely be cleared |
| const longestNameLength = ArrayPrototypeReduce( | ||
| names, | ||
| (max, name) => MathMax(max, name.length), | ||
| 0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| const longestNameLength = ArrayPrototypeReduce( | |
| names, | |
| (max, name) => MathMax(max, name.length), | |
| 0 | |
| const longestNameLength = MathMaxApply( | |
| ArrayPrototypeMap(names, (name) => name.length) |

Formed in 2009, the Archive Team (not to be confused with the archive.org Archive-It Team) is a rogue archivist collective dedicated to saving copies of rapidly dying or deleted websites for the sake of history and digital heritage. The group is 100% composed of volunteers and interested parties, and has expanded into a large amount of related projects for saving online and digital history.

Specifically,
delete Array.prototype.lastIndexOfimmediately crashes the REPL, as does deletion of a few other Array prototype methods.Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passes