Simple Virtual Machine
A simple but flexible virtual machine
SVM values state

This module contains API functions to handle SVM values state. More...

Functions

SVM_FUNCTION SVM_Boolean svm_value_state_is_null (const void *svm, const SVM_Value value)
 This function checks whether a value is a null value. More...
 
SVM_FUNCTION SVM_Boolean svm_value_state_is_constant (const void *svm, const SVM_Value value)
 This function checks whether a value is a constant. More...
 
SVM_FUNCTION SVM_Boolean svm_value_state_is_movable (const void *svm, const SVM_Value value)
 This function checks whether a value is movable. More...
 
SVM_FUNCTION SVM_Boolean svm_value_state_set_movable (const void *svm, const SVM_Value value)
 This function flags a value as movable. More...
 

Detailed Description

This module contains API functions to handle SVM values state.

Function Documentation

◆ svm_value_state_is_constant()

SVM_FUNCTION SVM_Boolean svm_value_state_is_constant ( const void *  svm,
const SVM_Value  value 
)

This function checks whether a value is a constant.

Parameters
[in]svmThe SVM pointer passed as first argument of the callback function.
[in]valueThe value to be diagnosed.
Returns
TRUE if the value is a constant, FALSE otherwise.
Exceptions
FAILUREinterruption when a parameter is incorrect. (Please refer to the main description page of this API.)

◆ svm_value_state_is_movable()

SVM_FUNCTION SVM_Boolean svm_value_state_is_movable ( const void *  svm,
const SVM_Value  value 
)

This function checks whether a value is movable.

Parameters
[in]svmThe SVM pointer passed as first argument of the callback function.
[in]valueThe value to be diagnosed.
Returns
TRUE if the value will be moved at its next write into memory, FALSE otherwise.
Exceptions
FAILUREinterruption when a parameter is incorrect. (Please refer to the main description page of this API.)

◆ svm_value_state_is_null()

SVM_FUNCTION SVM_Boolean svm_value_state_is_null ( const void *  svm,
const SVM_Value  value 
)

This function checks whether a value is a null value.

Parameters
[in]svmThe SVM pointer passed as first argument of the callback function.
[in]valueThe value to be diagnosed.
Returns
TRUE if the value is a null value, FALSE otherwise.
Exceptions
FAILUREinterruption when a parameter is incorrect. (Please refer to the main description page of this API.)

◆ svm_value_state_set_movable()

SVM_FUNCTION SVM_Boolean svm_value_state_set_movable ( const void *  svm,
const SVM_Value  value 
)

This function flags a value as movable.

Parameters
[in]svmThe SVM pointer passed as first argument of the callback function.
[in]valueThe value to be flagged.

The value is flagged movable only when the value is referenced once. When a value is flagged as movable, the next write into the memory is done without copy.

Returns
TRUE when the value has been flagged, FALSE otherwise.
Exceptions
FAILUREinterruption when a parameter is incorrect. (Please refer to the main description page of this API.)