forked from facebook/hhvm
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Perf] Improve code generated for runtime type-casting
Summary: This commit attempts to improve the code generated for type casting in two ways. First, it cleans up the ambiguous use of expected type in Expression.cpp- if the type is set, then the type of the expression must be converted (if necessary) to that type (which is same as the old meaning). However, if the type is set, it now means that no type conversion is necessary, where before the meaning was either (1) actual type and expected type are the same, or (2) no type conversion is necessary. Doing so allows us to distinguish when we can safely omit a cast. Second, it adds a full set of "fast cast" methods to variant, and adds the necessary code generation to take advantage of the fast casting method wherever possible. Test Plan: slow_tests, inspect www code Reviewed By: myang Reviewers: mwilliams, myang, qigao Commenters: mwilliams CC: ps, mwilliams, stephentu, myang Revert Plan: Tags: - begin *PUBLIC* platform impact section - Bugzilla: # - end platform impact - Differential Revision: 268015
- Loading branch information
stephentu
authored and
macvicar
committed
Jul 5, 2011
1 parent
f7d4e65
commit d7b9fa4
Showing
21 changed files
with
620 additions
and
118 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
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
Oops, something went wrong.