mirror of
https://github.com/facebookarchive/prepack.git
synced 2024-11-27 11:57:59 +03:00
Page:
PP1006
Pages
Compiler assumptions
Effects
Fuzzer
Home
Marking an object as simple
Optimized Functions
Optimized function
PP0002
PP0003
PP0004
PP0005
PP0006
PP0007
PP0008
PP0009
PP0010
PP0011
PP0012
PP0013
PP0014
PP0015
PP0016
PP0017
PP0018
PP0019
PP0020
PP0021
PP0022
PP0023
PP0024
PP0025
PP0026
PP0027
PP0028
PP0029
PP0030
PP0031
PP0032
PP0033
PP0034
PP0035
PP0036
PP0037
PP0038
PP0040
PP0041
PP0043
PP0045
PP1001
PP1002
PP1003
PP1004
PP1005
PP1006
PP1007
PP1008
PP1009
PP8000
PP9000
Partially unknown object
Prepack Concepts
Prepack diagnostics
React Compiler
Research papers citing Prepack
Suggested reading
Tips and tricks on how to debug things as a Prepack developer
Unknown Abstract function value
Unknown Abstract value
Well behaved property
3
PP1006
Nikolai Tillmann edited this page 2018-05-10 10:59:30 -07:00
Internal slot $Name modified in a nested context. This is not yet supported.
This error would typically only occur in an optimized function when an internal slot, as specified by the JavaScript spec, gets mutated in a conditional context.
This error indicates that you have hit a limitation in Prepack. Try to rearrange your code to overcome the limitation, or feel free to file an issue on GitHub with a feature request that a particular named internal slot should be supported.
For example, the error is triggered by the following code:
let p = {};
function f(c) {
let o = {};
if (c) {
o.__proto__ = p;
throw o;
}
}
__optimize(f);
Here, the __proto__
assignment modifies the $Prototype
internal slot. Prepack may currently not be able to generate code when this happens in a conditionally nested block. To work around the issue, make the modification unconditional:
let p = {};
function f(c) {
let o = {};
o.__proto__ = p;
if (c) {
throw o;
}
}
__optimize(f);