@@ -108,7 +108,7 @@ ecma_builtin_global_object_parse_int (ecma_value_t this_arg __attr_unused___, /*
108
108
ECMA_TRY_CATCH (string_var, ecma_op_to_string (string), ret_value);
109
109
110
110
ecma_string_t *number_str_p = ecma_get_string_from_value (string_var);
111
- int32_t string_len = ecma_string_get_length (number_str_p);
111
+ ecma_length_t string_len = ecma_string_get_length (number_str_p);
112
112
113
113
MEM_DEFINE_LOCAL_ARRAY (zt_string_buff, string_len + 1 , ecma_char_t );
114
114
@@ -119,9 +119,9 @@ ecma_builtin_global_object_parse_int (ecma_value_t this_arg __attr_unused___, /*
119
119
JERRY_ASSERT (bytes_copied > 0 );
120
120
121
121
/* 2. Remove leading whitespace. */
122
- int32_t start = string_len;
123
- int32_t end = string_len;
124
- for (int i = 0 ; i < end; i++)
122
+ ecma_length_t start = string_len;
123
+ ecma_length_t end = string_len;
124
+ for (ecma_length_t i = 0 ; i < end; i++)
125
125
{
126
126
if (!(isspace (zt_string_buff[i])))
127
127
{
@@ -190,7 +190,7 @@ ecma_builtin_global_object_parse_int (ecma_value_t this_arg __attr_unused___, /*
190
190
}
191
191
192
192
/* 11. Check if characters are in [0, Radix - 1]. We also convert them to number values in the process. */
193
- for (int i = start; i < end; i++)
193
+ for (ecma_length_t i = start; i < end; i++)
194
194
{
195
195
if ((zt_string_buff[i]) >= ' a' && zt_string_buff[i] <= ' z' )
196
196
{
@@ -233,7 +233,7 @@ ecma_builtin_global_object_parse_int (ecma_value_t this_arg __attr_unused___, /*
233
233
ecma_number_t multiplier = 1 .0f ;
234
234
235
235
/* 13. and 14. */
236
- for (int i = end - 1 ; i >= start; i--)
236
+ for (int32_t i = ( int32_t ) end - 1 ; i >= ( int32_t ) start; i--)
237
237
{
238
238
*value_p += (ecma_number_t ) zt_string_buff[i] * multiplier;
239
239
multiplier *= (ecma_number_t ) rad;
@@ -273,7 +273,7 @@ ecma_builtin_global_object_parse_float (ecma_value_t this_arg __attr_unused___,
273
273
ECMA_TRY_CATCH (string_var, ecma_op_to_string (string), ret_value);
274
274
275
275
ecma_string_t *number_str_p = ecma_get_string_from_value (string_var);
276
- int32_t string_len = ecma_string_get_length (number_str_p);
276
+ ecma_length_t string_len = ecma_string_get_length (number_str_p);
277
277
278
278
MEM_DEFINE_LOCAL_ARRAY (zt_string_buff, string_len + 1 , ecma_char_t );
279
279
@@ -284,8 +284,8 @@ ecma_builtin_global_object_parse_float (ecma_value_t this_arg __attr_unused___,
284
284
JERRY_ASSERT (bytes_copied > 0 );
285
285
286
286
/* 2. Find first non whitespace char. */
287
- int32_t start = 0 ;
288
- for (int i = 0 ; i < string_len; i++)
287
+ ecma_length_t start = 0 ;
288
+ for (ecma_length_t i = 0 ; i < string_len; i++)
289
289
{
290
290
if (!isspace (zt_string_buff[i]))
291
291
{
@@ -312,7 +312,7 @@ ecma_builtin_global_object_parse_float (ecma_value_t this_arg __attr_unused___,
312
312
/* Check if string is equal to "Infinity". */
313
313
const ecma_char_t *infinity_zt_str_p = lit_get_magic_string_zt (LIT_MAGIC_STRING_INFINITY_UL);
314
314
315
- for (int i = 0 ; infinity_zt_str_p[i] == zt_string_buff[start + i]; i++)
315
+ for (ecma_length_t i = 0 ; infinity_zt_str_p[i] == zt_string_buff[start + i]; i++)
316
316
{
317
317
if (infinity_zt_str_p[i + 1 ] == 0 )
318
318
{
@@ -324,8 +324,8 @@ ecma_builtin_global_object_parse_float (ecma_value_t this_arg __attr_unused___,
324
324
325
325
if (ecma_is_completion_value_empty (ret_value))
326
326
{
327
- int32_t current = start;
328
- int32_t end = string_len;
327
+ ecma_length_t current = start;
328
+ ecma_length_t end = string_len;
329
329
bool has_whole_part = false ;
330
330
bool has_fraction_part = false ;
331
331
@@ -334,7 +334,7 @@ ecma_builtin_global_object_parse_float (ecma_value_t this_arg __attr_unused___,
334
334
has_whole_part = true ;
335
335
336
336
/* Check digits of whole part. */
337
- for (int i = current; i < string_len; i++, current++)
337
+ for (ecma_length_t i = current; i < string_len; i++, current++)
338
338
{
339
339
if (!isdigit (zt_string_buff[current]))
340
340
{
@@ -355,7 +355,7 @@ ecma_builtin_global_object_parse_float (ecma_value_t this_arg __attr_unused___,
355
355
has_fraction_part = true ;
356
356
357
357
/* Check digits of fractional part. */
358
- for (int i = current; i < string_len; i++, current++)
358
+ for (ecma_length_t i = current; i < string_len; i++, current++)
359
359
{
360
360
if (!isdigit (zt_string_buff[current]))
361
361
{
@@ -383,7 +383,7 @@ ecma_builtin_global_object_parse_float (ecma_value_t this_arg __attr_unused___,
383
383
{
384
384
385
385
/* Check digits of exponent part. */
386
- for (int i = current; i < string_len; i++, current++)
386
+ for (ecma_length_t i = current; i < string_len; i++, current++)
387
387
{
388
388
if (!isdigit (zt_string_buff[current]))
389
389
{
0 commit comments