Partial stub for Int32 operation.

This commit is contained in:
Ruben Ayrapetyan 2014-08-14 19:06:03 +04:00
parent 85556504e4
commit 86a0c701df
2 changed files with 17 additions and 0 deletions

View File

@ -403,6 +403,22 @@ ecma_number_to_uint32 (ecma_number_t value) /**< unsigned 32-bit integer value *
return (uint32_t) value;
} /* ecma_number_to_uint32 */
/**
* ECMA-defined conversion of Number value to Int32 value
*
* See also:
* ECMA-262 v5, 9.5
*
* @return number - result of conversion.
*/
int32_t
ecma_number_to_int32 (ecma_number_t value) /**< unsigned 32-bit integer value */
{
TODO(Implement according to ECMA);
return (int32_t) value;
} /* ecma_number_to_int32 */
/**
* @}
* @}

View File

@ -49,6 +49,7 @@ extern ecma_completion_value_t ecma_op_to_object (ecma_value_t value);
extern ecma_number_t ecma_zt_string_to_number (const ecma_char_t *str_p);
extern void ecma_op_to_string_uint32 (uint32_t value, ecma_char_t *out_buffer_p, size_t buffer_size);
extern uint32_t ecma_number_to_uint32 (ecma_number_t value);
extern int32_t ecma_number_to_int32 (ecma_number_t value);
extern ecma_number_t ecma_uint32_to_number (uint32_t value);
/**