-
Notifications
You must be signed in to change notification settings - Fork 729
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix devirtualization issues with IlGeneratorMethodDetails
When storing a particular variety of IlGeneratorMethodDetails into MethodToBeCompiled, the code uses operator = which transmutes the existing generic IlGeneratorMethodDetails (the base class) into a derived class similar to the parameter that is passed in, by using placement new. The expectation is that any call off the generic IlGeneratorMethodDetails object stored in MethodToBeCompiled is going to be a virtual call. However, the C++ compiler is allowed to devirtualize calls and if that occurs, the JIT is going to invoke the implementation in the generic IlGeneratorMethodDetails. The solution introduced by this commit is to use an object factory that builds a specific IlGeneratorMethodDetails at a designated address and returns a pointer to that address which is then stored in MethodToBeCompiled. Signed-off-by: Marius Pirvu <[email protected]>
- Loading branch information
Showing
5 changed files
with
23 additions
and
34 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
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
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