Build fix for ALL_IN_ONE.
Add another argument for the JERRY_STATIC_ASSERT with the description of the assert statement. The release.linux build fails with enabled ALL_IN_ONE option. There is no redefinition of typedef in C99. JerryScript-DCO-1.0-Signed-off-by: Robert Sipka rsipka.uszeged@partner.samsung.com
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
/* Copyright 2014-2015 Samsung Electronics Co., Ltd.
|
||||
/* Copyright 2014-2016 Samsung Electronics Co., Ltd.
|
||||
* Copyright 2016 University of Szeged.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -20,16 +21,24 @@
|
||||
#include "jrt.h"
|
||||
#include "mem-poolman.h"
|
||||
|
||||
JERRY_STATIC_ASSERT (sizeof (ecma_property_t) <= sizeof (uint64_t));
|
||||
JERRY_STATIC_ASSERT (sizeof (ecma_property_t) <= sizeof (uint64_t),
|
||||
size_of_ecma_property_t_must_be_less_than_or_equal_to_8_bytes);
|
||||
|
||||
JERRY_STATIC_ASSERT (sizeof (ecma_object_t) <= sizeof (uint64_t));
|
||||
JERRY_STATIC_ASSERT (ECMA_OBJECT_OBJ_TYPE_SIZE <= sizeof (uint64_t) * JERRY_BITSINBYTE);
|
||||
JERRY_STATIC_ASSERT (ECMA_OBJECT_LEX_ENV_TYPE_SIZE <= sizeof (uint64_t) * JERRY_BITSINBYTE);
|
||||
JERRY_STATIC_ASSERT (sizeof (ecma_object_t) <= sizeof (uint64_t),
|
||||
size_of_ecma_object_t_must_be_less_than_or_equal_to_8_bytes);
|
||||
JERRY_STATIC_ASSERT (ECMA_OBJECT_OBJ_TYPE_SIZE <= sizeof (uint64_t) * JERRY_BITSINBYTE,
|
||||
ECMA_OBJECT_OBJ_TYPE_SIZE_must_be_less_than_or_equal_to_64_bits);
|
||||
JERRY_STATIC_ASSERT (ECMA_OBJECT_LEX_ENV_TYPE_SIZE <= sizeof (uint64_t) * JERRY_BITSINBYTE,
|
||||
ECMA_OBJECT_LEX_ENV_TYPE_SIZE_must_be_less_than_or_equal_to_64_bits);
|
||||
|
||||
JERRY_STATIC_ASSERT (sizeof (ecma_collection_header_t) == sizeof (uint64_t));
|
||||
JERRY_STATIC_ASSERT (sizeof (ecma_collection_chunk_t) == sizeof (uint64_t));
|
||||
JERRY_STATIC_ASSERT (sizeof (ecma_string_t) == sizeof (uint64_t));
|
||||
JERRY_STATIC_ASSERT (sizeof (ecma_getter_setter_pointers_t) <= sizeof (uint64_t));
|
||||
JERRY_STATIC_ASSERT (sizeof (ecma_collection_header_t) == sizeof (uint64_t),
|
||||
size_of_ecma_collection_header_t_must_be_less_than_or_equal_to_8_bytes);
|
||||
JERRY_STATIC_ASSERT (sizeof (ecma_collection_chunk_t) == sizeof (uint64_t),
|
||||
size_of_ecma_collection_chunk_t_must_be_less_than_or_equal_to_8_bytes);
|
||||
JERRY_STATIC_ASSERT (sizeof (ecma_string_t) == sizeof (uint64_t),
|
||||
size_of_ecma_string_t_must_be_less_than_or_equal_to_8_bytes);
|
||||
JERRY_STATIC_ASSERT (sizeof (ecma_getter_setter_pointers_t) <= sizeof (uint64_t),
|
||||
size_of_ecma_getter_setter_pointers_t_must_be_less_than_or_equal_to_8_bytes);
|
||||
|
||||
/** \addtogroup ecma ECMA
|
||||
* @{
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
/* Copyright 2015 Samsung Electronics Co., Ltd.
|
||||
/* Copyright 2015-2016 Samsung Electronics Co., Ltd.
|
||||
* Copyright 2016 University of Szeged.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -60,7 +61,8 @@ ecma_create_external_pointer_property (ecma_object_t *obj_p, /**< object to crea
|
||||
is_new = false;
|
||||
}
|
||||
|
||||
JERRY_STATIC_ASSERT (sizeof (uint32_t) <= sizeof (prop_p->u.internal_property.value));
|
||||
JERRY_STATIC_ASSERT (sizeof (uint32_t) <= sizeof (prop_p->u.internal_property.value),
|
||||
size_of_internal_property_value_must_be_greater_than_or_equal_to_4_bytes);
|
||||
|
||||
if (sizeof (ecma_external_pointer_t) == sizeof (uint32_t))
|
||||
{
|
||||
@@ -119,8 +121,6 @@ ecma_get_external_pointer_value (ecma_object_t *obj_p, /**< object to get proper
|
||||
return false;
|
||||
}
|
||||
|
||||
JERRY_STATIC_ASSERT (sizeof (uint32_t) <= sizeof (prop_p->u.internal_property.value));
|
||||
|
||||
if (sizeof (ecma_external_pointer_t) == sizeof (uint32_t))
|
||||
{
|
||||
*out_pointer_p = (ecma_external_pointer_t) prop_p->u.internal_property.value;
|
||||
|
||||
@@ -25,7 +25,8 @@
|
||||
#include "ecma-helpers.h"
|
||||
|
||||
#if CONFIG_ECMA_NUMBER_TYPE == CONFIG_ECMA_NUMBER_FLOAT32
|
||||
JERRY_STATIC_ASSERT (sizeof (ecma_number_t) == sizeof (uint32_t));
|
||||
JERRY_STATIC_ASSERT (sizeof (ecma_number_t) == sizeof (uint32_t),
|
||||
size_of_ecma_number_t_must_be_equal_to_4_bytes);
|
||||
|
||||
/**
|
||||
* Packing sign, fraction and biased exponent to ecma-number
|
||||
@@ -111,7 +112,8 @@ const int32_t ecma_number_exponent_bias = 127;
|
||||
*/
|
||||
const ecma_number_t ecma_number_relative_eps = 1.0e-10f;
|
||||
#elif CONFIG_ECMA_NUMBER_TYPE == CONFIG_ECMA_NUMBER_FLOAT64
|
||||
JERRY_STATIC_ASSERT (sizeof (ecma_number_t) == sizeof (uint64_t));
|
||||
JERRY_STATIC_ASSERT (sizeof (ecma_number_t) == sizeof (uint64_t),
|
||||
size_of_ecma_number_t_must_be_equal_to_8_bytes);
|
||||
|
||||
/**
|
||||
* Packing sign, fraction and biased exponent to ecma-number
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
/* Copyright 2014-2016 Samsung Electronics Co., Ltd.
|
||||
* Copyright 2016 University of Szeged.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -41,8 +42,9 @@
|
||||
/**
|
||||
* The length should be representable with int32_t.
|
||||
*/
|
||||
JERRY_STATIC_ASSERT ((uint32_t) ((int32_t) ECMA_STRING_MAX_CONCATENATION_LENGTH) ==
|
||||
ECMA_STRING_MAX_CONCATENATION_LENGTH);
|
||||
JERRY_STATIC_ASSERT ((int32_t) ECMA_STRING_MAX_CONCATENATION_LENGTH ==
|
||||
ECMA_STRING_MAX_CONCATENATION_LENGTH,
|
||||
ECMA_STRING_MAX_CONCATENATION_LENGTH_should_be_representable_with_int32_t);
|
||||
|
||||
static void
|
||||
ecma_init_ecma_string_from_lit_cp (ecma_string_t *string_p,
|
||||
|
||||
@@ -28,7 +28,8 @@
|
||||
#include "jrt-bit-fields.h"
|
||||
#include "vm-defines.h"
|
||||
|
||||
JERRY_STATIC_ASSERT (sizeof (ecma_value_t) * JERRY_BITSINBYTE >= ECMA_VALUE_SIZE);
|
||||
JERRY_STATIC_ASSERT (sizeof (ecma_value_t) * JERRY_BITSINBYTE >= ECMA_VALUE_SIZE,
|
||||
bits_in_ecma_value_t_must_be_greater_than_or_equal_to_ECMA_VALUE_SIZE);
|
||||
|
||||
/**
|
||||
* Get type field of ecma value
|
||||
|
||||
@@ -444,7 +444,11 @@ ecma_create_internal_property (ecma_object_t *object_p, /**< the object */
|
||||
ECMA_SET_POINTER (new_property_p->next_property_p, list_head_p);
|
||||
ecma_set_property_list (object_p, new_property_p);
|
||||
|
||||
JERRY_STATIC_ASSERT (ECMA_INTERNAL_PROPERTY__COUNT <= (1ull << ECMA_PROPERTY_INTERNAL_PROPERTY_TYPE_WIDTH));
|
||||
JERRY_STATIC_ASSERT (
|
||||
ECMA_INTERNAL_PROPERTY__COUNT <= (1ull << ECMA_PROPERTY_INTERNAL_PROPERTY_TYPE_WIDTH),
|
||||
ECMA_PROPERTY_INTERNAL_PROPERTY_TYPE_WIDTH_bits_must_be_able_to_represent_ECMA_INTERNAL_PROPERTY__COUNT_values
|
||||
);
|
||||
|
||||
JERRY_ASSERT (property_id < ECMA_INTERNAL_PROPERTY__COUNT);
|
||||
|
||||
new_property_p->u.internal_property.type = property_id & ((1ull << ECMA_PROPERTY_INTERNAL_PROPERTY_TYPE_WIDTH) - 1);
|
||||
|
||||
@@ -45,7 +45,8 @@ typedef struct
|
||||
uint16_t padding;
|
||||
} ecma_lcache_hash_entry_t;
|
||||
|
||||
JERRY_STATIC_ASSERT (sizeof (ecma_lcache_hash_entry_t) == sizeof (uint64_t));
|
||||
JERRY_STATIC_ASSERT (sizeof (ecma_lcache_hash_entry_t) == sizeof (uint64_t),
|
||||
size_of_ecma_lcache_hash_entry_t_must_be_equal_to_8_bytes);
|
||||
|
||||
/**
|
||||
* LCache hash value length, in bits
|
||||
|
||||
Reference in New Issue
Block a user