ecma_make_boolean_value(bool) function is added in order to make ecma_value form a raw bool.
JerryScript-DCO-1.0-Signed-off-by: István Kádár ikadar@inf.u-szeged.hu
This commit is contained in:
@@ -335,6 +335,18 @@ ecma_make_simple_value (const ecma_simple_value_t simple_value) /**< simple valu
|
||||
return (((ecma_value_t) (simple_value)) << ECMA_DIRECT_SHIFT) | ECMA_DIRECT_TYPE_SIMPLE_VALUE;
|
||||
} /* ecma_make_simple_value */
|
||||
|
||||
/**
|
||||
* Creates an ecma value from the given raw boolean.
|
||||
*
|
||||
* @return boolean ecma_value
|
||||
*/
|
||||
inline ecma_value_t __attr_const___ __attr_always_inline___
|
||||
ecma_make_boolean_value (bool boolean_value) /**< raw bool value from which the ecma value will be created */
|
||||
{
|
||||
return ecma_make_simple_value (boolean_value ? ECMA_SIMPLE_VALUE_TRUE
|
||||
: ECMA_SIMPLE_VALUE_FALSE);
|
||||
} /* ecma_make_boolean_value */
|
||||
|
||||
/**
|
||||
* Encode an integer number into an ecma-value without allocating memory
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user