Description[Interpreter] Optimize equality check with null/undefined with a check on the map.
Equality with null/undefined is equivalent to a check on the undetectable bit
on the map of the object. This would be more efficient than performing the entire
comparison operation.
This cl introduces:
1. A new bytecode called TestUndetectable that checks if the object is null/undefined.
2. Updates peeophole optimizer to emit TestUndetectable when a LdaNull/Undefined
precedes equality check.
4. TestUndetectable is transformed to ObjectIsUndetectable operator when building
turbofan graph.
BUG=v8:4280
Committed: https://crrev.com/9119d16904e9062d319427029c2c74270776e68e
Cr-Commit-Position: refs/heads/master@{#41514}
Patch Set 1 #Patch Set 2 : Fixed a bug in reducing JSIsUndetectable. #
Total comments: 15
Patch Set 3 : addressed comments from Ross. #Patch Set 4 : Reduce to simplified operator instead of using a new JSOperator. #Patch Set 5 : A couple of fixes: 1. TestUndetectable writes boolean to accumulator 2. New optimization to load un… #
Total comments: 11
Patch Set 6 : Address comments from Ross. #Messages
Total messages: 47 (34 generated)
|