-
Notifications
You must be signed in to change notification settings - Fork 738
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move anchored instanceof to the correct position
This commit includes the following two changes in ILGen: 1. If the class is unresolved, `genInstanceof` anchors `instanceof` under a `treetop` node. Then the anchored `instanceof` treetop appears after the callTree and it commons with the `instanceof` node under the `ZEROCHK` in `geninterface`. This causes a problem because `expandUnresolvedClassInstanceof` does not expect the treetop that has the anchored `instanceof` to have already been evaluated when it appears under ZEROCHK. The transformation in `expandUnresolvedClassInstanceof` will not function correctly. Therefore, the anchored `instanceof` treetop needs to be moved up before ZEROCHK. 2. If the receiver of the `instanceof` is non-null, there is no need to transform the `instanceof` into two cases: the null case and the non-null cases in `expandUnresolvedClassInstanceof`. Fixes: #18748 Signed-off-by: Annabelle Huo <Annabelle.Huo@ibm.com>
- Loading branch information
Showing
2 changed files
with
74 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters