Introducing ECMA_FUNCTION_CALL helper macro for handling return completion values of function calls.

This commit is contained in:
Ruben Ayrapetyan
2014-08-22 20:26:23 +04:00
parent 80e6cd3a60
commit 6801f22bd9
4 changed files with 51 additions and 6 deletions
+12
View File
@@ -408,6 +408,18 @@ ecma_is_completion_value_throw (ecma_completion_value_t value) /**< completion v
return (value.type == ECMA_COMPLETION_TYPE_THROW);
} /* ecma_is_completion_value_throw */
/**
* Check if the completion value is return value.
*
* @return true - if the completion type is return,
* false - otherwise.
*/
bool
ecma_is_completion_value_return (ecma_completion_value_t value) /**< completion value */
{
return (value.type == ECMA_COMPLETION_TYPE_RETURN);
} /* ecma_is_completion_value_return */
/**
* Check if the completion value is specified normal simple value.
*
+1
View File
@@ -79,6 +79,7 @@ extern void ecma_free_completion_value (ecma_completion_value_t completion_value
extern bool ecma_is_completion_value_normal (ecma_completion_value_t value);
extern bool ecma_is_completion_value_throw (ecma_completion_value_t value);
extern bool ecma_is_completion_value_return (ecma_completion_value_t value);
extern bool ecma_is_completion_value_normal_simple_value (ecma_completion_value_t value,
ecma_simple_value_t simple_value);
extern bool ecma_is_completion_value_normal_true (ecma_completion_value_t value);