Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove
pyccel.ast.utilities.builtin_function
(#1841)
The function `pyccel.ast.utilities.builtin_function` does the same thing as the code here: https://github.com/pyccel/pyccel/blob/78d56dec8303d728bc9cf43c55464fc42786645f/pyccel/parser/semantic.py#L1064-L1085 however it was not wrapped in a try/except and its implementation leaves no room for specialised `_visit` functions if the class needs more context information. This PR removes the function and uses the existing implementation to retrieve the same behaviour. In order to be able to wrap all builtin classes in a `PyccelFunctionDef` the inheritance is changed so `PythonRange`, `PythonMap`, `PythonEnumerate` and `PythonType` all inherit from `PyccelFunction`. As these objects do not represent objects in memory in the low level code the class type `SymbolicType()` is used. `PyccelInternalFunction` is renamed to `PyccelFunction` --------- Co-authored-by: Yaman Güçlü <yaman.guclu@gmail.com>
- Loading branch information
1 parent
2728d40
commit 9464954
Showing
19 changed files
with
137 additions
and
135 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
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.