From aa74c3e2e0bc3c82a9dd3483b2119a6f1d1cef47 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zsolt=20Borb=C3=A9ly?= Date: Wed, 18 Nov 2015 11:04:07 +0100 Subject: [PATCH] Remove duplcation of ecma_reject function MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit JerryScript-DCO-1.0-Signed-off-by: Zsolt Borbély zsborbely.u-szeged@partner.samsung.com --- .../ecma/operations/ecma-array-object.cpp | 19 ------------------- .../ecma/operations/ecma-objects-general.cpp | 2 +- .../ecma/operations/ecma-objects-general.h | 1 + 3 files changed, 2 insertions(+), 20 deletions(-) diff --git a/jerry-core/ecma/operations/ecma-array-object.cpp b/jerry-core/ecma/operations/ecma-array-object.cpp index 135a7564c..f36fd99f1 100644 --- a/jerry-core/ecma/operations/ecma-array-object.cpp +++ b/jerry-core/ecma/operations/ecma-array-object.cpp @@ -32,25 +32,6 @@ * @{ */ -/** - * Reject sequence - * - * @return completion value - * Returned value must be freed with ecma_free_completion_value - */ -static ecma_completion_value_t -ecma_reject (bool is_throw) /**< Throw flag */ -{ - if (is_throw) - { - return ecma_make_throw_obj_completion_value (ecma_new_standard_error (ECMA_ERROR_TYPE)); - } - else - { - return ecma_make_simple_completion_value (ECMA_SIMPLE_VALUE_FALSE); - } -} /* ecma_reject */ - /** * Array object creation operation. * diff --git a/jerry-core/ecma/operations/ecma-objects-general.cpp b/jerry-core/ecma/operations/ecma-objects-general.cpp index ba06c3633..c007e0237 100644 --- a/jerry-core/ecma/operations/ecma-objects-general.cpp +++ b/jerry-core/ecma/operations/ecma-objects-general.cpp @@ -37,7 +37,7 @@ * @return completion value * Returned value must be freed with ecma_free_completion_value */ -static ecma_completion_value_t +ecma_completion_value_t ecma_reject (bool is_throw) /**< Throw flag */ { if (is_throw) diff --git a/jerry-core/ecma/operations/ecma-objects-general.h b/jerry-core/ecma/operations/ecma-objects-general.h index f15d5e047..aeea99408 100644 --- a/jerry-core/ecma/operations/ecma-objects-general.h +++ b/jerry-core/ecma/operations/ecma-objects-general.h @@ -26,6 +26,7 @@ * @{ */ +extern ecma_completion_value_t ecma_reject (bool); extern ecma_object_t *ecma_op_create_object_object_noarg (void); extern ecma_completion_value_t ecma_op_create_object_object_arg (ecma_value_t); extern ecma_object_t *ecma_op_create_object_object_noarg_and_set_prototype (ecma_object_t *);