mirror of
https://github.com/facebookarchive/prepack.git
synced 2024-09-11 14:46:37 +03:00
ffd230e4d5
Summary: This PR guarantees the correctness of optimized `Array.map` operators, even in the face of aliasing effects. It does four things: 1. Trigger generic leaking if an array operator is re-specialized in the non-Instant Render use case. 2. Tracks aliasing effects created by specialized operators, and triggers leaking or materialization when needed to ensure correct behavior 3. Deactivates immediate transitive materialization following the use of specialized operators, instead deferring this to the leaking implementation. The leaking implementation reaches aliased objects via a new arg added to widened numeric arrays. The arg is an abstract value of kind "mayAliasSet" that is set to top, but whose may alias set is tracked. If leaking does not happen, then materialization is avoided. 4. It permits benign mutations in Instant Render, where the mutations do not cause references to non-final snapshots of the object. Follow up: - Model aliasing effects losslessly via widened objects: #2569 - Add support for `filter` and `reduce` Resolves #2449 Pull Request resolved: https://github.com/facebook/prepack/pull/2570 Differential Revision: D10149117 Pulled By: sb98052 fbshipit-source-id: eb686982574c8ef868934472903c405f3d63bbed |
||
---|---|---|
.. | ||
.write-write-conflict.js.swp | ||
abstract-value-check-dup-name-string.js | ||
bad-functions.js | ||
binaryExpression.js | ||
call2.js | ||
call.js | ||
class.js | ||
conditional-return.js | ||
EmptyBuiltInArrayCycle.js | ||
EmptyBuiltInPropsCycle.js | ||
FinalObjectCannotBeMutated.js | ||
forInStatement.js | ||
forOfStatement.js | ||
in1.js | ||
in2.js | ||
instanceof.js | ||
InstantRenderArrayOps3.js | ||
member2.js | ||
member.js | ||
ModifiedObjectPropertyLimitation.js | ||
object-assign.js | ||
objectExpression2.js | ||
objectExpression.js | ||
objectpattern.js | ||
PropertyAttributeConflict.js | ||
Set.js | ||
stackOverflow.js | ||
syntaxError.js | ||
testErrorHandlerCalled.js | ||
try-and-access-abstract-property.js | ||
try-and-call-abstract-function.js | ||
unaryExpression.js | ||
updateExpression.js | ||
with2.js | ||
with.js | ||
write-forin-conflict.js | ||
write-in-conflict.js | ||
write-reflect-conflict.js | ||
write-write-conflict2.js | ||
write-write-conflict3.js | ||
write-write-conflict4.js | ||
write-write-conflict.js | ||
write-write-unknown-prop-conflict.js |