Simple Virtual Machine A simple but flexible virtual machine

Loading...
Searching...
No Matches
Functions
SVM values state
SVM values

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.
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.
SVM_FUNCTION SVM_Boolean | svm_value_state_is_movable (const void *svm, const SVM_Value value)
| This function checks whether a value is movable.
SVM_FUNCTION SVM_Boolean | svm_value_state_set_movable (const void *svm, const SVM_Value value)
| This function flags a value as movable.

## 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] | svm | The SVM pointer passed as first argument of the callback function.
  [in] | value | The value to be diagnosed.

Returns
  TRUE if the value is a constant, FALSE otherwise.

Exceptions

  FAILURE | interruption 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] | svm | The SVM pointer passed as first argument of the callback function.
  [in] | value | The value to be diagnosed.

Returns
  TRUE if the value will be moved at its next write into memory, FALSE otherwise.

Exceptions

  FAILURE | interruption 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] | svm | The SVM pointer passed as first argument of the callback function.
  [in] | value | The value to be diagnosed.

Returns
  TRUE if the value is a null value, FALSE otherwise.

Exceptions

  FAILURE | interruption 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] | svm | The SVM pointer passed as first argument of the callback function.
  [in] | value | The 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

  FAILURE | interruption when a parameter is incorrect. (Please refer to the main description page of this API.)