Replace // double slash comments with /* */. (#1461)
JerryScript-DCO-1.0-Signed-off-by: Robert Sipka rsipka.uszeged@partner.samsung.com
This commit is contained in:
committed by
Tilmann Scheller
parent
4d2c22a118
commit
fb3e8cf8b8
@@ -183,14 +183,14 @@ ecma_builtin_object_object_seal (ecma_value_t this_arg, /**< 'this' argument */
|
||||
JERRY_UNUSED (this_arg);
|
||||
ecma_value_t ret_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_EMPTY);
|
||||
|
||||
// 1.
|
||||
/* 1. */
|
||||
if (!ecma_is_value_object (arg))
|
||||
{
|
||||
ret_value = ecma_raise_type_error (ECMA_ERR_MSG ("Argument is not an object."));
|
||||
}
|
||||
else
|
||||
{
|
||||
// 2.
|
||||
/* 2. */
|
||||
ecma_object_t *obj_p = ecma_get_object_from_value (arg);
|
||||
|
||||
ecma_collection_header_t *props_p = ecma_op_object_get_property_names (obj_p, false, false, false);
|
||||
@@ -203,7 +203,7 @@ ecma_builtin_object_object_seal (ecma_value_t this_arg, /**< 'this' argument */
|
||||
{
|
||||
ecma_string_t *property_name_p = ecma_get_string_from_value (*iter.current_value_p);
|
||||
|
||||
// 2.a
|
||||
/* 2.a */
|
||||
ecma_property_descriptor_t prop_desc;
|
||||
|
||||
if (!ecma_op_object_get_own_property_descriptor (obj_p, property_name_p, &prop_desc))
|
||||
@@ -211,10 +211,10 @@ ecma_builtin_object_object_seal (ecma_value_t this_arg, /**< 'this' argument */
|
||||
continue;
|
||||
}
|
||||
|
||||
// 2.b
|
||||
/* 2.b */
|
||||
prop_desc.is_configurable = false;
|
||||
|
||||
// 2.c
|
||||
/* 2.c */
|
||||
ECMA_TRY_CATCH (define_own_prop_ret,
|
||||
ecma_op_object_define_own_property (obj_p,
|
||||
property_name_p,
|
||||
@@ -230,10 +230,10 @@ ecma_builtin_object_object_seal (ecma_value_t this_arg, /**< 'this' argument */
|
||||
|
||||
if (ecma_is_value_empty (ret_value))
|
||||
{
|
||||
// 3.
|
||||
/* 3. */
|
||||
ecma_set_object_extensible (obj_p, false);
|
||||
|
||||
// 4.
|
||||
/* 4. */
|
||||
ret_value = ecma_copy_value (arg);
|
||||
}
|
||||
}
|
||||
@@ -257,14 +257,14 @@ ecma_builtin_object_object_freeze (ecma_value_t this_arg, /**< 'this' argument *
|
||||
JERRY_UNUSED (this_arg);
|
||||
ecma_value_t ret_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_EMPTY);
|
||||
|
||||
// 1.
|
||||
/* 1. */
|
||||
if (!ecma_is_value_object (arg))
|
||||
{
|
||||
ret_value = ecma_raise_type_error (ECMA_ERR_MSG ("Argument is not an object."));
|
||||
}
|
||||
else
|
||||
{
|
||||
// 2.
|
||||
/* 2. */
|
||||
ecma_object_t *obj_p = ecma_get_object_from_value (arg);
|
||||
|
||||
ecma_collection_header_t *props_p = ecma_op_object_get_property_names (obj_p, false, false, false);
|
||||
@@ -278,7 +278,7 @@ ecma_builtin_object_object_freeze (ecma_value_t this_arg, /**< 'this' argument *
|
||||
{
|
||||
ecma_string_t *property_name_p = ecma_get_string_from_value (*iter.current_value_p);
|
||||
|
||||
// 2.a
|
||||
/* 2.a */
|
||||
ecma_property_descriptor_t prop_desc;
|
||||
|
||||
if (!ecma_op_object_get_own_property_descriptor (obj_p, property_name_p, &prop_desc))
|
||||
@@ -286,16 +286,16 @@ ecma_builtin_object_object_freeze (ecma_value_t this_arg, /**< 'this' argument *
|
||||
continue;
|
||||
}
|
||||
|
||||
// 2.b
|
||||
/* 2.b */
|
||||
if (prop_desc.is_writable_defined && prop_desc.is_writable)
|
||||
{
|
||||
prop_desc.is_writable = false;
|
||||
}
|
||||
|
||||
// 2.c
|
||||
/* 2.c */
|
||||
prop_desc.is_configurable = false;
|
||||
|
||||
// 2.d
|
||||
/* 2.d */
|
||||
ECMA_TRY_CATCH (define_own_prop_ret,
|
||||
ecma_op_object_define_own_property (obj_p,
|
||||
property_name_p,
|
||||
@@ -311,10 +311,10 @@ ecma_builtin_object_object_freeze (ecma_value_t this_arg, /**< 'this' argument *
|
||||
|
||||
if (ecma_is_value_empty (ret_value))
|
||||
{
|
||||
// 3.
|
||||
/* 3. */
|
||||
ecma_set_object_extensible (obj_p, false);
|
||||
|
||||
// 4.
|
||||
/* 4. */
|
||||
ret_value = ecma_copy_value (arg);
|
||||
}
|
||||
}
|
||||
@@ -369,7 +369,7 @@ ecma_builtin_object_object_is_sealed (ecma_value_t this_arg, /**< 'this' argumen
|
||||
JERRY_UNUSED (this_arg);
|
||||
ecma_value_t ret_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_EMPTY);
|
||||
|
||||
// 1.
|
||||
/* 1. */
|
||||
if (!ecma_is_value_object (arg))
|
||||
{
|
||||
ret_value = ecma_raise_type_error (ECMA_ERR_MSG ("Argument is not an object."));
|
||||
@@ -380,7 +380,7 @@ ecma_builtin_object_object_is_sealed (ecma_value_t this_arg, /**< 'this' argumen
|
||||
|
||||
bool is_sealed;
|
||||
|
||||
// 3.
|
||||
/* 3. */
|
||||
if (ecma_get_object_extensible (obj_p))
|
||||
{
|
||||
is_sealed = false;
|
||||
@@ -390,7 +390,7 @@ ecma_builtin_object_object_is_sealed (ecma_value_t this_arg, /**< 'this' argumen
|
||||
/* the value can be updated in the loop below */
|
||||
is_sealed = true;
|
||||
|
||||
// 2.
|
||||
/* 2. */
|
||||
ecma_collection_header_t *props_p = ecma_op_object_get_property_names (obj_p, false, false, false);
|
||||
|
||||
ecma_collection_iterator_t iter;
|
||||
@@ -400,13 +400,13 @@ ecma_builtin_object_object_is_sealed (ecma_value_t this_arg, /**< 'this' argumen
|
||||
{
|
||||
ecma_string_t *property_name_p = ecma_get_string_from_value (*iter.current_value_p);
|
||||
|
||||
// 2.a
|
||||
/* 2.a */
|
||||
ecma_property_t property = ecma_op_object_get_own_property (obj_p,
|
||||
property_name_p,
|
||||
NULL,
|
||||
ECMA_PROPERTY_GET_NO_OPTIONS);
|
||||
|
||||
// 2.b
|
||||
/* 2.b */
|
||||
if (ecma_is_property_configurable (property))
|
||||
{
|
||||
is_sealed = false;
|
||||
@@ -417,7 +417,7 @@ ecma_builtin_object_object_is_sealed (ecma_value_t this_arg, /**< 'this' argumen
|
||||
ecma_free_values_collection (props_p, true);
|
||||
}
|
||||
|
||||
// 4.
|
||||
/* 4. */
|
||||
ret_value = ecma_make_simple_value (is_sealed ? ECMA_SIMPLE_VALUE_TRUE
|
||||
: ECMA_SIMPLE_VALUE_FALSE);
|
||||
}
|
||||
@@ -441,7 +441,7 @@ ecma_builtin_object_object_is_frozen (ecma_value_t this_arg, /**< 'this' argumen
|
||||
JERRY_UNUSED (this_arg);
|
||||
ecma_value_t ret_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_EMPTY);
|
||||
|
||||
// 1.
|
||||
/* 1. */
|
||||
if (!ecma_is_value_object (arg))
|
||||
{
|
||||
ret_value = ecma_raise_type_error (ECMA_ERR_MSG ("Argument is not an object."));
|
||||
@@ -452,7 +452,7 @@ ecma_builtin_object_object_is_frozen (ecma_value_t this_arg, /**< 'this' argumen
|
||||
|
||||
bool is_frozen;
|
||||
|
||||
// 3.
|
||||
/* 3. */
|
||||
if (ecma_get_object_extensible (obj_p))
|
||||
{
|
||||
is_frozen = false;
|
||||
@@ -461,7 +461,7 @@ ecma_builtin_object_object_is_frozen (ecma_value_t this_arg, /**< 'this' argumen
|
||||
{
|
||||
is_frozen = true;
|
||||
|
||||
// 2.
|
||||
/* 2. */
|
||||
ecma_collection_header_t *props_p = ecma_op_object_get_property_names (obj_p, false, false, false);
|
||||
|
||||
ecma_collection_iterator_t iter;
|
||||
@@ -471,13 +471,13 @@ ecma_builtin_object_object_is_frozen (ecma_value_t this_arg, /**< 'this' argumen
|
||||
{
|
||||
ecma_string_t *property_name_p = ecma_get_string_from_value (*iter.current_value_p);
|
||||
|
||||
// 2.a
|
||||
/* 2.a */
|
||||
ecma_property_t property = ecma_op_object_get_own_property (obj_p,
|
||||
property_name_p,
|
||||
NULL,
|
||||
ECMA_PROPERTY_GET_NO_OPTIONS);
|
||||
|
||||
// 2.b
|
||||
/* 2.b */
|
||||
if (ECMA_PROPERTY_GET_TYPE (property) != ECMA_PROPERTY_TYPE_NAMEDACCESSOR
|
||||
&& ecma_is_property_writable (property))
|
||||
{
|
||||
@@ -485,7 +485,7 @@ ecma_builtin_object_object_is_frozen (ecma_value_t this_arg, /**< 'this' argumen
|
||||
break;
|
||||
}
|
||||
|
||||
// 2.c
|
||||
/* 2.c */
|
||||
if (ecma_is_property_configurable (property))
|
||||
{
|
||||
is_frozen = false;
|
||||
@@ -496,7 +496,7 @@ ecma_builtin_object_object_is_frozen (ecma_value_t this_arg, /**< 'this' argumen
|
||||
ecma_free_values_collection (props_p, true);
|
||||
}
|
||||
|
||||
// 4.
|
||||
/* 4 */
|
||||
ret_value = ecma_make_simple_value (is_frozen ? ECMA_SIMPLE_VALUE_TRUE
|
||||
: ECMA_SIMPLE_VALUE_FALSE);
|
||||
}
|
||||
@@ -585,7 +585,7 @@ ecma_builtin_object_object_get_own_property_descriptor (ecma_value_t this_arg, /
|
||||
JERRY_UNUSED (this_arg);
|
||||
ecma_value_t ret_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_EMPTY);
|
||||
|
||||
// 1.
|
||||
/* 1. */
|
||||
if (!ecma_is_value_object (arg1))
|
||||
{
|
||||
ret_value = ecma_raise_type_error (ECMA_ERR_MSG ("Argument is not an object."));
|
||||
@@ -594,19 +594,19 @@ ecma_builtin_object_object_get_own_property_descriptor (ecma_value_t this_arg, /
|
||||
|
||||
ecma_object_t *obj_p = ecma_get_object_from_value (arg1);
|
||||
|
||||
// 2.
|
||||
/* 2. */
|
||||
ECMA_TRY_CATCH (name_str_value,
|
||||
ecma_op_to_string (arg2),
|
||||
ret_value);
|
||||
|
||||
ecma_string_t *name_str_p = ecma_get_string_from_value (name_str_value);
|
||||
|
||||
// 3.
|
||||
/* 3. */
|
||||
ecma_property_descriptor_t prop_desc;
|
||||
|
||||
if (ecma_op_object_get_own_property_descriptor (obj_p, name_str_p, &prop_desc))
|
||||
{
|
||||
// 4.
|
||||
/* 4. */
|
||||
ecma_object_t *desc_obj_p = ecma_op_from_property_descriptor (&prop_desc);
|
||||
|
||||
ecma_free_property_descriptor (&prop_desc);
|
||||
@@ -639,7 +639,7 @@ ecma_builtin_object_object_create (ecma_value_t this_arg, /**< 'this' argument *
|
||||
{
|
||||
ecma_value_t ret_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_EMPTY);
|
||||
|
||||
// 1.
|
||||
/* 1. */
|
||||
if (!ecma_is_value_object (arg1) && !ecma_is_value_null (arg1))
|
||||
{
|
||||
ret_value = ecma_raise_type_error (ECMA_ERR_MSG ("Argument is not an object."));
|
||||
@@ -652,10 +652,10 @@ ecma_builtin_object_object_create (ecma_value_t this_arg, /**< 'this' argument *
|
||||
{
|
||||
obj_p = ecma_get_object_from_value (arg1);
|
||||
}
|
||||
// 2-3.
|
||||
/* 2-3. */
|
||||
ecma_object_t *result_obj_p = ecma_op_create_object_object_noarg_and_set_prototype (obj_p);
|
||||
|
||||
// 4.
|
||||
/* 4. */
|
||||
if (!ecma_is_value_undefined (arg2))
|
||||
{
|
||||
ECMA_TRY_CATCH (obj,
|
||||
@@ -666,7 +666,7 @@ ecma_builtin_object_object_create (ecma_value_t this_arg, /**< 'this' argument *
|
||||
ECMA_FINALIZE (obj);
|
||||
}
|
||||
|
||||
// 5.
|
||||
/* 5. */
|
||||
if (ecma_is_value_empty (ret_value))
|
||||
{
|
||||
ret_value = ecma_copy_value (ecma_make_object_value (result_obj_p));
|
||||
@@ -695,7 +695,7 @@ ecma_builtin_object_object_define_properties (ecma_value_t this_arg, /**< 'this'
|
||||
JERRY_UNUSED (this_arg);
|
||||
ecma_value_t ret_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_EMPTY);
|
||||
|
||||
// 1.
|
||||
/* 1. */
|
||||
if (!ecma_is_value_object (arg1))
|
||||
{
|
||||
ret_value = ecma_raise_type_error (ECMA_ERR_MSG ("Argument is not an object."));
|
||||
@@ -704,20 +704,20 @@ ecma_builtin_object_object_define_properties (ecma_value_t this_arg, /**< 'this'
|
||||
{
|
||||
ecma_object_t *obj_p = ecma_get_object_from_value (arg1);
|
||||
|
||||
// 2.
|
||||
/* 2. */
|
||||
ECMA_TRY_CATCH (props,
|
||||
ecma_op_to_object (arg2),
|
||||
ret_value);
|
||||
|
||||
ecma_object_t *props_p = ecma_get_object_from_value (props);
|
||||
// 3.
|
||||
/* 3. */
|
||||
ecma_collection_header_t *prop_names_p = ecma_op_object_get_property_names (props_p, false, true, false);
|
||||
uint32_t property_number = prop_names_p->unit_number;
|
||||
|
||||
ecma_collection_iterator_t iter;
|
||||
ecma_collection_iterator_init (&iter, prop_names_p);
|
||||
|
||||
// 4.
|
||||
/* 4. */
|
||||
JMEM_DEFINE_LOCAL_ARRAY (property_descriptors, property_number, ecma_property_descriptor_t);
|
||||
|
||||
uint32_t property_descriptor_number = 0;
|
||||
@@ -725,12 +725,12 @@ ecma_builtin_object_object_define_properties (ecma_value_t this_arg, /**< 'this'
|
||||
while (ecma_collection_iterator_next (&iter)
|
||||
&& ecma_is_value_empty (ret_value))
|
||||
{
|
||||
// 5.a
|
||||
/* 5.a */
|
||||
ECMA_TRY_CATCH (desc_obj,
|
||||
ecma_op_object_get (props_p, ecma_get_string_from_value (*iter.current_value_p)),
|
||||
ret_value);
|
||||
|
||||
// 5.b
|
||||
/* 5.b */
|
||||
ECMA_TRY_CATCH (conv_result,
|
||||
ecma_op_to_property_descriptor (desc_obj,
|
||||
&property_descriptors[property_descriptor_number]),
|
||||
@@ -742,7 +742,7 @@ ecma_builtin_object_object_define_properties (ecma_value_t this_arg, /**< 'this'
|
||||
ECMA_FINALIZE (desc_obj);
|
||||
}
|
||||
|
||||
// 6.
|
||||
/* 6. */
|
||||
ecma_collection_iterator_init (&iter, prop_names_p);
|
||||
for (uint32_t index = 0;
|
||||
index < property_number && ecma_is_value_empty (ret_value);
|
||||
@@ -761,7 +761,7 @@ ecma_builtin_object_object_define_properties (ecma_value_t this_arg, /**< 'this'
|
||||
ECMA_FINALIZE (define_own_prop_ret);
|
||||
}
|
||||
|
||||
// Clean up
|
||||
/* Clean up. */
|
||||
for (uint32_t index = 0;
|
||||
index < property_descriptor_number;
|
||||
index++)
|
||||
@@ -773,7 +773,7 @@ ecma_builtin_object_object_define_properties (ecma_value_t this_arg, /**< 'this'
|
||||
|
||||
ecma_free_values_collection (prop_names_p, true);
|
||||
|
||||
// 7.
|
||||
/* 7. */
|
||||
if (ecma_is_value_empty (ret_value))
|
||||
{
|
||||
ret_value = ecma_copy_value (arg1);
|
||||
|
||||
Reference in New Issue
Block a user