Skip to content

Commit fe3b0a8

Browse files
authored
Fixes ENABLE_AMALGAM need FORCE set to ON when building with MSVC (#4392)
JerryScript-DCO-1.0-Signed-off-by: Yonggang Luo [email protected]
1 parent fd0ca7d commit fe3b0a8

31 files changed

+171
-173
lines changed

CMakeLists.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,10 +105,8 @@ if(USING_TI)
105105
endif()
106106

107107
if(USING_MSVC)
108-
set(ENABLE_AMALGAM ON) # FIXME: This should not be needed but right now it is. To be tracked down and followed up.
109108
set(ENABLE_STRIP OFF)
110109

111-
set(ENABLE_AMALGAM_MESSAGE " (FORCED BY COMPILER)")
112110
set(ENABLE_STRIP_MESSAGE " (FORCED BY COMPILER)")
113111
endif()
114112

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

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ ecma_dealloc_number (ecma_number_t *number_p) /**< number to be freed */
7171
*
7272
* @return pointer to allocated memory
7373
*/
74-
inline ecma_object_t * JERRY_ATTR_ALWAYS_INLINE
74+
extern inline ecma_object_t * JERRY_ATTR_ALWAYS_INLINE
7575
ecma_alloc_object (void)
7676
{
7777
#if ENABLED (JERRY_MEM_STATS)
@@ -84,7 +84,7 @@ ecma_alloc_object (void)
8484
/**
8585
* Dealloc memory from an ecma-object
8686
*/
87-
inline void JERRY_ATTR_ALWAYS_INLINE
87+
extern inline void JERRY_ATTR_ALWAYS_INLINE
8888
ecma_dealloc_object (ecma_object_t *object_p) /**< object to be freed */
8989
{
9090
#if ENABLED (JERRY_MEM_STATS)
@@ -99,7 +99,7 @@ ecma_dealloc_object (ecma_object_t *object_p) /**< object to be freed */
9999
*
100100
* @return pointer to allocated memory
101101
*/
102-
inline ecma_extended_object_t * JERRY_ATTR_ALWAYS_INLINE
102+
extern inline ecma_extended_object_t * JERRY_ATTR_ALWAYS_INLINE
103103
ecma_alloc_extended_object (size_t size) /**< size of object */
104104
{
105105
#if ENABLED (JERRY_MEM_STATS)
@@ -112,7 +112,7 @@ ecma_alloc_extended_object (size_t size) /**< size of object */
112112
/**
113113
* Dealloc memory of an extended object
114114
*/
115-
inline void JERRY_ATTR_ALWAYS_INLINE
115+
extern inline void JERRY_ATTR_ALWAYS_INLINE
116116
ecma_dealloc_extended_object (ecma_object_t *object_p, /**< extended object */
117117
size_t size) /**< size of object */
118118
{
@@ -128,7 +128,7 @@ ecma_dealloc_extended_object (ecma_object_t *object_p, /**< extended object */
128128
*
129129
* @return pointer to allocated memory
130130
*/
131-
inline ecma_string_t * JERRY_ATTR_ALWAYS_INLINE
131+
extern inline ecma_string_t * JERRY_ATTR_ALWAYS_INLINE
132132
ecma_alloc_string (void)
133133
{
134134
#if ENABLED (JERRY_MEM_STATS)
@@ -141,7 +141,7 @@ ecma_alloc_string (void)
141141
/**
142142
* Dealloc memory from ecma-string descriptor
143143
*/
144-
inline void JERRY_ATTR_ALWAYS_INLINE
144+
extern inline void JERRY_ATTR_ALWAYS_INLINE
145145
ecma_dealloc_string (ecma_string_t *string_p) /**< string to be freed */
146146
{
147147
#if ENABLED (JERRY_MEM_STATS)
@@ -156,7 +156,7 @@ ecma_dealloc_string (ecma_string_t *string_p) /**< string to be freed */
156156
*
157157
* @return pointer to allocated memory
158158
*/
159-
inline ecma_extended_string_t * JERRY_ATTR_ALWAYS_INLINE
159+
extern inline ecma_extended_string_t * JERRY_ATTR_ALWAYS_INLINE
160160
ecma_alloc_extended_string (void)
161161
{
162162
#if ENABLED (JERRY_MEM_STATS)
@@ -169,7 +169,7 @@ ecma_alloc_extended_string (void)
169169
/**
170170
* Dealloc memory from extended ecma-string descriptor
171171
*/
172-
inline void JERRY_ATTR_ALWAYS_INLINE
172+
extern inline void JERRY_ATTR_ALWAYS_INLINE
173173
ecma_dealloc_extended_string (ecma_extended_string_t *ext_string_p) /**< extended string to be freed */
174174
{
175175
#if ENABLED (JERRY_MEM_STATS)
@@ -184,7 +184,7 @@ ecma_dealloc_extended_string (ecma_extended_string_t *ext_string_p) /**< extende
184184
*
185185
* @return pointer to allocated memory
186186
*/
187-
inline ecma_external_string_t * JERRY_ATTR_ALWAYS_INLINE
187+
extern inline ecma_external_string_t * JERRY_ATTR_ALWAYS_INLINE
188188
ecma_alloc_external_string (void)
189189
{
190190
#if ENABLED (JERRY_MEM_STATS)
@@ -197,7 +197,7 @@ ecma_alloc_external_string (void)
197197
/**
198198
* Dealloc memory from external ecma-string descriptor
199199
*/
200-
inline void JERRY_ATTR_ALWAYS_INLINE
200+
extern inline void JERRY_ATTR_ALWAYS_INLINE
201201
ecma_dealloc_external_string (ecma_external_string_t *ext_string_p) /**< external string to be freed */
202202
{
203203
#if ENABLED (JERRY_MEM_STATS)
@@ -212,7 +212,7 @@ ecma_dealloc_external_string (ecma_external_string_t *ext_string_p) /**< externa
212212
*
213213
* @return pointer to allocated memory
214214
*/
215-
inline ecma_string_t * JERRY_ATTR_ALWAYS_INLINE
215+
extern inline ecma_string_t * JERRY_ATTR_ALWAYS_INLINE
216216
ecma_alloc_string_buffer (size_t size) /**< size of string */
217217
{
218218
#if ENABLED (JERRY_MEM_STATS)
@@ -225,7 +225,7 @@ ecma_alloc_string_buffer (size_t size) /**< size of string */
225225
/**
226226
* Dealloc memory of a string with character data
227227
*/
228-
inline void JERRY_ATTR_ALWAYS_INLINE
228+
extern inline void JERRY_ATTR_ALWAYS_INLINE
229229
ecma_dealloc_string_buffer (ecma_string_t *string_p, /**< string with data */
230230
size_t size) /**< size of string */
231231
{
@@ -241,7 +241,7 @@ ecma_dealloc_string_buffer (ecma_string_t *string_p, /**< string with data */
241241
*
242242
* @return pointer to allocated memory
243243
*/
244-
inline ecma_property_pair_t * JERRY_ATTR_ALWAYS_INLINE
244+
extern inline ecma_property_pair_t * JERRY_ATTR_ALWAYS_INLINE
245245
ecma_alloc_property_pair (void)
246246
{
247247
#if ENABLED (JERRY_MEM_STATS)
@@ -254,7 +254,7 @@ ecma_alloc_property_pair (void)
254254
/**
255255
* Dealloc memory of an ecma-property
256256
*/
257-
inline void JERRY_ATTR_ALWAYS_INLINE
257+
extern inline void JERRY_ATTR_ALWAYS_INLINE
258258
ecma_dealloc_property_pair (ecma_property_pair_t *property_pair_p) /**< property pair to be freed */
259259
{
260260
#if ENABLED (JERRY_MEM_STATS)

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ ecma_gc_set_object_visited (ecma_object_t *object_p) /**< object */
111111
/**
112112
* Initialize GC information for the object
113113
*/
114-
inline void
114+
extern inline void
115115
ecma_init_gc_info (ecma_object_t *object_p) /**< object */
116116
{
117117
JERRY_CONTEXT (ecma_gc_objects_number)++;
@@ -143,7 +143,7 @@ ecma_ref_object (ecma_object_t *object_p) /**< object */
143143
/**
144144
* Decrease reference counter of an object
145145
*/
146-
inline void JERRY_ATTR_ALWAYS_INLINE
146+
extern inline void JERRY_ATTR_ALWAYS_INLINE
147147
ecma_deref_object (ecma_object_t *object_p) /**< object */
148148
{
149149
JERRY_ASSERT (object_p->type_flags_refs >= ECMA_OBJECT_REF_ONE);

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ ecma_new_collection (void)
4949
/**
5050
* Deallocate a collection of ecma values without freeing it's values
5151
*/
52-
inline void JERRY_ATTR_ALWAYS_INLINE
52+
extern inline void JERRY_ATTR_ALWAYS_INLINE
5353
ecma_collection_destroy (ecma_collection_t *collection_p) /**< value collection */
5454
{
5555
JERRY_ASSERT (collection_p != NULL);

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ ecma_divide_high_prec_by_10 (ecma_high_prec_t *hp_data_p) /**< [in, out] high-pr
133133
*
134134
* @return number of generated digits
135135
*/
136-
inline lit_utf8_size_t JERRY_ATTR_ALWAYS_INLINE
136+
extern inline lit_utf8_size_t JERRY_ATTR_ALWAYS_INLINE
137137
ecma_errol0_dtoa (double val, /**< ecma number */
138138
lit_utf8_byte_t *buffer_p, /**< buffer to generate digits into */
139139
int32_t *exp_p) /**< [out] exponent */

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ ecma_number_make_infinity (bool sign) /**< true - for negative Infinity,
282282
* @return true - if sign bit of ecma-number is set
283283
* false - otherwise
284284
*/
285-
inline bool JERRY_ATTR_ALWAYS_INLINE
285+
extern inline bool JERRY_ATTR_ALWAYS_INLINE
286286
ecma_number_is_negative (ecma_number_t num) /**< ecma-number */
287287
{
288288
JERRY_ASSERT (!ecma_number_is_nan (num));
@@ -688,7 +688,7 @@ ecma_number_pow (ecma_number_t x, /**< left operand */
688688
*
689689
* @return number - result of multiplication.
690690
*/
691-
inline ecma_value_t JERRY_ATTR_ALWAYS_INLINE
691+
extern inline ecma_value_t JERRY_ATTR_ALWAYS_INLINE
692692
ecma_integer_multiply (ecma_integer_value_t left_integer, /**< left operand */
693693
ecma_integer_value_t right_integer) /**< right operand */
694694
{

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

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1012,7 +1012,7 @@ ecma_string_to_number (const ecma_string_t *string_p) /**< ecma-string */
10121012
* @return ECMA_STRING_NOT_ARRAY_INDEX if string is not array index
10131013
* the array index otherwise
10141014
*/
1015-
inline uint32_t JERRY_ATTR_ALWAYS_INLINE
1015+
extern inline uint32_t JERRY_ATTR_ALWAYS_INLINE
10161016
ecma_string_get_array_index (const ecma_string_t *str_p) /**< ecma-string */
10171017
{
10181018
if (ECMA_IS_DIRECT_STRING (str_p))
@@ -1369,7 +1369,7 @@ ecma_substring_copy_to_utf8_buffer (const ecma_string_t *string_desc_p, /**< ecm
13691369
* It is the caller's responsibility to make sure that the string fits in the buffer.
13701370
* Check if the size of the string is equal with the size of the buffer.
13711371
*/
1372-
inline void JERRY_ATTR_ALWAYS_INLINE
1372+
extern inline void JERRY_ATTR_ALWAYS_INLINE
13731373
ecma_string_to_utf8_bytes (const ecma_string_t *string_desc_p, /**< ecma-string descriptor */
13741374
lit_utf8_byte_t *buffer_p, /**< destination buffer pointer
13751375
* (can be NULL if buffer_size == 0) */
@@ -1589,7 +1589,7 @@ ecma_string_get_chars (const ecma_string_t *string_p, /**< ecma-string */
15891589
* @return true - if the string equals to the magic string id
15901590
* false - otherwise
15911591
*/
1592-
inline bool JERRY_ATTR_ALWAYS_INLINE
1592+
extern inline bool JERRY_ATTR_ALWAYS_INLINE
15931593
ecma_compare_ecma_string_to_magic_id (const ecma_string_t *string_p, /**< property name */
15941594
lit_magic_string_id_t id) /**< magic string id */
15951595
{
@@ -1602,7 +1602,7 @@ ecma_compare_ecma_string_to_magic_id (const ecma_string_t *string_p, /**< proper
16021602
* @return true - if the string is an empty string
16031603
* false - otherwise
16041604
*/
1605-
inline bool JERRY_ATTR_ALWAYS_INLINE
1605+
extern inline bool JERRY_ATTR_ALWAYS_INLINE
16061606
ecma_string_is_empty (const ecma_string_t *string_p) /**< ecma-string */
16071607
{
16081608
return ecma_compare_ecma_string_to_magic_id (string_p, LIT_MAGIC_STRING__EMPTY);
@@ -1614,7 +1614,7 @@ ecma_string_is_empty (const ecma_string_t *string_p) /**< ecma-string */
16141614
* @return true - if the string equals to "length"
16151615
* false - otherwise
16161616
*/
1617-
inline bool JERRY_ATTR_ALWAYS_INLINE
1617+
extern inline bool JERRY_ATTR_ALWAYS_INLINE
16181618
ecma_string_is_length (const ecma_string_t *string_p) /**< property name */
16191619
{
16201620
return ecma_compare_ecma_string_to_magic_id (string_p, LIT_MAGIC_STRING_LENGTH);
@@ -1639,7 +1639,7 @@ ecma_property_to_string (ecma_property_t property, /**< property name type */
16391639
*
16401640
* @return the compressed pointer part of the name
16411641
*/
1642-
inline jmem_cpointer_t JERRY_ATTR_ALWAYS_INLINE
1642+
extern inline jmem_cpointer_t JERRY_ATTR_ALWAYS_INLINE
16431643
ecma_string_to_property_name (ecma_string_t *prop_name_p, /**< property name */
16441644
ecma_property_t *name_type_p) /**< [out] property name type */
16451645
{
@@ -1683,7 +1683,7 @@ ecma_string_from_property_name (ecma_property_t property, /**< property name typ
16831683
*
16841684
* @return hash code of property name
16851685
*/
1686-
inline lit_string_hash_t JERRY_ATTR_ALWAYS_INLINE
1686+
extern inline lit_string_hash_t JERRY_ATTR_ALWAYS_INLINE
16871687
ecma_string_get_property_name_hash (ecma_property_t property, /**< property name type */
16881688
jmem_cpointer_t prop_name_cp) /**< property name compressed pointer */
16891689
{
@@ -1730,7 +1730,7 @@ ecma_string_get_property_index (ecma_property_t property, /**< property name typ
17301730
* @return true if they are equals
17311731
* false otherwise
17321732
*/
1733-
inline bool JERRY_ATTR_ALWAYS_INLINE
1733+
extern inline bool JERRY_ATTR_ALWAYS_INLINE
17341734
ecma_string_compare_to_property_name (ecma_property_t property, /**< property name type */
17351735
jmem_cpointer_t prop_name_cp, /**< property name compressed pointer */
17361736
const ecma_string_t *string_p) /**< other string */
@@ -1864,7 +1864,7 @@ ecma_compare_ecma_strings (const ecma_string_t *string1_p, /**< ecma-string */
18641864
* @return true - if strings are equal;
18651865
* false - otherwise
18661866
*/
1867-
inline bool JERRY_ATTR_ALWAYS_INLINE
1867+
extern inline bool JERRY_ATTR_ALWAYS_INLINE
18681868
ecma_compare_ecma_non_direct_strings (const ecma_string_t *string1_p, /**< ecma-string */
18691869
const ecma_string_t *string2_p) /**< ecma-string */
18701870
{
@@ -2379,7 +2379,7 @@ ecma_get_string_magic (const ecma_string_t *string_p) /**< ecma-string */
23792379
*
23802380
* @return calculated hash
23812381
*/
2382-
inline lit_string_hash_t JERRY_ATTR_ALWAYS_INLINE
2382+
extern inline lit_string_hash_t JERRY_ATTR_ALWAYS_INLINE
23832383
ecma_string_hash (const ecma_string_t *string_p) /**< ecma-string to calculate hash for */
23842384
{
23852385
if (ECMA_IS_DIRECT_STRING (string_p))
@@ -2507,7 +2507,7 @@ ecma_string_trim_back (const lit_utf8_byte_t *start_p, /**< current string's sta
25072507
* - ecma_string_trim
25082508
* - ecma_utf8_string_to_number
25092509
*/
2510-
inline void JERRY_ATTR_ALWAYS_INLINE
2510+
extern inline void JERRY_ATTR_ALWAYS_INLINE
25112511
ecma_string_trim_helper (const lit_utf8_byte_t **utf8_str_p, /**< [in, out] current string position */
25122512
lit_utf8_size_t *utf8_str_size) /**< [in, out] size of the given string */
25132513
{

0 commit comments

Comments
 (0)