Description[turbofan] Properly type field access to stable heap object maps.
Introduce new typing rules for LoadField[Map], which try to take into
account stable map information if the object either has type Constant or
type Class. If the map of the object is stable but can transition we
have to introduce a code dependency in the Typer to make sure that the
information (the Constant type we infer for LoadField[Map]) is valid
(and stays valid).
This also settles the policy for depending on map stability: The
definition can introduce any number of maps, without having to pay
attention to stability (i.e. you can always use Type::Class to introduce
a map that is propagated along the value edges), and the use site is
responsible for checking that the type information is valid before using
it. I.e. if you use stable map information, you'll have to add a
stability dependency (or make sure the map cannot transition).
Drive-by-improvement: Add ReferenceEqualTyper which takes input types
into account for improved constant folding.
Drive-by-fix: Apply policy mentioned above to JSNativeContextSpecialization.
R=jarin@chromium.org, rossberg@chromium.org
BUG=v8:4470
LOG=n
Committed: https://crrev.com/44b9122d9f66e746f8f2126b04f30d0eac83fceb
Cr-Commit-Position: refs/heads/master@{#31567}
Patch Set 1 #
Total comments: 2
Patch Set 2 : Slightly improve field type extraction. #Patch Set 3 : Fix Andreas' comment. #Patch Set 4 : Fixes #Patch Set 5 : Make GCC happy #Patch Set 6 : Final workarounds. #
Messages
Total messages: 23 (8 generated)
|