Add Windows support. (#2306)

JerryScript-DCO-1.0-Signed-off-by: PKarics karicska@gmail.com
JerryScript-DCO-1.0-Signed-off-by: Yonggang Luo luoyonggang@gmail.com
This commit is contained in:
Yonggang Luo
2018-05-18 18:42:14 +08:00
committed by yichoi
parent 13bd30ff54
commit 872825fb57
12 changed files with 96 additions and 19 deletions
@@ -639,7 +639,7 @@ ecma_date_to_string_format (ecma_number_t datetime_number, /**< datetime */
};
const uint32_t date_buffer_length = 34;
lit_utf8_byte_t date_buffer[date_buffer_length];
JERRY_VLA (lit_utf8_byte_t, date_buffer, date_buffer_length);
lit_utf8_byte_t *dest_p = date_buffer;
@@ -84,7 +84,7 @@ ecma_builtin_helper_object_to_string (const ecma_value_t this_arg) /**< this arg
'Null' or one of possible object's classes.
The string with null character is maximum 27 characters long. */
const lit_utf8_size_t buffer_size = 27;
lit_utf8_byte_t str_buffer[buffer_size];
JERRY_VLA (lit_utf8_byte_t, str_buffer, buffer_size);
lit_utf8_byte_t *buffer_ptr = str_buffer;
+6 -4
View File
@@ -1365,9 +1365,10 @@ ecma_op_object_get_property_names (ecma_object_t *obj_p, /**< object */
const bool obj_is_builtin = ecma_get_object_is_builtin (obj_p);
const size_t bitmap_row_size = sizeof (uint32_t) * JERRY_BITSINBYTE;
uint32_t names_hashes_bitmap[ECMA_OBJECT_HASH_BITMAP_SIZE / bitmap_row_size];
const size_t names_hashes_bitmap_size = ECMA_OBJECT_HASH_BITMAP_SIZE / bitmap_row_size;
JERRY_VLA (uint32_t, names_hashes_bitmap, names_hashes_bitmap_size);
memset (names_hashes_bitmap, 0, sizeof (names_hashes_bitmap));
memset (names_hashes_bitmap, 0, names_hashes_bitmap_size * sizeof (names_hashes_bitmap[0]));
for (ecma_object_t *prototype_chain_iter_p = obj_p;
prototype_chain_iter_p != NULL;
@@ -1461,8 +1462,9 @@ ecma_op_object_get_property_names (ecma_object_t *obj_p, /**< object */
ecma_value_t *ecma_value_p = ecma_collection_iterator_init (prop_names_p);
uint32_t own_names_hashes_bitmap[ECMA_OBJECT_HASH_BITMAP_SIZE / bitmap_row_size];
memset (own_names_hashes_bitmap, 0, sizeof (own_names_hashes_bitmap));
const size_t own_names_hashes_bitmap_size = ECMA_OBJECT_HASH_BITMAP_SIZE / bitmap_row_size;
JERRY_VLA (uint32_t, own_names_hashes_bitmap, own_names_hashes_bitmap_size);
memset (own_names_hashes_bitmap, 0, own_names_hashes_bitmap_size * sizeof (own_names_hashes_bitmap[0]));
while (ecma_value_p != NULL)
{