Fix compile warnings about always_inline functions in GCC 5.2.0

The warning is "always_inline function might not be inlinable", fixed by
adding inline keyword. See:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55830

JerryScript-DCO-1.0-Signed-off-by: Geoff Gustafson geoff@linux.intel.com
This commit is contained in:
Geoff Gustafson
2016-03-22 18:25:00 -07:00
parent cc23c225ea
commit f0db5c9754
14 changed files with 60 additions and 60 deletions
+2 -2
View File
@@ -712,7 +712,7 @@ static const uint32_t max_uint32_len = (uint32_t) (sizeof (nums_with_ascending_l
*
* @return size in bytes
*/
static ecma_length_t __attr_always_inline___
static inline ecma_length_t __attr_always_inline___
ecma_string_get_number_in_desc_size (const uint32_t uint32_number) /**< number in the string-descriptor */
{
ecma_length_t size = 1;
@@ -731,7 +731,7 @@ ecma_string_get_number_in_desc_size (const uint32_t uint32_number) /**< number i
*
* @return number of bytes in the buffer
*/
static lit_utf8_size_t __attr_always_inline___
static inline lit_utf8_size_t __attr_always_inline___
ecma_string_get_heap_number_size (mem_cpointer_t number_cp) /**< Compressed pointer to an ecma_number_t */
{
const ecma_number_t *num_p = ECMA_GET_NON_NULL_POINTER (ecma_number_t, number_cp);
+12 -12
View File
@@ -94,7 +94,7 @@ ecma_set_value_value_field (ecma_value_t value, /**< ecma value to set field in
* @return true - if the value contains implementation-defined empty simple value,
* false - otherwise.
*/
bool __attr_pure___ __attr_always_inline___
inline bool __attr_pure___ __attr_always_inline___
ecma_is_value_empty (ecma_value_t value) /**< ecma value */
{
return (ecma_get_value_type_field (value) == ECMA_TYPE_SIMPLE
@@ -107,7 +107,7 @@ ecma_is_value_empty (ecma_value_t value) /**< ecma value */
* @return true - if the value contains ecma-undefined simple value,
* false - otherwise.
*/
bool __attr_pure___ __attr_always_inline___
inline bool __attr_pure___ __attr_always_inline___
ecma_is_value_undefined (ecma_value_t value) /**< ecma value */
{
return (ecma_get_value_type_field (value) == ECMA_TYPE_SIMPLE
@@ -120,7 +120,7 @@ ecma_is_value_undefined (ecma_value_t value) /**< ecma value */
* @return true - if the value contains ecma-null simple value,
* false - otherwise.
*/
bool __attr_pure___ __attr_always_inline___
inline bool __attr_pure___ __attr_always_inline___
ecma_is_value_null (ecma_value_t value) /**< ecma value */
{
return (ecma_get_value_type_field (value) == ECMA_TYPE_SIMPLE
@@ -133,7 +133,7 @@ ecma_is_value_null (ecma_value_t value) /**< ecma value */
* @return true - if the value contains ecma-true or ecma-false simple values,
* false - otherwise.
*/
bool __attr_pure___ __attr_always_inline___
inline bool __attr_pure___ __attr_always_inline___
ecma_is_value_boolean (ecma_value_t value) /**< ecma value */
{
return (ecma_get_value_type_field (value) == ECMA_TYPE_SIMPLE
@@ -147,7 +147,7 @@ ecma_is_value_boolean (ecma_value_t value) /**< ecma value */
* @return true - if the value contains ecma-true simple value,
* false - otherwise.
*/
bool __attr_pure___ __attr_always_inline___
inline bool __attr_pure___ __attr_always_inline___
ecma_is_value_true (ecma_value_t value) /**< ecma value */
{
return (ecma_get_value_type_field (value) == ECMA_TYPE_SIMPLE
@@ -160,7 +160,7 @@ ecma_is_value_true (ecma_value_t value) /**< ecma value */
* @return true - if the value contains ecma-false simple value,
* false - otherwise.
*/
bool __attr_pure___ __attr_always_inline___
inline bool __attr_pure___ __attr_always_inline___
ecma_is_value_false (ecma_value_t value) /**< ecma value */
{
return (ecma_get_value_type_field (value) == ECMA_TYPE_SIMPLE
@@ -173,7 +173,7 @@ ecma_is_value_false (ecma_value_t value) /**< ecma value */
* @return true - if the value contains ecma-array-hole simple value,
* false - otherwise.
*/
bool __attr_pure___ __attr_always_inline___
inline bool __attr_pure___ __attr_always_inline___
ecma_is_value_array_hole (ecma_value_t value) /**< ecma value */
{
return (ecma_get_value_type_field (value) == ECMA_TYPE_SIMPLE
@@ -186,7 +186,7 @@ ecma_is_value_array_hole (ecma_value_t value) /**< ecma value */
* @return true - if the value contains ecma-number value,
* false - otherwise.
*/
bool __attr_pure___ __attr_always_inline___
inline bool __attr_pure___ __attr_always_inline___
ecma_is_value_number (ecma_value_t value) /**< ecma value */
{
return (ecma_get_value_type_field (value) == ECMA_TYPE_NUMBER);
@@ -198,7 +198,7 @@ ecma_is_value_number (ecma_value_t value) /**< ecma value */
* @return true - if the value contains ecma-string value,
* false - otherwise.
*/
bool __attr_pure___ __attr_always_inline___
inline bool __attr_pure___ __attr_always_inline___
ecma_is_value_string (ecma_value_t value) /**< ecma value */
{
return (ecma_get_value_type_field (value) == ECMA_TYPE_STRING);
@@ -210,7 +210,7 @@ ecma_is_value_string (ecma_value_t value) /**< ecma value */
* @return true - if the value contains object value,
* false - otherwise.
*/
bool __attr_pure___ __attr_always_inline___
inline bool __attr_pure___ __attr_always_inline___
ecma_is_value_object (ecma_value_t value) /**< ecma value */
{
return (ecma_get_value_type_field (value) == ECMA_TYPE_OBJECT);
@@ -222,7 +222,7 @@ ecma_is_value_object (ecma_value_t value) /**< ecma value */
* @return true - if the value contains an error value,
* false - otherwise.
*/
bool __attr_pure___ __attr_always_inline___
inline bool __attr_pure___ __attr_always_inline___
ecma_is_value_error (ecma_value_t value) /**< ecma value */
{
return (value & (1u << ECMA_VALUE_ERROR_POS)) != 0;
@@ -246,7 +246,7 @@ ecma_check_value_type_is_spec_defined (ecma_value_t value) /**< ecma value */
/**
* Simple value constructor
*/
ecma_value_t __attr_const___ __attr_always_inline___
inline ecma_value_t __attr_const___ __attr_always_inline___
ecma_make_simple_value (const ecma_simple_value_t value) /**< simple value */
{
ecma_value_t ret_value = 0;
+6 -6
View File
@@ -952,7 +952,7 @@ JERRY_STATIC_ASSERT (ECMA_VALUE_SIZE <= 24,
*
* @return ecma value
*/
ecma_value_t __attr_always_inline___
inline ecma_value_t __attr_always_inline___
ecma_get_named_data_property_value (const ecma_property_t *prop_p) /**< property */
{
JERRY_ASSERT (prop_p->flags & ECMA_PROPERTY_FLAG_NAMEDDATA);
@@ -964,7 +964,7 @@ ecma_get_named_data_property_value (const ecma_property_t *prop_p) /**< property
/**
* Set value field of named data property
*/
void __attr_always_inline___
inline void __attr_always_inline___
ecma_set_named_data_property_value (ecma_property_t *prop_p, /**< property */
ecma_value_t value) /**< value to set */
{
@@ -1081,7 +1081,7 @@ ecma_set_named_accessor_property_setter (ecma_object_t *object_p, /**< the prope
* @return true - property is writable,
* false - otherwise.
*/
bool __attr_always_inline___
inline bool __attr_always_inline___
ecma_is_property_writable (ecma_property_t *prop_p) /**< property */
{
JERRY_ASSERT (prop_p->flags & ECMA_PROPERTY_FLAG_NAMEDDATA);
@@ -1115,7 +1115,7 @@ ecma_set_property_writable_attr (ecma_property_t *prop_p, /**< property */
* @return true - property is enumerable,
* false - otherwise.
*/
bool __attr_always_inline___
inline bool __attr_always_inline___
ecma_is_property_enumerable (ecma_property_t *prop_p) /**< property */
{
JERRY_ASSERT (prop_p->flags & (ECMA_PROPERTY_FLAG_NAMEDDATA | ECMA_PROPERTY_FLAG_NAMEDACCESSOR));
@@ -1149,7 +1149,7 @@ ecma_set_property_enumerable_attr (ecma_property_t *prop_p, /**< property */
* @return true - property is configurable,
* false - otherwise.
*/
bool __attr_always_inline___
inline bool __attr_always_inline___
ecma_is_property_configurable (ecma_property_t *prop_p) /**< property */
{
JERRY_ASSERT (prop_p->flags & (ECMA_PROPERTY_FLAG_NAMEDDATA | ECMA_PROPERTY_FLAG_NAMEDACCESSOR));
@@ -1182,7 +1182,7 @@ ecma_set_property_configurable_attr (ecma_property_t *prop_p, /**< property */
*
* @return true / false
*/
bool __attr_always_inline___
inline bool __attr_always_inline___
ecma_is_property_lcached (ecma_property_t *prop_p) /**< property */
{
JERRY_ASSERT (prop_p->flags & (ECMA_PROPERTY_FLAG_NAMEDDATA | ECMA_PROPERTY_FLAG_NAMEDACCESSOR));
+1 -1
View File
@@ -234,7 +234,7 @@ ecma_lcache_insert (ecma_object_t *object_p, /**< object */
* @return true - if (object, property name) pair is registered in LCache,
* false - probably, not registered.
*/
bool __attr_always_inline___
inline bool __attr_always_inline___
ecma_lcache_lookup (ecma_object_t *object_p, /**< object */
const ecma_string_t *prop_name_p, /**< property's name */
ecma_property_t **prop_p_p) /**< [out] if return value is true,
@@ -56,7 +56,7 @@
*
* @return time value for day number
*/
ecma_number_t __attr_always_inline___
inline ecma_number_t __attr_always_inline___
ecma_date_day (ecma_number_t time) /**< time value */
{
if (ecma_number_is_nan (time))
@@ -83,7 +83,7 @@ ecma_date_day (ecma_number_t time) /**< time value */
*
* @return time value within the day
*/
ecma_number_t __attr_always_inline___
inline ecma_number_t __attr_always_inline___
ecma_date_time_within_day (ecma_number_t time) /**< time value */
{
if (ecma_number_is_nan (time))
@@ -102,7 +102,7 @@ ecma_date_time_within_day (ecma_number_t time) /**< time value */
*
* @return number of days
*/
ecma_number_t __attr_always_inline___
inline ecma_number_t __attr_always_inline___
ecma_date_days_in_year (ecma_number_t year) /**< year value */
{
if (ecma_number_is_nan (year))
@@ -136,7 +136,7 @@ ecma_date_days_in_year (ecma_number_t year) /**< year value */
*
* @return day number of the first day of a year
*/
ecma_number_t __attr_always_inline___
inline ecma_number_t __attr_always_inline___
ecma_date_day_from_year (ecma_number_t year) /**< year value */
{
if (ecma_number_is_nan (year))
@@ -158,7 +158,7 @@ ecma_date_day_from_year (ecma_number_t year) /**< year value */
*
* @return time value of the start of a year
*/
ecma_number_t __attr_always_inline___
inline ecma_number_t __attr_always_inline___
ecma_date_time_from_year (ecma_number_t year) /**< year value */
{
if (ecma_number_is_nan (year))
@@ -224,7 +224,7 @@ ecma_date_year_from_time (ecma_number_t time) /**< time value */
*
* @return 1 if time within a leap year and otherwise is zero
*/
ecma_number_t __attr_always_inline___
inline ecma_number_t __attr_always_inline___
ecma_date_in_leap_year (ecma_number_t time) /**< time value */
{
if (ecma_number_is_nan (time))
@@ -243,7 +243,7 @@ ecma_date_in_leap_year (ecma_number_t time) /**< time value */
*
* @return number of days within year
*/
ecma_number_t __attr_always_inline___
inline ecma_number_t __attr_always_inline___
ecma_date_day_within_year (ecma_number_t time) /**< time value */
{
if (ecma_number_is_nan (time))
@@ -428,7 +428,7 @@ ecma_date_date_from_time (ecma_number_t time) /**< time value */
*
* @return weekday number
*/
ecma_number_t __attr_always_inline___
inline ecma_number_t __attr_always_inline___
ecma_date_week_day (ecma_number_t time) /**< time value */
{
if (ecma_number_is_nan (time))
@@ -447,7 +447,7 @@ ecma_date_week_day (ecma_number_t time) /**< time value */
*
* @return local time zone adjustment
*/
ecma_number_t __attr_always_inline___
inline ecma_number_t __attr_always_inline___
ecma_date_local_tza ()
{
#ifdef JERRY_ENABLE_DATE_SYS_CALLS
@@ -475,7 +475,7 @@ ecma_date_local_tza ()
*
* @return daylight saving time adjustment
*/
ecma_number_t __attr_always_inline___
inline ecma_number_t __attr_always_inline___
ecma_date_daylight_saving_ta (ecma_number_t time) /**< time value */
{
if (ecma_number_is_nan (time))
@@ -520,7 +520,7 @@ ecma_date_daylight_saving_ta (ecma_number_t time) /**< time value */
*
* @return local time
*/
ecma_number_t __attr_always_inline___
inline ecma_number_t __attr_always_inline___
ecma_date_local_time (ecma_number_t time) /**< time value */
{
if (ecma_number_is_nan (time))
@@ -543,7 +543,7 @@ ecma_date_local_time (ecma_number_t time) /**< time value */
*
* @return utc value
*/
ecma_number_t __attr_always_inline___
inline ecma_number_t __attr_always_inline___
ecma_date_utc (ecma_number_t time) /**< time value */
{
if (ecma_number_is_nan (time))
@@ -573,7 +573,7 @@ ecma_date_utc (ecma_number_t time) /**< time value */
*
* @return hour value
*/
ecma_number_t __attr_always_inline___
inline ecma_number_t __attr_always_inline___
ecma_date_hour_from_time (ecma_number_t time) /**< time value */
{
if (ecma_number_is_nan (time))
@@ -604,7 +604,7 @@ ecma_date_hour_from_time (ecma_number_t time) /**< time value */
*
* @return minute value
*/
ecma_number_t __attr_always_inline___
inline ecma_number_t __attr_always_inline___
ecma_date_min_from_time (ecma_number_t time) /**< time value */
{
if (ecma_number_is_nan (time))
@@ -635,7 +635,7 @@ ecma_date_min_from_time (ecma_number_t time) /**< time value */
*
* @return second value
*/
ecma_number_t __attr_always_inline___
inline ecma_number_t __attr_always_inline___
ecma_date_sec_from_time (ecma_number_t time) /**< time value */
{
if (ecma_number_is_nan (time))
@@ -666,7 +666,7 @@ ecma_date_sec_from_time (ecma_number_t time) /**< time value */
*
* @return millisecond value
*/
ecma_number_t __attr_always_inline___
inline ecma_number_t __attr_always_inline___
ecma_date_ms_from_time (ecma_number_t time) /**< time value */
{
if (ecma_number_is_nan (time))
@@ -828,7 +828,7 @@ ecma_date_make_day (ecma_number_t year, /**< year value */
*
* @return date value
*/
ecma_number_t __attr_always_inline___
inline ecma_number_t __attr_always_inline___
ecma_date_make_date (ecma_number_t day, /**< day value */
ecma_number_t time) /**< time value */
{
@@ -855,7 +855,7 @@ ecma_date_make_date (ecma_number_t day, /**< day value */
*
* @return number of milliseconds
*/
ecma_number_t __attr_always_inline___
inline ecma_number_t __attr_always_inline___
ecma_date_time_clip (ecma_number_t time) /**< time value */
{
if (ecma_number_is_nan (time)
@@ -879,7 +879,7 @@ ecma_date_time_clip (ecma_number_t time) /**< time value */
*
* @return timezone offset
*/
ecma_number_t __attr_always_inline___
inline ecma_number_t __attr_always_inline___
ecma_date_timezone_offset (ecma_number_t time) /**< time value */
{
if (ecma_number_is_nan (time))
@@ -329,7 +329,7 @@ ecma_op_create_regexp_object (ecma_string_t *pattern_p, /**< input pattern */
*
* @return ecma_char_t canonicalized character
*/
ecma_char_t __attr_always_inline___
inline ecma_char_t __attr_always_inline___
re_canonicalize (ecma_char_t ch, /**< character */
bool is_ignorecase) /**< IgnoreCase flag */
{