This module contains API functions to handle SVM codes.
More...
This module contains API functions to handle SVM codes.
SVM code are objects containing execution directives for processors, written by the virtual machine users.
This concept allows usage of different consistent modules having a dedicated scope to:
- Create fully independant libraries,
- Create local code contextes to split application in components with identified entry points,
- Introduce genericity in code execution by importing code as text,
- Use of code generators.
◆ svm_code_get_name()
This function extracts the code name from the SVM code.
- Parameters
-
[in] | svm | The SVM pointer passed as first argument of the callback function. |
[in] | code | The code from wich the name has to be extracted. |
- Returns
- The code name.
- Exceptions
-
FAILURE | interruption when a parameter is incorrect. (Please refer to the main description page of this API.) |
◆ svm_code_get_source()
This function extracts the code source from the SVM code.
- Parameters
-
[in] | svm | The SVM pointer passed as first argument of the callback function. |
[in] | code | The code from wich the name has to be extracted. |
- Returns
- The code source.
- Exceptions
-
FAILURE | interruption when a parameter is incorrect. (Please refer to the main description page of this API.) |
◆ svm_code_print()
This function renders a textual representation of a SVM code.
- Parameters
-
[in] | svm | The SVM pointer passed as first argument of the callback function. |
[in] | code | The code to render as string. |
- Note
- The resulting string is not guaranteed to be compilable again. In particular, it contains a one line header that should be removed prior to any compilation attempt.
- Returns
- The string representation of a SVM code.
- Exceptions
-
FAILURE | interruption when a parameter is incorrect. (Please refer to the main description page of this API.) |