-
-
Notifications
You must be signed in to change notification settings - Fork 121
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Clean up JITList and associated helpers
Summary: * Renamed onJITList{,Impl} in pyjit.cpp to shouldCompile(), which is more descriptive of what the code does. Even when there's no JIT list the function currently returns "true". Speaking of returns, there was a bug where if the JIT list failed to look up an item it would return -1, but all uses of this value blindly converted it to a true/false success status so it looked like success. * JITList::lookup() is unused. Its functional equivalent is onJitListImpl() in pyjit.cpp, so move that definiton over and name it lookupFunc() to be consistent with lookupCode(). * Use std::string_view instead of const char* wherever possible. Added a stringAsUnicode() helper to make this easier, there's many other places in Jit/ where we can use this as well. * Added nullptr checks to uses of JITList::pathBasename(), which can return nullptr on error. Reviewed By: jbower-fb Differential Revision: D51764325 fbshipit-source-id: 30f39f8f29b8c092aa7909b17219f9afa689199b
- Loading branch information
1 parent
bea832f
commit 67f5fe3
Showing
6 changed files
with
196 additions
and
184 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
Oops, something went wrong.