Closed
Description
As I found out here, Node enables --allow-natives-syntax
in V8 during bootstrapping and disables later.
This is so v8.previewMapIterator
and v8.previewSetIterator
in lib/internal/v8.js
can be compiled during bootstrapping, as the call %MapIteratorClone
and %SetIteratorClone
. There are two major flaws in this:
- This relies on
v8/src/runtime/runtime.h
defining%MapIteratorClone
. Note that this is an implementation detail deep inside of V8 and could change at any time without any warning. In this particular case,%MapIteratorClone
is only used inside V8 for the outdated debug context implementation that we were planning to remove for a long time. - This also relies on the fact that once compiled, the function does not need to be compiled again. That could change in the future if V8 implements code aging for bytecode.
Well I guess now that V8 tests against Node, V8 developers are forced to not violate these wrong assumptions.
Please please remove these dependencies.