-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[infer][hack][textual] fixing the bad optionnal-args wrappers
Summary: for each Hack virtual function with optionnal arguments, hackc generates wrappers of the form ``` define .wrapper enclosing.name($this, $arg0, ..., $arg_k) : ... { #b0: // computes default values and store them in $arg_{k+1}, ..., $arg_{k+q} ... #b_last: n0 = load &$arg0 ... n_{k+q} = load &$arg_q n_{k+q+1} = load &$this n_{k+q+2} = n_{k+q+1+1}.?.name(n0, ..., n_{k+q+1}) ret n_{k+q+2} } ``` This forward call should be static, not virtual. We implement a small Textual->Textual transformation that replaces it with a static call using the enclosing name found in the signature of the wrapper. Reviewed By: jvillard Differential Revision: D66965276 Privacy Context Container: L1208441 fbshipit-source-id: 46dcf86a543890562032542fa31ebd4e49f7ee91
- Loading branch information
1 parent
0fb7520
commit 5d753cb
Showing
2 changed files
with
46 additions
and
5 deletions.
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