This module contains API functions to create SVM codes.
More...
|
SVM_FUNCTION SVM_Code | svm_code_new (const void *svm, const SVM_Value_String name, const SVM_Value_String source) |
| This function creates a SVM code from two string values. More...
|
|
SVM_FUNCTION SVM_Code | svm_code_new__string (const void *svm, const SVM_String name, const SVM_String source) |
| This function creates a SVM code from two SVM_String. More...
|
|
SVM_FUNCTION SVM_Code | svm_code_new__raw (const void *svm, const char *name, const char *source) |
| This function creates a SVM code from two C nul-terminated strings. More...
|
|
SVM_FUNCTION SVM_Variable | svm_code_compile (const void *svm, const SVM_Value_String name, const SVM_Value_String source) |
| This function tries to create a SVM code from two string values. More...
|
|
SVM_FUNCTION SVM_Variable | svm_code_compile__string (const void *svm, const SVM_String name, const SVM_String source) |
| This function creates a SVM code from two SVM_String. More...
|
|
SVM_FUNCTION SVM_Variable | svm_code_compile__raw (const void *svm, const char *name, const char *source) |
| This function creates a SVM code from two C nul-terminated strings. More...
|
|
This module contains API functions to create SVM codes.
◆ svm_code_compile()
This function tries to create a SVM code from two string values.
- Parameters
-
[in] | svm | The SVM pointer passed as first argument of the callback function. |
[in] | name | The code name. |
[in] | source | The code source. |
The source code is compiled and linked by the SVM code parser.
- Returns
- The executable SVM code (a SVM_Code) when the compilation succeed, or a string value (a SVM_Value_String) containing an error when it failed.
- Exceptions
-
FAILURE | interruption when a parameter is incorrect. (Please refer to the main description page of this API.) |
◆ svm_code_compile__raw()
This function creates a SVM code from two C nul-terminated strings.
- Parameters
-
[in] | svm | The SVM pointer passed as first argument of the callback function. |
[in] | name | The code name. |
[in] | source | The code source. |
The source code is compiled and linked by the SVM code parser.
- Returns
- The executable SVM code (a SVM_Code) when the compilation succeed, or a string value (a SVM_Value_String) containing an error when it failed.
- Exceptions
-
FAILURE | interruption when a parameter is incorrect. (Please refer to the main description page of this API.) |
◆ svm_code_compile__string()
This function creates a SVM code from two SVM_String.
- Parameters
-
[in] | svm | The SVM pointer passed as first argument of the callback function. |
[in] | name | The code name. |
[in] | source | The code source. |
The source code is compiled and linked by the SVM code parser.
- Returns
- The executable SVM code (a SVM_Code) when the compilation succeed, or a string value (a SVM_Value_String) containing an error when it failed.
- Exceptions
-
FAILURE | interruption when a parameter is incorrect. (Please refer to the main description page of this API.) |
◆ svm_code_new()
This function creates a SVM code from two string values.
- Parameters
-
[in] | svm | The SVM pointer passed as first argument of the callback function. |
[in] | name | The code name. |
[in] | source | The code source. |
The source code is compiled and linked by the SVM code parser.
- Returns
- The executable SVM code.
- Exceptions
-
FAILURE | interruption when a parameter is incorrect. (Please refer to the main description page of this API.) |
FAILURE | interruption when a parse error is detected. |
FAILURE | interruption when a label or a symbol is defined twice or not found. |
MEMORY | interruption when a plugin type does not exists or has no constant callback defined. |
PROCESSOR | interruption when a plugin instruction or interruption does not exists. |
◆ svm_code_new__raw()
SVM_FUNCTION SVM_Code svm_code_new__raw |
( |
const void * |
svm, |
|
|
const char * |
name, |
|
|
const char * |
source |
|
) |
| |
This function creates a SVM code from two C nul-terminated strings.
- Parameters
-
[in] | svm | The SVM pointer passed as first argument of the callback function. |
[in] | name | The code name. |
[in] | source | The code source. |
The source code is compiled and linked by the SVM code parser.
- Returns
- The executable SVM code.
- Exceptions
-
FAILURE | interruption when a parameter is incorrect. (Please refer to the main description page of this API.) |
FAILURE | interruption when a parse error is detected. |
FAILURE | interruption when a label or a symbol is defined twice or not found. |
MEMORY | interruption when a plugin type does not exists or has no constant callback defined. |
PROCESSOR | interruption when a plugin instruction or interruption does not exists. |
◆ svm_code_new__string()
This function creates a SVM code from two SVM_String.
- Parameters
-
[in] | svm | The SVM pointer passed as first argument of the callback function. |
[in] | name | The code name. |
[in] | source | The code source. |
The source code is compiled and linked by the SVM code parser.
- Returns
- The executable SVM code.
- Exceptions
-
FAILURE | interruption when a parameter is incorrect. (Please refer to the main description page of this API.) |
FAILURE | interruption when a parse error is detected. |
FAILURE | interruption when a label or a symbol is defined twice or not found. |
MEMORY | interruption when a plugin type does not exists or has no constant callback defined. |
PROCESSOR | interruption when a plugin instruction or interruption does not exists. |