Skip to content

Commit 6f93c0e

Browse files
committed
Add JERRY_ATTR_ALWAYS_INLINE to all inline only function
JerryScript-DCO-1.0-Signed-off-by: Yonggang Luo [email protected]
1 parent da52445 commit 6f93c0e

File tree

10 files changed

+21
-21
lines changed

10 files changed

+21
-21
lines changed

jerry-core/ecma/base/ecma-gc.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ ecma_gc_set_object_visited (ecma_object_t *object_p) /**< object */
113113
/**
114114
* Initialize GC information for the object
115115
*/
116-
extern inline void
116+
extern inline void JERRY_ATTR_ALWAYS_INLINE
117117
ecma_init_gc_info (ecma_object_t *object_p) /**< object */
118118
{
119119
JERRY_CONTEXT (ecma_gc_objects_number)++;

jerry-core/ecma/base/ecma-helpers.c

+5-5
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ ecma_create_lex_env_class (ecma_object_t *outer_lexical_environment_p, /**< oute
204204
* @return true - if object is a lexical environment
205205
* false - otherwise
206206
*/
207-
extern inline bool JERRY_ATTR_PURE
207+
extern inline bool JERRY_ATTR_PURE JERRY_ATTR_ALWAYS_INLINE
208208
ecma_is_lexical_environment (const ecma_object_t *object_p) /**< object or lexical environment */
209209
{
210210
JERRY_ASSERT (object_p != NULL);
@@ -215,7 +215,7 @@ ecma_is_lexical_environment (const ecma_object_t *object_p) /**< object or lexic
215215
/**
216216
* Set value of [[Extensible]] object's internal property.
217217
*/
218-
extern inline void
218+
extern inline void JERRY_ATTR_ALWAYS_INLINE
219219
ecma_op_ordinary_object_set_extensible (ecma_object_t *object_p) /**< object */
220220
{
221221
JERRY_ASSERT (object_p != NULL);
@@ -229,7 +229,7 @@ ecma_op_ordinary_object_set_extensible (ecma_object_t *object_p) /**< object */
229229
*
230230
* @return type of the object (ecma_object_type_t)
231231
*/
232-
extern inline ecma_object_type_t JERRY_ATTR_PURE
232+
extern inline ecma_object_type_t JERRY_ATTR_PURE JERRY_ATTR_ALWAYS_INLINE
233233
ecma_get_object_type (const ecma_object_t *object_p) /**< object */
234234
{
235235
JERRY_ASSERT (object_p != NULL);
@@ -280,7 +280,7 @@ ecma_object_class_is (ecma_object_t *object_p, /**< object */
280280
*
281281
* @return type of the lexical environment (ecma_lexical_environment_type_t)
282282
*/
283-
extern inline ecma_lexical_environment_type_t JERRY_ATTR_PURE
283+
extern inline ecma_lexical_environment_type_t JERRY_ATTR_PURE JERRY_ATTR_ALWAYS_INLINE
284284
ecma_get_lex_env_type (const ecma_object_t *object_p) /**< lexical environment */
285285
{
286286
JERRY_ASSERT (object_p != NULL);
@@ -294,7 +294,7 @@ ecma_get_lex_env_type (const ecma_object_t *object_p) /**< lexical environment *
294294
*
295295
* @return pointer to ecma object
296296
*/
297-
extern inline ecma_object_t *JERRY_ATTR_PURE
297+
extern inline ecma_object_t *JERRY_ATTR_PURE JERRY_ATTR_ALWAYS_INLINE
298298
ecma_get_lex_env_binding_object (const ecma_object_t *object_p) /**< object-bound lexical environment */
299299
{
300300
JERRY_ASSERT (object_p != NULL);

jerry-core/ecma/builtin-objects/ecma-builtin-promise.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ enum
7373
* @return ecma value of the new promise.
7474
* Returned value must be freed with ecma_free_value.
7575
*/
76-
static inline ecma_value_t
76+
static inline ecma_value_t JERRY_ATTR_ALWAYS_INLINE
7777
ecma_builtin_promise_perform_race (ecma_value_t iterator, /**< the iterator for race */
7878
ecma_value_t next_method, /**< next method */
7979
ecma_object_t *capability_obj_p, /**< PromiseCapability record */
@@ -170,7 +170,7 @@ ecma_builtin_promise_perform_race (ecma_value_t iterator, /**< the iterator for
170170
* @return ecma value of the new promise.
171171
* Returned value must be freed with ecma_free_value.
172172
*/
173-
static inline ecma_value_t
173+
static inline ecma_value_t JERRY_ATTR_ALWAYS_INLINE
174174
ecma_builtin_promise_perform (ecma_value_t iterator, /**< iteratorRecord */
175175
ecma_value_t next_method, /**< next method */
176176
ecma_object_t *capability_obj_p, /**< PromiseCapability record */

jerry-core/ecma/operations/ecma-container-object.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
*
4747
* @return pointer to the internal buffer
4848
*/
49-
static inline ecma_collection_t *
49+
static inline ecma_collection_t *JERRY_ATTR_ALWAYS_INLINE
5050
ecma_op_create_internal_buffer (void)
5151
{
5252
ecma_collection_t *collection_p = ecma_new_collection ();
@@ -82,7 +82,7 @@ ecma_op_internal_buffer_append (ecma_collection_t *container_p, /**< internal co
8282
/**
8383
* Update the value of a given entry.
8484
*/
85-
static inline void
85+
static inline void JERRY_ATTR_ALWAYS_INLINE
8686
ecma_op_internal_buffer_update (ecma_value_t *entry_p, /**< entry pointer */
8787
ecma_value_t value_arg, /**< value argument */
8888
lit_magic_string_id_t lit_id) /**< class id */

jerry-core/ecma/operations/ecma-objects.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -2652,7 +2652,7 @@ ecma_builtin_is (ecma_object_t *object_p, /**< pointer to an object */
26522652
* @return true - if class name is an object
26532653
* false - otherwise
26542654
*/
2655-
static inline bool
2655+
static inline bool JERRY_ATTR_ALWAYS_INLINE
26562656
ecma_object_check_class_name_is_object (ecma_object_t *obj_p) /**< object */
26572657
{
26582658
#ifndef JERRY_NDEBUG
@@ -3244,7 +3244,7 @@ ecma_op_ordinary_object_set_prototype_of (ecma_object_t *obj_p, /**< base object
32443244
* @return true - if object is extensible
32453245
* false - otherwise
32463246
*/
3247-
extern inline bool JERRY_ATTR_PURE
3247+
extern inline bool JERRY_ATTR_PURE JERRY_ATTR_ALWAYS_INLINE
32483248
ecma_op_ordinary_object_is_extensible (ecma_object_t *object_p) /**< object */
32493249
{
32503250
JERRY_ASSERT (!ECMA_OBJECT_IS_PROXY (object_p));

jerry-core/parser/js/js-parser-expr.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ static bool parser_process_group_expression (parser_context_t *context_p, size_t
133133
/**
134134
* Generate byte code for operators with lvalue.
135135
*/
136-
static inline void
136+
static inline void JERRY_ATTR_ALWAYS_INLINE
137137
parser_push_result (parser_context_t *context_p) /**< context */
138138
{
139139
if (CBC_NO_RESULT_OPERATION (context_p->last_cbc_opcode))

jerry-core/parser/js/js-parser-mem.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -629,7 +629,7 @@ parser_stack_pop (parser_context_t *context_p, /**< context */
629629
/**
630630
* Initialize stack iterator.
631631
*/
632-
extern inline void
632+
extern inline void JERRY_ATTR_ALWAYS_INLINE
633633
parser_stack_iterator_init (parser_context_t *context_p, /**< context */
634634
parser_stack_iterator_t *iterator) /**< iterator */
635635
{
@@ -642,7 +642,7 @@ parser_stack_iterator_init (parser_context_t *context_p, /**< context */
642642
*
643643
* @return byte
644644
*/
645-
extern inline uint8_t
645+
extern inline uint8_t JERRY_ATTR_ALWAYS_INLINE
646646
parser_stack_iterator_read_uint8 (parser_stack_iterator_t *iterator) /**< iterator */
647647
{
648648
JERRY_ASSERT (iterator->current_position > 0 && iterator->current_position <= PARSER_STACK_PAGE_SIZE);

jerry-core/parser/js/js-parser-statm.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ typedef struct
244244
*
245245
* @return size consumed by a statement.
246246
*/
247-
static inline size_t
247+
static inline size_t JERRY_ATTR_ALWAYS_INLINE
248248
parser_statement_length (uint8_t type) /**< type of statement */
249249
{
250250
static const uint8_t statement_lengths[] = {
@@ -293,7 +293,7 @@ parser_statement_length (uint8_t type) /**< type of statement */
293293
/**
294294
* Parse expression enclosed in parens.
295295
*/
296-
static inline void
296+
static inline void JERRY_ATTR_ALWAYS_INLINE
297297
parser_parse_enclosed_expr (parser_context_t *context_p) /**< context */
298298
{
299299
lexer_next_token (context_p);

jerry-ext/debugger/debugger-serial.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ typedef struct
5353
/**
5454
* Correctly close a file descriptor.
5555
*/
56-
static inline void
56+
static inline void JERRY_ATTR_ALWAYS_INLINE
5757
jerryx_debugger_serial_close_fd (int fd) /**< file descriptor to close */
5858
{
5959
if (close (fd) != 0)
@@ -103,7 +103,7 @@ jerryx_debugger_serial_set_blocking (int fd, bool blocking)
103103
* @return true if everything is ok
104104
* false if there was an error
105105
*/
106-
static inline bool
106+
static inline bool JERRY_ATTR_ALWAYS_INLINE
107107
jerryx_debugger_serial_configure_attributes (int fd, jerryx_debugger_transport_serial_config_t serial_config)
108108
{
109109
struct termios options;

jerry-ext/debugger/debugger-tcp.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ typedef struct
8686
*
8787
* @return last error value.
8888
*/
89-
static inline int
89+
static inline int JERRY_ATTR_ALWAYS_INLINE
9090
jerryx_debugger_tcp_get_errno (void)
9191
{
9292
#ifdef _WIN32
@@ -99,7 +99,7 @@ jerryx_debugger_tcp_get_errno (void)
9999
/**
100100
* Correctly close a single socket.
101101
*/
102-
static inline void
102+
static inline void JERRY_ATTR_ALWAYS_INLINE
103103
jerryx_debugger_tcp_close_socket (jerryx_socket_t socket_id) /**< socket to close */
104104
{
105105
#ifdef _WIN32

0 commit comments

Comments
 (0)