Remove the ENABLED/DISABLED macros (#4515)
The removal of these macros enabled cppcheck to reveal new errors. These errors are also fixed by the patch. JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
This commit is contained in:
@@ -17,7 +17,7 @@
|
||||
#include "jcontext.h"
|
||||
#include "jerryscript.h"
|
||||
|
||||
#if ENABLED (JERRY_DEBUGGER)
|
||||
#if JERRY_DEBUGGER
|
||||
|
||||
/**
|
||||
* Minimum number of bytes transmitted or received.
|
||||
@@ -247,4 +247,4 @@ jerry_debugger_transport_sleep (void)
|
||||
jerry_port_sleep (JERRY_DEBUGGER_TRANSPORT_TIMEOUT);
|
||||
} /* jerry_debugger_transport_sleep */
|
||||
|
||||
#endif /* ENABLED (JERRY_DEBUGGER) */
|
||||
#endif /* JERRY_DEBUGGER */
|
||||
|
||||
@@ -26,11 +26,11 @@
|
||||
bool
|
||||
jerry_debugger_is_connected (void)
|
||||
{
|
||||
#if ENABLED (JERRY_DEBUGGER)
|
||||
#if JERRY_DEBUGGER
|
||||
return JERRY_CONTEXT (debugger_flags) & JERRY_DEBUGGER_CONNECTED;
|
||||
#else /* !ENABLED (JERRY_DEBUGGER) */
|
||||
#else /* !JERRY_DEBUGGER */
|
||||
return false;
|
||||
#endif /* ENABLED (JERRY_DEBUGGER) */
|
||||
#endif /* JERRY_DEBUGGER */
|
||||
} /* jerry_debugger_is_connected */
|
||||
|
||||
/**
|
||||
@@ -39,14 +39,14 @@ jerry_debugger_is_connected (void)
|
||||
void
|
||||
jerry_debugger_stop (void)
|
||||
{
|
||||
#if ENABLED (JERRY_DEBUGGER)
|
||||
#if JERRY_DEBUGGER
|
||||
if ((JERRY_CONTEXT (debugger_flags) & JERRY_DEBUGGER_CONNECTED)
|
||||
&& !(JERRY_CONTEXT (debugger_flags) & JERRY_DEBUGGER_BREAKPOINT_MODE))
|
||||
{
|
||||
JERRY_DEBUGGER_SET_FLAGS (JERRY_DEBUGGER_VM_STOP);
|
||||
JERRY_CONTEXT (debugger_stop_context) = NULL;
|
||||
}
|
||||
#endif /* ENABLED (JERRY_DEBUGGER) */
|
||||
#endif /* JERRY_DEBUGGER */
|
||||
} /* jerry_debugger_stop */
|
||||
|
||||
/**
|
||||
@@ -55,14 +55,14 @@ jerry_debugger_stop (void)
|
||||
void
|
||||
jerry_debugger_continue (void)
|
||||
{
|
||||
#if ENABLED (JERRY_DEBUGGER)
|
||||
#if JERRY_DEBUGGER
|
||||
if ((JERRY_CONTEXT (debugger_flags) & JERRY_DEBUGGER_CONNECTED)
|
||||
&& !(JERRY_CONTEXT (debugger_flags) & JERRY_DEBUGGER_BREAKPOINT_MODE))
|
||||
{
|
||||
JERRY_DEBUGGER_CLEAR_FLAGS (JERRY_DEBUGGER_VM_STOP);
|
||||
JERRY_CONTEXT (debugger_stop_context) = NULL;
|
||||
}
|
||||
#endif /* ENABLED (JERRY_DEBUGGER) */
|
||||
#endif /* JERRY_DEBUGGER */
|
||||
} /* jerry_debugger_continue */
|
||||
|
||||
/**
|
||||
@@ -71,7 +71,7 @@ jerry_debugger_continue (void)
|
||||
void
|
||||
jerry_debugger_stop_at_breakpoint (bool enable_stop_at_breakpoint) /**< enable/disable stop at breakpoint */
|
||||
{
|
||||
#if ENABLED (JERRY_DEBUGGER)
|
||||
#if JERRY_DEBUGGER
|
||||
if (JERRY_CONTEXT (debugger_flags) & JERRY_DEBUGGER_CONNECTED
|
||||
&& !(JERRY_CONTEXT (debugger_flags) & JERRY_DEBUGGER_BREAKPOINT_MODE))
|
||||
{
|
||||
@@ -84,9 +84,9 @@ jerry_debugger_stop_at_breakpoint (bool enable_stop_at_breakpoint) /**< enable/d
|
||||
JERRY_DEBUGGER_CLEAR_FLAGS (JERRY_DEBUGGER_VM_IGNORE);
|
||||
}
|
||||
}
|
||||
#else /* !ENABLED (JERRY_DEBUGGER) */
|
||||
#else /* !JERRY_DEBUGGER */
|
||||
JERRY_UNUSED (enable_stop_at_breakpoint);
|
||||
#endif /* ENABLED (JERRY_DEBUGGER) */
|
||||
#endif /* JERRY_DEBUGGER */
|
||||
} /* jerry_debugger_stop_at_breakpoint */
|
||||
|
||||
/**
|
||||
@@ -104,7 +104,7 @@ jerry_debugger_wait_for_client_source (jerry_debugger_wait_for_source_callback_t
|
||||
{
|
||||
*return_value = jerry_create_undefined ();
|
||||
|
||||
#if ENABLED (JERRY_DEBUGGER)
|
||||
#if JERRY_DEBUGGER
|
||||
if ((JERRY_CONTEXT (debugger_flags) & JERRY_DEBUGGER_CONNECTED)
|
||||
&& !(JERRY_CONTEXT (debugger_flags) & JERRY_DEBUGGER_BREAKPOINT_MODE))
|
||||
{
|
||||
@@ -176,12 +176,12 @@ jerry_debugger_wait_for_client_source (jerry_debugger_wait_for_source_callback_t
|
||||
}
|
||||
|
||||
return JERRY_DEBUGGER_SOURCE_RECEIVE_FAILED;
|
||||
#else /* !ENABLED (JERRY_DEBUGGER) */
|
||||
#else /* !JERRY_DEBUGGER */
|
||||
JERRY_UNUSED (callback_p);
|
||||
JERRY_UNUSED (user_p);
|
||||
|
||||
return JERRY_DEBUGGER_SOURCE_RECEIVE_FAILED;
|
||||
#endif /* ENABLED (JERRY_DEBUGGER) */
|
||||
#endif /* JERRY_DEBUGGER */
|
||||
} /* jerry_debugger_wait_for_client_source */
|
||||
|
||||
/**
|
||||
@@ -192,7 +192,7 @@ void
|
||||
jerry_debugger_send_output (const jerry_char_t *buffer, /**< buffer */
|
||||
jerry_size_t str_size) /**< string size */
|
||||
{
|
||||
#if ENABLED (JERRY_DEBUGGER)
|
||||
#if JERRY_DEBUGGER
|
||||
if (JERRY_CONTEXT (debugger_flags) & JERRY_DEBUGGER_CONNECTED)
|
||||
{
|
||||
jerry_debugger_send_string (JERRY_DEBUGGER_OUTPUT_RESULT,
|
||||
@@ -200,10 +200,10 @@ jerry_debugger_send_output (const jerry_char_t *buffer, /**< buffer */
|
||||
(const uint8_t *) buffer,
|
||||
sizeof (uint8_t) * str_size);
|
||||
}
|
||||
#else /* !ENABLED (JERRY_DEBUGGER) */
|
||||
#else /* !JERRY_DEBUGGER */
|
||||
JERRY_UNUSED (buffer);
|
||||
JERRY_UNUSED (str_size);
|
||||
#endif /* ENABLED (JERRY_DEBUGGER) */
|
||||
#endif /* JERRY_DEBUGGER */
|
||||
} /* jerry_debugger_send_output */
|
||||
|
||||
/**
|
||||
@@ -214,7 +214,7 @@ jerry_debugger_send_log (jerry_log_level_t level, /**< level of the diagnostics
|
||||
const jerry_char_t *buffer, /**< buffer */
|
||||
jerry_size_t str_size) /**< string size */
|
||||
{
|
||||
#if ENABLED (JERRY_DEBUGGER)
|
||||
#if JERRY_DEBUGGER
|
||||
if (JERRY_CONTEXT (debugger_flags) & JERRY_DEBUGGER_CONNECTED)
|
||||
{
|
||||
jerry_debugger_send_string (JERRY_DEBUGGER_OUTPUT_RESULT,
|
||||
@@ -222,9 +222,9 @@ jerry_debugger_send_log (jerry_log_level_t level, /**< level of the diagnostics
|
||||
(const uint8_t *) buffer,
|
||||
sizeof (uint8_t) * str_size);
|
||||
}
|
||||
#else /* !ENABLED (JERRY_DEBUGGER) */
|
||||
#else /* !JERRY_DEBUGGER */
|
||||
JERRY_UNUSED (level);
|
||||
JERRY_UNUSED (buffer);
|
||||
JERRY_UNUSED (str_size);
|
||||
#endif /* ENABLED (JERRY_DEBUGGER) */
|
||||
#endif /* JERRY_DEBUGGER */
|
||||
} /* jerry_debugger_send_log */
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
#include "js-parser-internal.h"
|
||||
#include "re-compiler.h"
|
||||
|
||||
#if ENABLED (JERRY_SNAPSHOT_SAVE) || ENABLED (JERRY_SNAPSHOT_EXEC)
|
||||
#if JERRY_SNAPSHOT_SAVE || JERRY_SNAPSHOT_EXEC
|
||||
|
||||
/**
|
||||
* Get snapshot configuration flags.
|
||||
@@ -43,15 +43,15 @@ snapshot_get_global_flags (bool has_regex, /**< regex literal is present */
|
||||
|
||||
uint32_t flags = 0;
|
||||
|
||||
#if ENABLED (JERRY_BUILTIN_REGEXP)
|
||||
#if JERRY_BUILTIN_REGEXP
|
||||
flags |= (has_regex ? JERRY_SNAPSHOT_HAS_REGEX_LITERAL : 0);
|
||||
#endif /* ENABLED (JERRY_BUILTIN_REGEXP) */
|
||||
#if ENABLED (JERRY_ESNEXT)
|
||||
#endif /* JERRY_BUILTIN_REGEXP */
|
||||
#if JERRY_ESNEXT
|
||||
flags |= (has_class ? JERRY_SNAPSHOT_HAS_CLASS_LITERAL : 0);
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
#if ENABLED (JERRY_BUILTIN_REALMS)
|
||||
#endif /* JERRY_ESNEXT */
|
||||
#if JERRY_BUILTIN_REALMS
|
||||
flags |= JERRY_SNAPSHOT_HAS_REALM_VALUE;
|
||||
#endif /* ENABLED (JERRY_BUILTIN_REALMS) */
|
||||
#endif /* JERRY_BUILTIN_REALMS */
|
||||
|
||||
return flags;
|
||||
} /* snapshot_get_global_flags */
|
||||
@@ -64,22 +64,22 @@ snapshot_get_global_flags (bool has_regex, /**< regex literal is present */
|
||||
static inline bool JERRY_ATTR_ALWAYS_INLINE
|
||||
snapshot_check_global_flags (uint32_t global_flags) /**< global flags */
|
||||
{
|
||||
#if ENABLED (JERRY_BUILTIN_REGEXP)
|
||||
#if JERRY_BUILTIN_REGEXP
|
||||
global_flags &= (uint32_t) ~JERRY_SNAPSHOT_HAS_REGEX_LITERAL;
|
||||
#endif /* ENABLED (JERRY_BUILTIN_REGEXP) */
|
||||
#if ENABLED (JERRY_ESNEXT)
|
||||
#endif /* JERRY_BUILTIN_REGEXP */
|
||||
#if JERRY_ESNEXT
|
||||
global_flags &= (uint32_t) ~JERRY_SNAPSHOT_HAS_CLASS_LITERAL;
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
#if ENABLED (JERRY_BUILTIN_REALMS)
|
||||
#endif /* JERRY_ESNEXT */
|
||||
#if JERRY_BUILTIN_REALMS
|
||||
global_flags |= JERRY_SNAPSHOT_HAS_REALM_VALUE;
|
||||
#endif /* ENABLED (JERRY_BUILTIN_REALMS) */
|
||||
#endif /* JERRY_BUILTIN_REALMS */
|
||||
|
||||
return global_flags == snapshot_get_global_flags (false, false);
|
||||
} /* snapshot_check_global_flags */
|
||||
|
||||
#endif /* ENABLED (JERRY_SNAPSHOT_SAVE) || ENABLED (JERRY_SNAPSHOT_EXEC) */
|
||||
#endif /* JERRY_SNAPSHOT_SAVE || JERRY_SNAPSHOT_EXEC */
|
||||
|
||||
#if ENABLED (JERRY_SNAPSHOT_SAVE)
|
||||
#if JERRY_SNAPSHOT_SAVE
|
||||
|
||||
/**
|
||||
* Variables required to take a snapshot.
|
||||
@@ -127,11 +127,11 @@ snapshot_write_to_buffer_by_offset (uint8_t *buffer_p, /**< buffer */
|
||||
/**
|
||||
* Maximum snapshot write buffer offset.
|
||||
*/
|
||||
#if !ENABLED (JERRY_NUMBER_TYPE_FLOAT64)
|
||||
#if !JERRY_NUMBER_TYPE_FLOAT64
|
||||
#define JERRY_SNAPSHOT_MAXIMUM_WRITE_OFFSET (0x7fffff >> 1)
|
||||
#else /* ENABLED (JERRY_NUMBER_TYPE_FLOAT64) */
|
||||
#else /* JERRY_NUMBER_TYPE_FLOAT64 */
|
||||
#define JERRY_SNAPSHOT_MAXIMUM_WRITE_OFFSET (UINT32_MAX >> 1)
|
||||
#endif /* !ENABLED (JERRY_NUMBER_TYPE_FLOAT64) */
|
||||
#endif /* !JERRY_NUMBER_TYPE_FLOAT64 */
|
||||
|
||||
/**
|
||||
* Save snapshot helper.
|
||||
@@ -167,7 +167,7 @@ snapshot_add_compiled_code (ecma_compiled_code_t *compiled_code_p, /**< compiled
|
||||
uint8_t *copied_code_start_p = snapshot_buffer_p + globals_p->snapshot_buffer_write_offset;
|
||||
ecma_compiled_code_t *copied_code_p = (ecma_compiled_code_t *) copied_code_start_p;
|
||||
|
||||
#if ENABLED (JERRY_ESNEXT)
|
||||
#if JERRY_ESNEXT
|
||||
if (compiled_code_p->status_flags & CBC_CODE_FLAGS_HAS_TAGGED_LITERALS)
|
||||
{
|
||||
const char * const error_message_p = "Unsupported feature: tagged template literals";
|
||||
@@ -179,9 +179,9 @@ snapshot_add_compiled_code (ecma_compiled_code_t *compiled_code_p, /**< compiled
|
||||
{
|
||||
globals_p->class_found = true;
|
||||
}
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
|
||||
#if ENABLED (JERRY_BUILTIN_REGEXP)
|
||||
#if JERRY_BUILTIN_REGEXP
|
||||
if (!CBC_IS_FUNCTION (compiled_code_p->status_flags))
|
||||
{
|
||||
/* Regular expression. */
|
||||
@@ -233,7 +233,7 @@ snapshot_add_compiled_code (ecma_compiled_code_t *compiled_code_p, /**< compiled
|
||||
|
||||
return start_offset;
|
||||
}
|
||||
#endif /* ENABLED (JERRY_BUILTIN_REGEXP) */
|
||||
#endif /* JERRY_BUILTIN_REGEXP */
|
||||
|
||||
JERRY_ASSERT (CBC_IS_FUNCTION (compiled_code_p->status_flags));
|
||||
|
||||
@@ -387,9 +387,9 @@ static_snapshot_add_compiled_code (ecma_compiled_code_t *compiled_code_p, /**< c
|
||||
literal_end = (uint32_t) (args_p->literal_end - args_p->register_end);
|
||||
const_literal_end = (uint32_t) (args_p->const_literal_end - args_p->register_end);
|
||||
|
||||
#if ENABLED (JERRY_BUILTIN_REALMS)
|
||||
#if JERRY_BUILTIN_REALMS
|
||||
args_p->realm_value = JMEM_CP_NULL;
|
||||
#endif /* ENABLED (JERRY_BUILTIN_REALMS) */
|
||||
#endif /* JERRY_BUILTIN_REALMS */
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -399,9 +399,9 @@ static_snapshot_add_compiled_code (ecma_compiled_code_t *compiled_code_p, /**< c
|
||||
literal_end = (uint32_t) (args_p->literal_end - args_p->register_end);
|
||||
const_literal_end = (uint32_t) (args_p->const_literal_end - args_p->register_end);
|
||||
|
||||
#if ENABLED (JERRY_BUILTIN_REALMS)
|
||||
#if JERRY_BUILTIN_REALMS
|
||||
args_p->realm_value = JMEM_CP_NULL;
|
||||
#endif /* ENABLED (JERRY_BUILTIN_REALMS) */
|
||||
#endif /* JERRY_BUILTIN_REALMS */
|
||||
}
|
||||
|
||||
for (uint32_t i = 0; i < const_literal_end; i++)
|
||||
@@ -492,9 +492,9 @@ jerry_snapshot_set_offsets (uint32_t *buffer_p, /**< buffer */
|
||||
for (uint32_t i = 0; i < const_literal_end; i++)
|
||||
{
|
||||
if (ecma_is_value_string (literal_start_p[i])
|
||||
#if ENABLED (JERRY_BUILTIN_BIGINT)
|
||||
#if JERRY_BUILTIN_BIGINT
|
||||
|| ecma_is_value_bigint (literal_start_p[i])
|
||||
#endif /* ENABLED (JERRY_BUILTIN_BIGINT) */
|
||||
#endif /* JERRY_BUILTIN_BIGINT */
|
||||
|| ecma_is_value_float_number (literal_start_p[i]))
|
||||
{
|
||||
lit_mem_to_snapshot_id_map_entry_t *current_p = lit_map_p;
|
||||
@@ -541,9 +541,9 @@ jerry_snapshot_set_offsets (uint32_t *buffer_p, /**< buffer */
|
||||
while (size > 0);
|
||||
} /* jerry_snapshot_set_offsets */
|
||||
|
||||
#endif /* ENABLED (JERRY_SNAPSHOT_SAVE) */
|
||||
#endif /* JERRY_SNAPSHOT_SAVE */
|
||||
|
||||
#if ENABLED (JERRY_SNAPSHOT_EXEC)
|
||||
#if JERRY_SNAPSHOT_EXEC
|
||||
|
||||
/**
|
||||
* Byte code blocks shorter than this threshold are always copied into the memory.
|
||||
@@ -566,7 +566,7 @@ snapshot_load_compiled_code (const uint8_t *base_addr_p, /**< base address of th
|
||||
ecma_compiled_code_t *bytecode_p = (ecma_compiled_code_t *) base_addr_p;
|
||||
uint32_t code_size = ((uint32_t) bytecode_p->size) << JMEM_ALIGNMENT_LOG;
|
||||
|
||||
#if ENABLED (JERRY_BUILTIN_REGEXP)
|
||||
#if JERRY_BUILTIN_REGEXP
|
||||
if (!CBC_IS_FUNCTION (bytecode_p->status_flags))
|
||||
{
|
||||
const uint8_t *regex_start_p = ((const uint8_t *) bytecode_p) + sizeof (ecma_compiled_code_t);
|
||||
@@ -581,9 +581,9 @@ snapshot_load_compiled_code (const uint8_t *base_addr_p, /**< base address of th
|
||||
|
||||
return (ecma_compiled_code_t *) re_bytecode_p;
|
||||
}
|
||||
#else /* !ENABLED (JERRY_BUILTIN_REGEXP) */
|
||||
#else /* !JERRY_BUILTIN_REGEXP */
|
||||
JERRY_ASSERT (CBC_IS_FUNCTION (bytecode_p->status_flags));
|
||||
#endif /* ENABLED (JERRY_BUILTIN_REGEXP) */
|
||||
#endif /* JERRY_BUILTIN_REGEXP */
|
||||
|
||||
size_t header_size;
|
||||
uint32_t argument_end;
|
||||
@@ -600,9 +600,9 @@ snapshot_load_compiled_code (const uint8_t *base_addr_p, /**< base address of th
|
||||
literal_end = (uint32_t) (args_p->literal_end - args_p->register_end);
|
||||
header_size = sizeof (cbc_uint16_arguments_t);
|
||||
|
||||
#if ENABLED (JERRY_BUILTIN_REALMS)
|
||||
#if JERRY_BUILTIN_REALMS
|
||||
ECMA_SET_INTERNAL_VALUE_POINTER (args_p->realm_value, ecma_builtin_get_global ());
|
||||
#endif /* ENABLED (JERRY_BUILTIN_REALMS) */
|
||||
#endif /* JERRY_BUILTIN_REALMS */
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -614,9 +614,9 @@ snapshot_load_compiled_code (const uint8_t *base_addr_p, /**< base address of th
|
||||
literal_end = (uint32_t) (args_p->literal_end - args_p->register_end);
|
||||
header_size = sizeof (cbc_uint8_arguments_t);
|
||||
|
||||
#if ENABLED (JERRY_BUILTIN_REALMS)
|
||||
#if JERRY_BUILTIN_REALMS
|
||||
ECMA_SET_INTERNAL_VALUE_POINTER (args_p->realm_value, ecma_builtin_get_global ());
|
||||
#endif /* ENABLED (JERRY_BUILTIN_REALMS) */
|
||||
#endif /* JERRY_BUILTIN_REALMS */
|
||||
}
|
||||
|
||||
if (copy_bytecode
|
||||
@@ -624,9 +624,9 @@ snapshot_load_compiled_code (const uint8_t *base_addr_p, /**< base address of th
|
||||
{
|
||||
bytecode_p = (ecma_compiled_code_t *) jmem_heap_alloc_block (code_size);
|
||||
|
||||
#if ENABLED (JERRY_MEM_STATS)
|
||||
#if JERRY_MEM_STATS
|
||||
jmem_stats_allocate_byte_code_bytes (code_size);
|
||||
#endif /* ENABLED (JERRY_MEM_STATS) */
|
||||
#endif /* JERRY_MEM_STATS */
|
||||
|
||||
memcpy (bytecode_p, base_addr_p, code_size);
|
||||
}
|
||||
@@ -643,7 +643,7 @@ snapshot_load_compiled_code (const uint8_t *base_addr_p, /**< base address of th
|
||||
extra_bytes += (uint32_t) (argument_end * sizeof (ecma_value_t));
|
||||
}
|
||||
|
||||
#if ENABLED (JERRY_ESNEXT)
|
||||
#if JERRY_ESNEXT
|
||||
/* function name */
|
||||
if (CBC_FUNCTION_GET_TYPE (bytecode_p->status_flags) != CBC_FUNCTION_CONSTRUCTOR)
|
||||
{
|
||||
@@ -655,20 +655,20 @@ snapshot_load_compiled_code (const uint8_t *base_addr_p, /**< base address of th
|
||||
{
|
||||
extra_bytes += (uint32_t) sizeof (ecma_value_t);
|
||||
}
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
|
||||
#if ENABLED (JERRY_RESOURCE_NAME)
|
||||
#if JERRY_RESOURCE_NAME
|
||||
/* resource name */
|
||||
extra_bytes += (uint32_t) sizeof (ecma_value_t);
|
||||
#endif /* ENABLED (JERRY_RESOURCE_NAME) */
|
||||
#endif /* JERRY_RESOURCE_NAME */
|
||||
|
||||
new_code_size = JERRY_ALIGNUP (new_code_size + extra_bytes, JMEM_ALIGNMENT);
|
||||
|
||||
bytecode_p = (ecma_compiled_code_t *) jmem_heap_alloc_block (new_code_size);
|
||||
|
||||
#if ENABLED (JERRY_MEM_STATS)
|
||||
#if JERRY_MEM_STATS
|
||||
jmem_stats_allocate_byte_code_bytes (new_code_size);
|
||||
#endif /* ENABLED (JERRY_MEM_STATS) */
|
||||
#endif /* JERRY_MEM_STATS */
|
||||
|
||||
memcpy (bytecode_p, base_addr_p, start_offset);
|
||||
|
||||
@@ -685,16 +685,16 @@ snapshot_load_compiled_code (const uint8_t *base_addr_p, /**< base address of th
|
||||
}
|
||||
|
||||
byte_p[start_offset] = CBC_SET_BYTECODE_PTR;
|
||||
memcpy (byte_p + start_offset + 1, &real_bytecode_p, sizeof (uint8_t *));
|
||||
memcpy (byte_p + start_offset + 1, &real_bytecode_p, sizeof (uintptr_t));
|
||||
|
||||
code_size = new_code_size;
|
||||
}
|
||||
|
||||
JERRY_ASSERT (bytecode_p->refs == 1);
|
||||
|
||||
#if ENABLED (JERRY_DEBUGGER)
|
||||
#if JERRY_DEBUGGER
|
||||
bytecode_p->status_flags = (uint16_t) (bytecode_p->status_flags | CBC_CODE_FLAGS_DEBUGGER_IGNORE);
|
||||
#endif /* ENABLED (JERRY_DEBUGGER) */
|
||||
#endif /* JERRY_DEBUGGER */
|
||||
|
||||
ecma_value_t *literal_start_p = (ecma_value_t *) (((uint8_t *) bytecode_p) + header_size);
|
||||
|
||||
@@ -744,9 +744,9 @@ snapshot_load_compiled_code (const uint8_t *base_addr_p, /**< base address of th
|
||||
return bytecode_p;
|
||||
} /* snapshot_load_compiled_code */
|
||||
|
||||
#endif /* ENABLED (JERRY_SNAPSHOT_EXEC) */
|
||||
#endif /* JERRY_SNAPSHOT_EXEC */
|
||||
|
||||
#if ENABLED (JERRY_SNAPSHOT_SAVE)
|
||||
#if JERRY_SNAPSHOT_SAVE
|
||||
|
||||
/**
|
||||
* Generate snapshot from specified source and arguments
|
||||
@@ -773,12 +773,12 @@ jerry_generate_snapshot_with_args (const jerry_char_t *resource_name_p, /**< scr
|
||||
|
||||
ecma_value_t resource_name = ecma_make_magic_string_value (LIT_MAGIC_STRING_RESOURCE_ANON);
|
||||
|
||||
#if ENABLED (JERRY_RESOURCE_NAME)
|
||||
#if JERRY_RESOURCE_NAME
|
||||
if (resource_name_length > 0)
|
||||
{
|
||||
resource_name = ecma_find_or_create_literal_string (resource_name_p, (lit_utf8_size_t) resource_name_length);
|
||||
}
|
||||
#endif /* ENABLED (JERRY_RESOURCE_NAME) */
|
||||
#endif /* JERRY_RESOURCE_NAME */
|
||||
|
||||
snapshot_globals_t globals;
|
||||
const uint32_t aligned_header_size = JERRY_ALIGNUP (sizeof (jerry_snapshot_header_t),
|
||||
@@ -872,7 +872,7 @@ jerry_generate_snapshot_with_args (const jerry_char_t *resource_name_p, /**< scr
|
||||
return ecma_make_number_value ((ecma_number_t) globals.snapshot_buffer_write_offset);
|
||||
} /* jerry_generate_snapshot_with_args */
|
||||
|
||||
#endif /* ENABLED (JERRY_SNAPSHOT_SAVE) */
|
||||
#endif /* JERRY_SNAPSHOT_SAVE */
|
||||
|
||||
/**
|
||||
* Generate snapshot from specified source and arguments
|
||||
@@ -891,7 +891,7 @@ jerry_generate_snapshot (const jerry_char_t *resource_name_p, /**< script resour
|
||||
uint32_t *buffer_p, /**< buffer to save snapshot to */
|
||||
size_t buffer_size) /**< the buffer's size */
|
||||
{
|
||||
#if ENABLED (JERRY_SNAPSHOT_SAVE)
|
||||
#if JERRY_SNAPSHOT_SAVE
|
||||
uint32_t allowed_opts = (JERRY_SNAPSHOT_SAVE_STATIC | JERRY_SNAPSHOT_SAVE_STRICT);
|
||||
|
||||
if ((generate_snapshot_opts & ~(allowed_opts)) != 0)
|
||||
@@ -909,7 +909,7 @@ jerry_generate_snapshot (const jerry_char_t *resource_name_p, /**< script resour
|
||||
generate_snapshot_opts,
|
||||
buffer_p,
|
||||
buffer_size);
|
||||
#else /* !ENABLED (JERRY_SNAPSHOT_SAVE) */
|
||||
#else /* !JERRY_SNAPSHOT_SAVE */
|
||||
JERRY_UNUSED (resource_name_p);
|
||||
JERRY_UNUSED (resource_name_length);
|
||||
JERRY_UNUSED (source_p);
|
||||
@@ -919,10 +919,10 @@ jerry_generate_snapshot (const jerry_char_t *resource_name_p, /**< script resour
|
||||
JERRY_UNUSED (buffer_size);
|
||||
|
||||
return jerry_create_error (JERRY_ERROR_COMMON, (const jerry_char_t *) "Snapshot save is not supported");
|
||||
#endif /* ENABLED (JERRY_SNAPSHOT_SAVE) */
|
||||
#endif /* JERRY_SNAPSHOT_SAVE */
|
||||
} /* jerry_generate_snapshot */
|
||||
|
||||
#if ENABLED (JERRY_SNAPSHOT_EXEC)
|
||||
#if JERRY_SNAPSHOT_EXEC
|
||||
/**
|
||||
* Execute/load snapshot from specified buffer
|
||||
*
|
||||
@@ -1014,12 +1014,12 @@ jerry_snapshot_result (const uint32_t *snapshot_p, /**< snapshot */
|
||||
}
|
||||
}
|
||||
|
||||
#if ENABLED (JERRY_PARSER_DUMP_BYTE_CODE)
|
||||
#if JERRY_PARSER_DUMP_BYTE_CODE
|
||||
if (JERRY_CONTEXT (jerry_init_flags) & ECMA_INIT_SHOW_OPCODES)
|
||||
{
|
||||
util_print_cbc (bytecode_p);
|
||||
}
|
||||
#endif /* ENABLED (JERRY_PARSER_DUMP_BYTE_CODE) */
|
||||
#endif /* JERRY_PARSER_DUMP_BYTE_CODE */
|
||||
|
||||
ecma_value_t ret_val;
|
||||
|
||||
@@ -1027,16 +1027,16 @@ jerry_snapshot_result (const uint32_t *snapshot_p, /**< snapshot */
|
||||
{
|
||||
ecma_object_t *global_object_p = ecma_builtin_get_global ();
|
||||
|
||||
#if ENABLED (JERRY_BUILTIN_REALMS)
|
||||
#if JERRY_BUILTIN_REALMS
|
||||
JERRY_ASSERT (global_object_p == (ecma_object_t *) ecma_op_function_get_realm (bytecode_p));
|
||||
#endif /* ENABLED (JERRY_BUILTIN_REALMS) */
|
||||
#endif /* JERRY_BUILTIN_REALMS */
|
||||
|
||||
#if ENABLED (JERRY_ESNEXT)
|
||||
#if JERRY_ESNEXT
|
||||
if (bytecode_p->status_flags & CBC_CODE_FLAGS_LEXICAL_BLOCK_NEEDED)
|
||||
{
|
||||
ecma_create_global_lexical_block (global_object_p);
|
||||
}
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
|
||||
ecma_object_t *lex_env_p = ecma_get_global_scope (global_object_p);
|
||||
ecma_object_t *func_obj_p = ecma_op_create_simple_function_object (lex_env_p, bytecode_p);
|
||||
@@ -1063,7 +1063,7 @@ jerry_snapshot_result (const uint32_t *snapshot_p, /**< snapshot */
|
||||
|
||||
return ret_val;
|
||||
} /* jerry_snapshot_result */
|
||||
#endif /* ENABLED (JERRY_SNAPSHOT_EXEC) */
|
||||
#endif /* JERRY_SNAPSHOT_EXEC */
|
||||
|
||||
/**
|
||||
* Execute snapshot from specified buffer
|
||||
@@ -1080,23 +1080,23 @@ jerry_exec_snapshot (const uint32_t *snapshot_p, /**< snapshot */
|
||||
size_t func_index, /**< index of primary function */
|
||||
uint32_t exec_snapshot_opts) /**< jerry_exec_snapshot_opts_t option bits */
|
||||
{
|
||||
#if ENABLED (JERRY_SNAPSHOT_EXEC)
|
||||
#if JERRY_SNAPSHOT_EXEC
|
||||
return jerry_snapshot_result (snapshot_p, snapshot_size, func_index, exec_snapshot_opts, false);
|
||||
#else /* !ENABLED (JERRY_SNAPSHOT_EXEC) */
|
||||
#else /* !JERRY_SNAPSHOT_EXEC */
|
||||
JERRY_UNUSED (snapshot_p);
|
||||
JERRY_UNUSED (snapshot_size);
|
||||
JERRY_UNUSED (func_index);
|
||||
JERRY_UNUSED (exec_snapshot_opts);
|
||||
|
||||
return jerry_create_error (JERRY_ERROR_COMMON, (const jerry_char_t *) "Snapshot execution is not supported");
|
||||
#endif /* ENABLED (JERRY_SNAPSHOT_EXEC) */
|
||||
#endif /* JERRY_SNAPSHOT_EXEC */
|
||||
} /* jerry_exec_snapshot */
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
#if ENABLED (JERRY_SNAPSHOT_SAVE)
|
||||
#if JERRY_SNAPSHOT_SAVE
|
||||
|
||||
/**
|
||||
* Collect all literals from a snapshot file.
|
||||
@@ -1244,7 +1244,7 @@ update_literal_offsets (uint8_t *buffer_p, /**< [in,out] snapshot buffer start *
|
||||
while (buffer_p < buffer_end_p);
|
||||
} /* update_literal_offsets */
|
||||
|
||||
#endif /* ENABLED (JERRY_SNAPSHOT_SAVE) */
|
||||
#endif /* JERRY_SNAPSHOT_SAVE */
|
||||
|
||||
/**
|
||||
* Merge multiple snapshots into a single buffer
|
||||
@@ -1260,7 +1260,7 @@ jerry_merge_snapshots (const uint32_t **inp_buffers_p, /**< array of (pointers t
|
||||
size_t out_buffer_size, /**< output buffer size */
|
||||
const char **error_p) /**< error description */
|
||||
{
|
||||
#if ENABLED (JERRY_SNAPSHOT_SAVE)
|
||||
#if JERRY_SNAPSHOT_SAVE
|
||||
uint32_t number_of_funcs = 0;
|
||||
uint32_t merged_global_flags = 0;
|
||||
size_t functions_size = sizeof (jerry_snapshot_header_t);
|
||||
@@ -1383,7 +1383,7 @@ jerry_merge_snapshots (const uint32_t **inp_buffers_p, /**< array of (pointers t
|
||||
|
||||
*error_p = NULL;
|
||||
return functions_size;
|
||||
#else /* !ENABLED (JERRY_SNAPSHOT_SAVE) */
|
||||
#else /* !JERRY_SNAPSHOT_SAVE */
|
||||
JERRY_UNUSED (inp_buffers_p);
|
||||
JERRY_UNUSED (inp_buffer_sizes_p);
|
||||
JERRY_UNUSED (number_of_snapshots);
|
||||
@@ -1393,10 +1393,10 @@ jerry_merge_snapshots (const uint32_t **inp_buffers_p, /**< array of (pointers t
|
||||
|
||||
*error_p = "snapshot merge not supported";
|
||||
return 0;
|
||||
#endif /* ENABLED (JERRY_SNAPSHOT_SAVE) */
|
||||
#endif /* JERRY_SNAPSHOT_SAVE */
|
||||
} /* jerry_merge_snapshots */
|
||||
|
||||
#if ENABLED (JERRY_SNAPSHOT_SAVE)
|
||||
#if JERRY_SNAPSHOT_SAVE
|
||||
|
||||
/**
|
||||
* ====================== Functions for literal saving ==========================
|
||||
@@ -1589,7 +1589,7 @@ jerry_append_number_to_buffer (uint8_t *buffer_p, /**< buffer */
|
||||
utf8_str_size);
|
||||
} /* jerry_append_number_to_buffer */
|
||||
|
||||
#endif /* ENABLED (JERRY_SNAPSHOT_SAVE) */
|
||||
#endif /* JERRY_SNAPSHOT_SAVE */
|
||||
|
||||
/**
|
||||
* Get the literals from a snapshot. Copies certain string literals into the given
|
||||
@@ -1609,7 +1609,7 @@ jerry_get_literals_from_snapshot (const uint32_t *snapshot_p, /**< input snapsho
|
||||
size_t lit_buf_size, /**< the buffer's size */
|
||||
bool is_c_format) /**< format-flag */
|
||||
{
|
||||
#if ENABLED (JERRY_SNAPSHOT_SAVE)
|
||||
#if JERRY_SNAPSHOT_SAVE
|
||||
const uint8_t *snapshot_data_p = (uint8_t *) snapshot_p;
|
||||
const jerry_snapshot_header_t *header_p = (const jerry_snapshot_header_t *) snapshot_data_p;
|
||||
|
||||
@@ -1786,7 +1786,7 @@ jerry_get_literals_from_snapshot (const uint32_t *snapshot_p, /**< input snapsho
|
||||
JMEM_FINALIZE_LOCAL_ARRAY (literal_array);
|
||||
|
||||
return lit_buf_p <= buffer_end_p ? (size_t) (lit_buf_p - buffer_start_p) : 0;
|
||||
#else /* !ENABLED (JERRY_SNAPSHOT_SAVE) */
|
||||
#else /* !JERRY_SNAPSHOT_SAVE */
|
||||
JERRY_UNUSED (snapshot_p);
|
||||
JERRY_UNUSED (snapshot_size);
|
||||
JERRY_UNUSED (lit_buf_p);
|
||||
@@ -1794,7 +1794,7 @@ jerry_get_literals_from_snapshot (const uint32_t *snapshot_p, /**< input snapsho
|
||||
JERRY_UNUSED (is_c_format);
|
||||
|
||||
return 0;
|
||||
#endif /* ENABLED (JERRY_SNAPSHOT_SAVE) */
|
||||
#endif /* JERRY_SNAPSHOT_SAVE */
|
||||
} /* jerry_get_literals_from_snapshot */
|
||||
|
||||
/**
|
||||
@@ -1816,7 +1816,7 @@ jerry_generate_function_snapshot (const jerry_char_t *resource_name_p, /**< scri
|
||||
uint32_t *buffer_p, /**< buffer to save snapshot to */
|
||||
size_t buffer_size) /**< the buffer's size */
|
||||
{
|
||||
#if ENABLED (JERRY_SNAPSHOT_SAVE)
|
||||
#if JERRY_SNAPSHOT_SAVE
|
||||
uint32_t allowed_opts = (JERRY_SNAPSHOT_SAVE_STATIC | JERRY_SNAPSHOT_SAVE_STRICT);
|
||||
|
||||
if ((generate_snapshot_opts & ~(allowed_opts)) != 0)
|
||||
@@ -1834,7 +1834,7 @@ jerry_generate_function_snapshot (const jerry_char_t *resource_name_p, /**< scri
|
||||
generate_snapshot_opts,
|
||||
buffer_p,
|
||||
buffer_size);
|
||||
#else /* !ENABLED (JERRY_SNAPSHOT_SAVE) */
|
||||
#else /* !JERRY_SNAPSHOT_SAVE */
|
||||
JERRY_UNUSED (resource_name_p);
|
||||
JERRY_UNUSED (resource_name_length);
|
||||
JERRY_UNUSED (source_p);
|
||||
@@ -1846,7 +1846,7 @@ jerry_generate_function_snapshot (const jerry_char_t *resource_name_p, /**< scri
|
||||
JERRY_UNUSED (buffer_size);
|
||||
|
||||
return jerry_create_error (JERRY_ERROR_COMMON, (const jerry_char_t *) "Snapshot save is not supported");
|
||||
#endif /* ENABLED (JERRY_SNAPSHOT_SAVE) */
|
||||
#endif /* JERRY_SNAPSHOT_SAVE */
|
||||
} /* jerry_generate_function_snapshot */
|
||||
|
||||
/**
|
||||
@@ -1864,14 +1864,14 @@ jerry_load_function_snapshot (const uint32_t *function_snapshot_p, /**< snapshot
|
||||
size_t func_index, /**< index of the function to load */
|
||||
uint32_t exec_snapshot_opts) /**< jerry_exec_snapshot_opts_t option bits */
|
||||
{
|
||||
#if ENABLED (JERRY_SNAPSHOT_EXEC)
|
||||
#if JERRY_SNAPSHOT_EXEC
|
||||
return jerry_snapshot_result (function_snapshot_p, function_snapshot_size, func_index, exec_snapshot_opts, true);
|
||||
#else /* !ENABLED (JERRY_SNAPSHOT_EXEC) */
|
||||
#else /* !JERRY_SNAPSHOT_EXEC */
|
||||
JERRY_UNUSED (function_snapshot_p);
|
||||
JERRY_UNUSED (function_snapshot_size);
|
||||
JERRY_UNUSED (func_index);
|
||||
JERRY_UNUSED (exec_snapshot_opts);
|
||||
|
||||
return jerry_create_error (JERRY_ERROR_COMMON, (const jerry_char_t *) "Snapshot execution is not supported");
|
||||
#endif /* ENABLED (JERRY_SNAPSHOT_EXEC) */
|
||||
#endif /* JERRY_SNAPSHOT_EXEC */
|
||||
} /* jerry_load_function_snapshot */
|
||||
|
||||
+360
-360
File diff suppressed because it is too large
Load Diff
+4
-7
@@ -691,9 +691,6 @@
|
||||
# error "Invalid value for 'JERRY_VM_EXEC_STOP' macro."
|
||||
#endif
|
||||
|
||||
#define ENABLED(FEATURE) ((FEATURE) == 1)
|
||||
#define DISABLED(FEATURE) ((FEATURE) != 1)
|
||||
|
||||
/**
|
||||
* Cross component requirements check.
|
||||
*/
|
||||
@@ -701,15 +698,15 @@
|
||||
* The date module can only use the float 64 number types.
|
||||
* Do a check for this.
|
||||
*/
|
||||
#if ENABLED (JERRY_BUILTIN_DATE) && !ENABLED (JERRY_NUMBER_TYPE_FLOAT64)
|
||||
#if JERRY_BUILTIN_DATE && !JERRY_NUMBER_TYPE_FLOAT64
|
||||
# error "Date does not support float32"
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Wrap container types into a single guard
|
||||
*/
|
||||
#if ENABLED (JERRY_BUILTIN_MAP) || ENABLED (JERRY_BUILTIN_SET) \
|
||||
|| ENABLED (JERRY_BUILTIN_WEAKMAP) || ENABLED (JERRY_BUILTIN_WEAKSET)
|
||||
#if JERRY_BUILTIN_MAP || JERRY_BUILTIN_SET \
|
||||
|| JERRY_BUILTIN_WEAKMAP || JERRY_BUILTIN_WEAKSET
|
||||
# define JERRY_BUILTIN_CONTAINER 1
|
||||
#else
|
||||
# define JERRY_BUILTIN_CONTAINER 0
|
||||
@@ -718,7 +715,7 @@
|
||||
/**
|
||||
* Resource name related types into a single guard
|
||||
*/
|
||||
#if ENABLED (JERRY_LINE_INFO) || ENABLED (JERRY_ERROR_MESSAGES) || ENABLED (JERRY_MODULE_SYSTEM)
|
||||
#if JERRY_LINE_INFO || JERRY_ERROR_MESSAGES || JERRY_MODULE_SYSTEM
|
||||
# define JERRY_RESOURCE_NAME 1
|
||||
#else
|
||||
# define JERRY_RESOURCE_NAME 0
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
#include "jerryscript-port.h"
|
||||
#include "lit-char-helpers.h"
|
||||
|
||||
#if ENABLED (JERRY_DEBUGGER)
|
||||
#if JERRY_DEBUGGER
|
||||
|
||||
/**
|
||||
* Incoming message: next message of string data.
|
||||
@@ -763,9 +763,9 @@ jerry_debugger_process_message (const uint8_t *recv_buffer_p, /**< pointer to th
|
||||
JERRY_CONTEXT (debugger_byte_code_free_tail) = ECMA_NULL_POINTER;
|
||||
}
|
||||
|
||||
#if ENABLED (JERRY_MEM_STATS)
|
||||
#if JERRY_MEM_STATS
|
||||
jmem_stats_free_byte_code_bytes (((size_t) byte_code_free_p->size) << JMEM_ALIGNMENT_LOG);
|
||||
#endif /* ENABLED (JERRY_MEM_STATS) */
|
||||
#endif /* JERRY_MEM_STATS */
|
||||
|
||||
jmem_heap_free_block (byte_code_free_p,
|
||||
((size_t) byte_code_free_p->size) << JMEM_ALIGNMENT_LOG);
|
||||
@@ -1378,7 +1378,7 @@ jerry_debugger_send_memstats (void)
|
||||
|
||||
memstats_p->type = JERRY_DEBUGGER_MEMSTATS_RECEIVE;
|
||||
|
||||
#if ENABLED (JERRY_MEM_STATS) /* if memory statistics feature is enabled */
|
||||
#if JERRY_MEM_STATS /* if memory statistics feature is enabled */
|
||||
jmem_heap_stats_t *heap_stats = &JERRY_CONTEXT (jmem_heap_stats);
|
||||
|
||||
uint32_t allocated_bytes = (uint32_t) heap_stats->allocated_bytes;
|
||||
@@ -1391,13 +1391,13 @@ jerry_debugger_send_memstats (void)
|
||||
memcpy (memstats_p->object_bytes, &object_bytes, sizeof (uint32_t));
|
||||
uint32_t property_bytes = (uint32_t) heap_stats->property_bytes;
|
||||
memcpy (memstats_p->property_bytes, &property_bytes, sizeof (uint32_t));
|
||||
#else /* !ENABLED (JERRY_MEM_STATS) if not, just put zeros */
|
||||
#else /* !JERRY_MEM_STATS if not, just put zeros */
|
||||
memset (memstats_p->allocated_bytes, 0, sizeof (uint32_t));
|
||||
memset (memstats_p->byte_code_bytes, 0, sizeof (uint32_t));
|
||||
memset (memstats_p->string_bytes, 0, sizeof (uint32_t));
|
||||
memset (memstats_p->object_bytes, 0, sizeof (uint32_t));
|
||||
memset (memstats_p->property_bytes, 0, sizeof (uint32_t));
|
||||
#endif /* ENABLED (JERRY_MEM_STATS) */
|
||||
#endif /* JERRY_MEM_STATS */
|
||||
|
||||
jerry_debugger_send (sizeof (jerry_debugger_send_memstats_t));
|
||||
} /* jerry_debugger_send_memstats */
|
||||
@@ -1431,7 +1431,7 @@ jerry_debugger_exception_object_to_string (ecma_value_t exception_obj_value) /**
|
||||
|
||||
switch (((ecma_extended_object_t *) prototype_p)->u.built_in.id)
|
||||
{
|
||||
#if ENABLED (JERRY_BUILTIN_ERRORS)
|
||||
#if JERRY_BUILTIN_ERRORS
|
||||
case ECMA_BUILTIN_ID_EVAL_ERROR_PROTOTYPE:
|
||||
{
|
||||
string_id = LIT_MAGIC_STRING_EVAL_ERROR_UL;
|
||||
@@ -1462,7 +1462,7 @@ jerry_debugger_exception_object_to_string (ecma_value_t exception_obj_value) /**
|
||||
string_id = LIT_MAGIC_STRING_URI_ERROR_UL;
|
||||
break;
|
||||
}
|
||||
#endif /* ENABLED (JERRY_BUILTIN_ERRORS) */
|
||||
#endif /* JERRY_BUILTIN_ERRORS */
|
||||
case ECMA_BUILTIN_ID_ERROR_PROTOTYPE:
|
||||
{
|
||||
string_id = LIT_MAGIC_STRING_ERROR_UL;
|
||||
@@ -1545,4 +1545,4 @@ jerry_debugger_send_exception_string (ecma_value_t exception_value)
|
||||
return result;
|
||||
} /* jerry_debugger_send_exception_string */
|
||||
|
||||
#endif /* ENABLED (JERRY_DEBUGGER) */
|
||||
#endif /* JERRY_DEBUGGER */
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
#include "ecma-globals.h"
|
||||
#include "jerryscript-debugger-transport.h"
|
||||
|
||||
#if ENABLED (JERRY_DEBUGGER)
|
||||
#if JERRY_DEBUGGER
|
||||
|
||||
/* JerryScript debugger protocol is a simplified version of RFC-6455 (WebSockets). */
|
||||
|
||||
@@ -486,6 +486,6 @@ bool jerry_debugger_send_parse_function (uint32_t line, uint32_t column);
|
||||
void jerry_debugger_send_memstats (void);
|
||||
bool jerry_debugger_send_exception_string (ecma_value_t exception_value);
|
||||
|
||||
#endif /* ENABLED (JERRY_DEBUGGER) */
|
||||
#endif /* JERRY_DEBUGGER */
|
||||
|
||||
#endif /* !DEBUGGER_H */
|
||||
|
||||
@@ -74,9 +74,9 @@ ecma_dealloc_number (ecma_number_t *number_p) /**< number to be freed */
|
||||
extern inline ecma_object_t * JERRY_ATTR_ALWAYS_INLINE
|
||||
ecma_alloc_object (void)
|
||||
{
|
||||
#if ENABLED (JERRY_MEM_STATS)
|
||||
#if JERRY_MEM_STATS
|
||||
jmem_stats_allocate_object_bytes (sizeof (ecma_object_t));
|
||||
#endif /* ENABLED (JERRY_MEM_STATS) */
|
||||
#endif /* JERRY_MEM_STATS */
|
||||
|
||||
return (ecma_object_t *) jmem_pools_alloc (sizeof (ecma_object_t));
|
||||
} /* ecma_alloc_object */
|
||||
@@ -87,9 +87,9 @@ ecma_alloc_object (void)
|
||||
extern inline void JERRY_ATTR_ALWAYS_INLINE
|
||||
ecma_dealloc_object (ecma_object_t *object_p) /**< object to be freed */
|
||||
{
|
||||
#if ENABLED (JERRY_MEM_STATS)
|
||||
#if JERRY_MEM_STATS
|
||||
jmem_stats_free_object_bytes (sizeof (ecma_object_t));
|
||||
#endif /* ENABLED (JERRY_MEM_STATS) */
|
||||
#endif /* JERRY_MEM_STATS */
|
||||
|
||||
jmem_pools_free (object_p, sizeof (ecma_object_t));
|
||||
} /* ecma_dealloc_object */
|
||||
@@ -102,9 +102,9 @@ ecma_dealloc_object (ecma_object_t *object_p) /**< object to be freed */
|
||||
extern inline ecma_extended_object_t * JERRY_ATTR_ALWAYS_INLINE
|
||||
ecma_alloc_extended_object (size_t size) /**< size of object */
|
||||
{
|
||||
#if ENABLED (JERRY_MEM_STATS)
|
||||
#if JERRY_MEM_STATS
|
||||
jmem_stats_allocate_object_bytes (size);
|
||||
#endif /* ENABLED (JERRY_MEM_STATS) */
|
||||
#endif /* JERRY_MEM_STATS */
|
||||
|
||||
return jmem_heap_alloc_block (size);
|
||||
} /* ecma_alloc_extended_object */
|
||||
@@ -116,9 +116,9 @@ extern inline void JERRY_ATTR_ALWAYS_INLINE
|
||||
ecma_dealloc_extended_object (ecma_object_t *object_p, /**< extended object */
|
||||
size_t size) /**< size of object */
|
||||
{
|
||||
#if ENABLED (JERRY_MEM_STATS)
|
||||
#if JERRY_MEM_STATS
|
||||
jmem_stats_free_object_bytes (size);
|
||||
#endif /* ENABLED (JERRY_MEM_STATS) */
|
||||
#endif /* JERRY_MEM_STATS */
|
||||
|
||||
jmem_heap_free_block (object_p, size);
|
||||
} /* ecma_dealloc_extended_object */
|
||||
@@ -131,9 +131,9 @@ ecma_dealloc_extended_object (ecma_object_t *object_p, /**< extended object */
|
||||
extern inline ecma_string_t * JERRY_ATTR_ALWAYS_INLINE
|
||||
ecma_alloc_string (void)
|
||||
{
|
||||
#if ENABLED (JERRY_MEM_STATS)
|
||||
#if JERRY_MEM_STATS
|
||||
jmem_stats_allocate_string_bytes (sizeof (ecma_string_t));
|
||||
#endif /* ENABLED (JERRY_MEM_STATS) */
|
||||
#endif /* JERRY_MEM_STATS */
|
||||
|
||||
return (ecma_string_t *) jmem_pools_alloc (sizeof (ecma_string_t));
|
||||
} /* ecma_alloc_string */
|
||||
@@ -144,9 +144,9 @@ ecma_alloc_string (void)
|
||||
extern inline void JERRY_ATTR_ALWAYS_INLINE
|
||||
ecma_dealloc_string (ecma_string_t *string_p) /**< string to be freed */
|
||||
{
|
||||
#if ENABLED (JERRY_MEM_STATS)
|
||||
#if JERRY_MEM_STATS
|
||||
jmem_stats_free_string_bytes (sizeof (ecma_string_t));
|
||||
#endif /* ENABLED (JERRY_MEM_STATS) */
|
||||
#endif /* JERRY_MEM_STATS */
|
||||
|
||||
jmem_pools_free (string_p, sizeof (ecma_string_t));
|
||||
} /* ecma_dealloc_string */
|
||||
@@ -159,9 +159,9 @@ ecma_dealloc_string (ecma_string_t *string_p) /**< string to be freed */
|
||||
extern inline ecma_extended_string_t * JERRY_ATTR_ALWAYS_INLINE
|
||||
ecma_alloc_extended_string (void)
|
||||
{
|
||||
#if ENABLED (JERRY_MEM_STATS)
|
||||
#if JERRY_MEM_STATS
|
||||
jmem_stats_allocate_string_bytes (sizeof (ecma_extended_string_t));
|
||||
#endif /* ENABLED (JERRY_MEM_STATS) */
|
||||
#endif /* JERRY_MEM_STATS */
|
||||
|
||||
return (ecma_extended_string_t *) jmem_heap_alloc_block (sizeof (ecma_extended_string_t));
|
||||
} /* ecma_alloc_extended_string */
|
||||
@@ -172,9 +172,9 @@ ecma_alloc_extended_string (void)
|
||||
extern inline void JERRY_ATTR_ALWAYS_INLINE
|
||||
ecma_dealloc_extended_string (ecma_extended_string_t *ext_string_p) /**< extended string to be freed */
|
||||
{
|
||||
#if ENABLED (JERRY_MEM_STATS)
|
||||
#if JERRY_MEM_STATS
|
||||
jmem_stats_free_string_bytes (sizeof (ecma_extended_string_t));
|
||||
#endif /* ENABLED (JERRY_MEM_STATS) */
|
||||
#endif /* JERRY_MEM_STATS */
|
||||
|
||||
jmem_heap_free_block (ext_string_p, sizeof (ecma_extended_string_t));
|
||||
} /* ecma_dealloc_extended_string */
|
||||
@@ -187,9 +187,9 @@ ecma_dealloc_extended_string (ecma_extended_string_t *ext_string_p) /**< extende
|
||||
extern inline ecma_external_string_t * JERRY_ATTR_ALWAYS_INLINE
|
||||
ecma_alloc_external_string (void)
|
||||
{
|
||||
#if ENABLED (JERRY_MEM_STATS)
|
||||
#if JERRY_MEM_STATS
|
||||
jmem_stats_allocate_string_bytes (sizeof (ecma_external_string_t));
|
||||
#endif /* ENABLED (JERRY_MEM_STATS) */
|
||||
#endif /* JERRY_MEM_STATS */
|
||||
|
||||
return (ecma_external_string_t *) jmem_heap_alloc_block (sizeof (ecma_external_string_t));
|
||||
} /* ecma_alloc_external_string */
|
||||
@@ -200,9 +200,9 @@ ecma_alloc_external_string (void)
|
||||
extern inline void JERRY_ATTR_ALWAYS_INLINE
|
||||
ecma_dealloc_external_string (ecma_external_string_t *ext_string_p) /**< external string to be freed */
|
||||
{
|
||||
#if ENABLED (JERRY_MEM_STATS)
|
||||
#if JERRY_MEM_STATS
|
||||
jmem_stats_free_string_bytes (sizeof (ecma_external_string_t));
|
||||
#endif /* ENABLED (JERRY_MEM_STATS) */
|
||||
#endif /* JERRY_MEM_STATS */
|
||||
|
||||
jmem_heap_free_block (ext_string_p, sizeof (ecma_external_string_t));
|
||||
} /* ecma_dealloc_external_string */
|
||||
@@ -215,9 +215,9 @@ ecma_dealloc_external_string (ecma_external_string_t *ext_string_p) /**< externa
|
||||
extern inline ecma_string_t * JERRY_ATTR_ALWAYS_INLINE
|
||||
ecma_alloc_string_buffer (size_t size) /**< size of string */
|
||||
{
|
||||
#if ENABLED (JERRY_MEM_STATS)
|
||||
#if JERRY_MEM_STATS
|
||||
jmem_stats_allocate_string_bytes (size);
|
||||
#endif /* ENABLED (JERRY_MEM_STATS) */
|
||||
#endif /* JERRY_MEM_STATS */
|
||||
|
||||
return jmem_heap_alloc_block (size);
|
||||
} /* ecma_alloc_string_buffer */
|
||||
@@ -229,9 +229,9 @@ extern inline void JERRY_ATTR_ALWAYS_INLINE
|
||||
ecma_dealloc_string_buffer (ecma_string_t *string_p, /**< string with data */
|
||||
size_t size) /**< size of string */
|
||||
{
|
||||
#if ENABLED (JERRY_MEM_STATS)
|
||||
#if JERRY_MEM_STATS
|
||||
jmem_stats_free_string_bytes (size);
|
||||
#endif /* ENABLED (JERRY_MEM_STATS) */
|
||||
#endif /* JERRY_MEM_STATS */
|
||||
|
||||
jmem_heap_free_block (string_p, size);
|
||||
} /* ecma_dealloc_string_buffer */
|
||||
@@ -244,9 +244,9 @@ ecma_dealloc_string_buffer (ecma_string_t *string_p, /**< string with data */
|
||||
extern inline ecma_property_pair_t * JERRY_ATTR_ALWAYS_INLINE
|
||||
ecma_alloc_property_pair (void)
|
||||
{
|
||||
#if ENABLED (JERRY_MEM_STATS)
|
||||
#if JERRY_MEM_STATS
|
||||
jmem_stats_allocate_property_bytes (sizeof (ecma_property_pair_t));
|
||||
#endif /* ENABLED (JERRY_MEM_STATS) */
|
||||
#endif /* JERRY_MEM_STATS */
|
||||
|
||||
return jmem_heap_alloc_block (sizeof (ecma_property_pair_t));
|
||||
} /* ecma_alloc_property_pair */
|
||||
@@ -257,9 +257,9 @@ ecma_alloc_property_pair (void)
|
||||
extern inline void JERRY_ATTR_ALWAYS_INLINE
|
||||
ecma_dealloc_property_pair (ecma_property_pair_t *property_pair_p) /**< property pair to be freed */
|
||||
{
|
||||
#if ENABLED (JERRY_MEM_STATS)
|
||||
#if JERRY_MEM_STATS
|
||||
jmem_stats_free_property_bytes (sizeof (ecma_property_pair_t));
|
||||
#endif /* ENABLED (JERRY_MEM_STATS) */
|
||||
#endif /* JERRY_MEM_STATS */
|
||||
|
||||
jmem_heap_free_block (property_pair_p, sizeof (ecma_property_pair_t));
|
||||
} /* ecma_dealloc_property_pair */
|
||||
|
||||
+134
-134
@@ -37,12 +37,12 @@
|
||||
#include "vm-defines.h"
|
||||
#include "vm-stack.h"
|
||||
|
||||
#if ENABLED (JERRY_BUILTIN_TYPEDARRAY)
|
||||
#if JERRY_BUILTIN_TYPEDARRAY
|
||||
#include "ecma-typedarray-object.h"
|
||||
#endif /* ENABLED (JERRY_BUILTIN_TYPEDARRAY) */
|
||||
#if ENABLED (JERRY_BUILTIN_PROMISE)
|
||||
#endif /* JERRY_BUILTIN_TYPEDARRAY */
|
||||
#if JERRY_BUILTIN_PROMISE
|
||||
#include "ecma-promise-object.h"
|
||||
#endif /* ENABLED (JERRY_BUILTIN_PROMISE) */
|
||||
#endif /* JERRY_BUILTIN_PROMISE */
|
||||
|
||||
/* TODO: Extract GC to a separate component */
|
||||
|
||||
@@ -160,16 +160,16 @@ ecma_gc_mark_global_object (ecma_global_object_t *global_object_p) /**< global o
|
||||
|
||||
ecma_gc_set_object_visited (ECMA_GET_NON_NULL_POINTER (ecma_object_t, global_object_p->global_env_cp));
|
||||
|
||||
#if ENABLED (JERRY_BUILTIN_REALMS)
|
||||
#if JERRY_BUILTIN_REALMS
|
||||
ecma_gc_set_object_visited (ecma_get_object_from_value (global_object_p->this_binding));
|
||||
#endif /* ENABLED (JERRY_BUILTIN_REALMS) */
|
||||
#endif /* JERRY_BUILTIN_REALMS */
|
||||
|
||||
#if ENABLED (JERRY_ESNEXT)
|
||||
#if JERRY_ESNEXT
|
||||
if (global_object_p->global_scope_cp != global_object_p->global_env_cp)
|
||||
{
|
||||
ecma_gc_set_object_visited (ECMA_GET_NON_NULL_POINTER (ecma_object_t, global_object_p->global_scope_cp));
|
||||
}
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
|
||||
jmem_cpointer_t *builtin_objects_p = global_object_p->builtin_objects;
|
||||
|
||||
@@ -264,7 +264,7 @@ ecma_gc_mark_properties (ecma_property_pair_t *property_pair_p) /**< property pa
|
||||
JERRY_ASSERT (property_pair_p->names_cp[index] >= LIT_INTERNAL_MAGIC_STRING_FIRST_DATA
|
||||
&& property_pair_p->names_cp[index] < LIT_MAGIC_STRING__COUNT);
|
||||
|
||||
#if ENABLED (JERRY_ESNEXT)
|
||||
#if JERRY_ESNEXT
|
||||
if (property_pair_p->names_cp[index] == LIT_INTERNAL_MAGIC_STRING_ENVIRONMENT_RECORD)
|
||||
{
|
||||
ecma_environment_record_t *environment_record_p;
|
||||
@@ -280,7 +280,7 @@ ecma_gc_mark_properties (ecma_property_pair_t *property_pair_p) /**< property pa
|
||||
JERRY_ASSERT (ecma_is_value_object (environment_record_p->function_object));
|
||||
ecma_gc_set_object_visited (ecma_get_object_from_value (environment_record_p->function_object));
|
||||
}
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
}
|
||||
} /* ecma_gc_mark_properties */
|
||||
|
||||
@@ -326,7 +326,7 @@ ecma_gc_mark_bound_function_object (ecma_object_t *object_p) /**< bound function
|
||||
}
|
||||
} /* ecma_gc_mark_bound_function_object */
|
||||
|
||||
#if ENABLED (JERRY_BUILTIN_PROMISE)
|
||||
#if JERRY_BUILTIN_PROMISE
|
||||
/**
|
||||
* Mark objects referenced by Promise built-in.
|
||||
*/
|
||||
@@ -378,9 +378,9 @@ ecma_gc_mark_promise_object (ecma_extended_object_t *ext_object_p) /**< extended
|
||||
}
|
||||
} /* ecma_gc_mark_promise_object */
|
||||
|
||||
#endif /* ENABLED (JERRY_BUILTIN_PROMISE) */
|
||||
#endif /* JERRY_BUILTIN_PROMISE */
|
||||
|
||||
#if ENABLED (JERRY_BUILTIN_MAP)
|
||||
#if JERRY_BUILTIN_MAP
|
||||
/**
|
||||
* Mark objects referenced by Map built-in.
|
||||
*/
|
||||
@@ -415,9 +415,9 @@ ecma_gc_mark_map_object (ecma_object_t *object_p) /**< object */
|
||||
}
|
||||
}
|
||||
} /* ecma_gc_mark_map_object */
|
||||
#endif /* ENABLED (JERRY_BUILTIN_MAP) */
|
||||
#endif /* JERRY_BUILTIN_MAP */
|
||||
|
||||
#if ENABLED (JERRY_BUILTIN_WEAKMAP)
|
||||
#if JERRY_BUILTIN_WEAKMAP
|
||||
/**
|
||||
* Mark objects referenced by WeakMap built-in.
|
||||
*/
|
||||
@@ -447,9 +447,9 @@ ecma_gc_mark_weakmap_object (ecma_object_t *object_p) /**< object */
|
||||
}
|
||||
}
|
||||
} /* ecma_gc_mark_weakmap_object */
|
||||
#endif /* ENABLED (JERRY_BUILTIN_WEAKMAP) */
|
||||
#endif /* JERRY_BUILTIN_WEAKMAP */
|
||||
|
||||
#if ENABLED (JERRY_BUILTIN_SET)
|
||||
#if JERRY_BUILTIN_SET
|
||||
/**
|
||||
* Mark objects referenced by Set built-in.
|
||||
*/
|
||||
@@ -479,9 +479,9 @@ ecma_gc_mark_set_object (ecma_object_t *object_p) /**< object */
|
||||
}
|
||||
}
|
||||
} /* ecma_gc_mark_set_object */
|
||||
#endif /* ENABLED (JERRY_BUILTIN_SET) */
|
||||
#endif /* JERRY_BUILTIN_SET */
|
||||
|
||||
#if ENABLED (JERRY_ESNEXT)
|
||||
#if JERRY_ESNEXT
|
||||
/**
|
||||
* Mark objects referenced by inactive generator functions, async functions, etc.
|
||||
*/
|
||||
@@ -615,9 +615,9 @@ ecma_gc_mark_executable_object (ecma_object_t *object_p) /**< object */
|
||||
}
|
||||
} /* ecma_gc_mark_executable_object */
|
||||
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
|
||||
#if ENABLED (JERRY_BUILTIN_PROXY)
|
||||
#if JERRY_BUILTIN_PROXY
|
||||
/**
|
||||
* Mark the objects referenced by a proxy object
|
||||
*/
|
||||
@@ -638,7 +638,7 @@ ecma_gc_mark_proxy_object (ecma_object_t *object_p) /**< proxy object */
|
||||
ecma_gc_set_object_visited (ecma_get_object_from_value (proxy_p->handler));
|
||||
}
|
||||
} /* ecma_gc_mark_proxy_object */
|
||||
#endif /* ENABLED (JERRY_BUILTIN_PROXY) */
|
||||
#endif /* JERRY_BUILTIN_PROXY */
|
||||
|
||||
/**
|
||||
* Mark objects as visited starting from specified object as root
|
||||
@@ -669,7 +669,7 @@ ecma_gc_mark (ecma_object_t *object_p) /**< object to mark from */
|
||||
{
|
||||
ecma_object_type_t object_type = ecma_get_object_type (object_p);
|
||||
|
||||
#if ENABLED (JERRY_BUILTIN_REALMS)
|
||||
#if JERRY_BUILTIN_REALMS
|
||||
if (JERRY_UNLIKELY (ecma_get_object_is_builtin (object_p)))
|
||||
{
|
||||
ecma_value_t realm_value;
|
||||
@@ -693,7 +693,7 @@ ecma_gc_mark (ecma_object_t *object_p) /**< object to mark from */
|
||||
|
||||
ecma_gc_set_object_visited (ECMA_GET_INTERNAL_VALUE_POINTER (ecma_object_t, realm_value));
|
||||
}
|
||||
#endif /* ENABLED (JERRY_BUILTIN_REALMS) */
|
||||
#endif /* JERRY_BUILTIN_REALMS */
|
||||
|
||||
/**
|
||||
* Have the object's prototype here so the object could set it to JMEM_CP_NULL
|
||||
@@ -703,7 +703,7 @@ ecma_gc_mark (ecma_object_t *object_p) /**< object to mark from */
|
||||
|
||||
switch (object_type)
|
||||
{
|
||||
#if !ENABLED (JERRY_BUILTIN_REALMS)
|
||||
#if !JERRY_BUILTIN_REALMS
|
||||
case ECMA_OBJECT_TYPE_GENERAL:
|
||||
{
|
||||
if (JERRY_UNLIKELY (ecma_get_object_is_builtin (object_p))
|
||||
@@ -713,58 +713,58 @@ ecma_gc_mark (ecma_object_t *object_p) /**< object to mark from */
|
||||
}
|
||||
break;
|
||||
}
|
||||
#endif /* !ENABLED (JERRY_BUILTIN_REALMS) */
|
||||
#endif /* !JERRY_BUILTIN_REALMS */
|
||||
case ECMA_OBJECT_TYPE_CLASS:
|
||||
{
|
||||
ecma_extended_object_t *ext_object_p = (ecma_extended_object_t *) object_p;
|
||||
|
||||
switch (ext_object_p->u.class_prop.class_id)
|
||||
{
|
||||
#if ENABLED (JERRY_BUILTIN_PROMISE)
|
||||
#if JERRY_BUILTIN_PROMISE
|
||||
case LIT_MAGIC_STRING_PROMISE_UL:
|
||||
{
|
||||
ecma_gc_mark_promise_object (ext_object_p);
|
||||
break;
|
||||
}
|
||||
#endif /* ENABLED (JERRY_BUILTIN_PROMISE) */
|
||||
#if ENABLED (JERRY_BUILTIN_DATAVIEW)
|
||||
#endif /* JERRY_BUILTIN_PROMISE */
|
||||
#if JERRY_BUILTIN_DATAVIEW
|
||||
case LIT_MAGIC_STRING_DATAVIEW_UL:
|
||||
{
|
||||
ecma_dataview_object_t *dataview_p = (ecma_dataview_object_t *) object_p;
|
||||
ecma_gc_set_object_visited (dataview_p->buffer_p);
|
||||
break;
|
||||
}
|
||||
#endif /* ENABLED (JERRY_BUILTIN_DATAVIEW) */
|
||||
#if ENABLED (JERRY_BUILTIN_CONTAINER)
|
||||
#if ENABLED (JERRY_BUILTIN_WEAKSET)
|
||||
#endif /* JERRY_BUILTIN_DATAVIEW */
|
||||
#if JERRY_BUILTIN_CONTAINER
|
||||
#if JERRY_BUILTIN_WEAKSET
|
||||
case LIT_MAGIC_STRING_WEAKSET_UL:
|
||||
{
|
||||
break;
|
||||
}
|
||||
#endif /* ENABLED (JERRY_BUILTIN_WEAKSET) */
|
||||
#if ENABLED (JERRY_BUILTIN_SET)
|
||||
#endif /* JERRY_BUILTIN_WEAKSET */
|
||||
#if JERRY_BUILTIN_SET
|
||||
case LIT_MAGIC_STRING_SET_UL:
|
||||
{
|
||||
ecma_gc_mark_set_object (object_p);
|
||||
break;
|
||||
}
|
||||
#endif /* ENABLED (JERRY_BUILTIN_SET) */
|
||||
#if ENABLED (JERRY_BUILTIN_WEAKMAP)
|
||||
#endif /* JERRY_BUILTIN_SET */
|
||||
#if JERRY_BUILTIN_WEAKMAP
|
||||
case LIT_MAGIC_STRING_WEAKMAP_UL:
|
||||
{
|
||||
ecma_gc_mark_weakmap_object (object_p);
|
||||
break;
|
||||
}
|
||||
#endif /* ENABLED (JERRY_BUILTIN_WEAKMAP) */
|
||||
#if ENABLED (JERRY_BUILTIN_MAP)
|
||||
#endif /* JERRY_BUILTIN_WEAKMAP */
|
||||
#if JERRY_BUILTIN_MAP
|
||||
case LIT_MAGIC_STRING_MAP_UL:
|
||||
{
|
||||
ecma_gc_mark_map_object (object_p);
|
||||
break;
|
||||
}
|
||||
#endif /* ENABLED (JERRY_BUILTIN_MAP) */
|
||||
#endif /* ENABLED (JERRY_BUILTIN_CONTAINER) */
|
||||
#if ENABLED (JERRY_ESNEXT)
|
||||
#endif /* JERRY_BUILTIN_MAP */
|
||||
#endif /* JERRY_BUILTIN_CONTAINER */
|
||||
#if JERRY_ESNEXT
|
||||
case LIT_MAGIC_STRING_GENERATOR_UL:
|
||||
case LIT_MAGIC_STRING_ASYNC_GENERATOR_UL:
|
||||
{
|
||||
@@ -789,7 +789,7 @@ ecma_gc_mark (ecma_object_t *object_p) /**< object to mark from */
|
||||
}
|
||||
break;
|
||||
}
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
default:
|
||||
{
|
||||
break;
|
||||
@@ -804,15 +804,15 @@ ecma_gc_mark (ecma_object_t *object_p) /**< object to mark from */
|
||||
|
||||
switch (ext_object_p->u.pseudo_array.type)
|
||||
{
|
||||
#if ENABLED (JERRY_BUILTIN_TYPEDARRAY)
|
||||
#if JERRY_BUILTIN_TYPEDARRAY
|
||||
case ECMA_PSEUDO_ARRAY_TYPEDARRAY:
|
||||
case ECMA_PSEUDO_ARRAY_TYPEDARRAY_WITH_INFO:
|
||||
{
|
||||
ecma_gc_set_object_visited (ecma_typedarray_get_arraybuffer (object_p));
|
||||
break;
|
||||
}
|
||||
#endif /* ENABLED (JERRY_BUILTIN_TYPEDARRAY) */
|
||||
#if ENABLED (JERRY_ESNEXT)
|
||||
#endif /* JERRY_BUILTIN_TYPEDARRAY */
|
||||
#if JERRY_ESNEXT
|
||||
case ECMA_PSEUDO_ARRAY_ITERATOR:
|
||||
case ECMA_PSEUDO_SET_ITERATOR:
|
||||
case ECMA_PSEUDO_MAP_ITERATOR:
|
||||
@@ -835,7 +835,7 @@ ecma_gc_mark (ecma_object_t *object_p) /**< object to mark from */
|
||||
ecma_gc_set_object_visited (ecma_get_object_from_value (regexp));
|
||||
break;
|
||||
}
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
default:
|
||||
{
|
||||
JERRY_ASSERT (ext_object_p->u.pseudo_array.type == ECMA_PSEUDO_ARRAY_ARGUMENTS);
|
||||
@@ -851,14 +851,14 @@ ecma_gc_mark (ecma_object_t *object_p) /**< object to mark from */
|
||||
{
|
||||
ecma_extended_object_t *ext_object_p = (ecma_extended_object_t *) object_p;
|
||||
|
||||
#if ENABLED (JERRY_ESNEXT)
|
||||
#if JERRY_ESNEXT
|
||||
if (JERRY_UNLIKELY (ext_object_p->u.array.length_prop_and_hole_count & ECMA_ARRAY_TEMPLATE_LITERAL))
|
||||
{
|
||||
/* Template objects are never marked. */
|
||||
JERRY_ASSERT (object_p->type_flags_refs >= ECMA_OBJECT_REF_ONE);
|
||||
return;
|
||||
}
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
|
||||
if (ecma_op_array_is_fast_array (ext_object_p))
|
||||
{
|
||||
@@ -883,7 +883,7 @@ ecma_gc_mark (ecma_object_t *object_p) /**< object to mark from */
|
||||
}
|
||||
break;
|
||||
}
|
||||
#if ENABLED (JERRY_BUILTIN_PROXY)
|
||||
#if JERRY_BUILTIN_PROXY
|
||||
case ECMA_OBJECT_TYPE_PROXY:
|
||||
{
|
||||
ecma_gc_mark_proxy_object (object_p);
|
||||
@@ -891,7 +891,7 @@ ecma_gc_mark (ecma_object_t *object_p) /**< object to mark from */
|
||||
proto_cp = JMEM_CP_NULL;
|
||||
break;
|
||||
}
|
||||
#endif /* ENABLED (JERRY_BUILTIN_PROXY) */
|
||||
#endif /* JERRY_BUILTIN_PROXY */
|
||||
case ECMA_OBJECT_TYPE_BOUND_FUNCTION:
|
||||
{
|
||||
ecma_gc_mark_bound_function_object (object_p);
|
||||
@@ -905,11 +905,11 @@ ecma_gc_mark (ecma_object_t *object_p) /**< object to mark from */
|
||||
ecma_gc_set_object_visited (ECMA_GET_NON_NULL_POINTER_FROM_POINTER_TAG (ecma_object_t,
|
||||
ext_func_p->u.function.scope_cp));
|
||||
|
||||
#if ENABLED (JERRY_ESNEXT) || ENABLED (JERRY_BUILTIN_REALMS)
|
||||
#if JERRY_ESNEXT || JERRY_BUILTIN_REALMS
|
||||
const ecma_compiled_code_t *byte_code_p = ecma_op_function_get_compiled_code (ext_func_p);
|
||||
#endif /* ENABLED (JERRY_ESNEXT) || ENABLED (JERRY_BUILTIN_REALMS) */
|
||||
#endif /* JERRY_ESNEXT || JERRY_BUILTIN_REALMS */
|
||||
|
||||
#if ENABLED (JERRY_ESNEXT)
|
||||
#if JERRY_ESNEXT
|
||||
if (CBC_FUNCTION_IS_ARROW (byte_code_p->status_flags))
|
||||
{
|
||||
ecma_arrow_function_t *arrow_func_p = (ecma_arrow_function_t *) object_p;
|
||||
@@ -924,16 +924,16 @@ ecma_gc_mark (ecma_object_t *object_p) /**< object to mark from */
|
||||
ecma_gc_set_object_visited (ecma_get_object_from_value (arrow_func_p->new_target));
|
||||
}
|
||||
}
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
|
||||
#if ENABLED (JERRY_BUILTIN_REALMS)
|
||||
#if ENABLED (JERRY_SNAPSHOT_EXEC)
|
||||
#if JERRY_BUILTIN_REALMS
|
||||
#if JERRY_SNAPSHOT_EXEC
|
||||
if (ext_func_p->u.function.bytecode_cp == JMEM_CP_NULL)
|
||||
{
|
||||
/* Static snapshot functions have a global realm */
|
||||
break;
|
||||
}
|
||||
#endif /* ENABLED (JERRY_SNAPSHOT_EXEC) */
|
||||
#endif /* JERRY_SNAPSHOT_EXEC */
|
||||
|
||||
ecma_object_t *realm_p;
|
||||
|
||||
@@ -949,25 +949,25 @@ ecma_gc_mark (ecma_object_t *object_p) /**< object to mark from */
|
||||
}
|
||||
|
||||
ecma_gc_set_object_visited (realm_p);
|
||||
#endif /* ENABLED (JERRY_BUILTIN_REALMS) */
|
||||
#endif /* JERRY_BUILTIN_REALMS */
|
||||
break;
|
||||
}
|
||||
#if ENABLED (JERRY_ESNEXT) || ENABLED (JERRY_BUILTIN_REALMS)
|
||||
#if JERRY_ESNEXT || JERRY_BUILTIN_REALMS
|
||||
case ECMA_OBJECT_TYPE_NATIVE_FUNCTION:
|
||||
{
|
||||
#endif /* ENABLED (JERRY_ESNEXT) || ENABLED (JERRY_BUILTIN_REALMS) */
|
||||
#endif /* JERRY_ESNEXT || JERRY_BUILTIN_REALMS */
|
||||
|
||||
if (!ecma_get_object_is_builtin (object_p))
|
||||
{
|
||||
#if ENABLED (JERRY_BUILTIN_REALMS)
|
||||
#if JERRY_BUILTIN_REALMS
|
||||
ecma_native_function_t *native_function_p = (ecma_native_function_t *) object_p;
|
||||
ecma_gc_set_object_visited (ECMA_GET_INTERNAL_VALUE_POINTER (ecma_object_t,
|
||||
native_function_p->realm_value));
|
||||
#endif /* ENABLED (JERRY_BUILTIN_REALMS) */
|
||||
#endif /* JERRY_BUILTIN_REALMS */
|
||||
break;
|
||||
}
|
||||
|
||||
#if ENABLED (JERRY_ESNEXT)
|
||||
#if JERRY_ESNEXT
|
||||
ecma_extended_object_t *ext_func_p = (ecma_extended_object_t *) object_p;
|
||||
|
||||
if (ext_func_p->u.built_in.id == ECMA_BUILTIN_ID_HANDLER)
|
||||
@@ -1003,7 +1003,7 @@ ecma_gc_mark (ecma_object_t *object_p) /**< object to mark from */
|
||||
ecma_gc_set_object_visited (ecma_get_object_from_value (executor_p->remaining_elements));
|
||||
break;
|
||||
}
|
||||
#if ENABLED (JERRY_BUILTIN_PROXY)
|
||||
#if JERRY_BUILTIN_PROXY
|
||||
case ECMA_NATIVE_HANDLER_PROXY_REVOKE:
|
||||
{
|
||||
ecma_revocable_proxy_object_t *rev_proxy_p = (ecma_revocable_proxy_object_t *) object_p;
|
||||
@@ -1015,7 +1015,7 @@ ecma_gc_mark (ecma_object_t *object_p) /**< object to mark from */
|
||||
|
||||
break;
|
||||
}
|
||||
#endif /* ENABLED (JERRY_BUILTIN_PROXY) */
|
||||
#endif /* JERRY_BUILTIN_PROXY */
|
||||
case ECMA_NATIVE_HANDLER_VALUE_THUNK:
|
||||
case ECMA_NATIVE_HANDLER_VALUE_THROWER:
|
||||
{
|
||||
@@ -1033,12 +1033,12 @@ ecma_gc_mark (ecma_object_t *object_p) /**< object to mark from */
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
|
||||
#if ENABLED (JERRY_ESNEXT) || ENABLED (JERRY_BUILTIN_REALMS)
|
||||
#if JERRY_ESNEXT || JERRY_BUILTIN_REALMS
|
||||
break;
|
||||
}
|
||||
#endif /* ENABLED (JERRY_ESNEXT) || ENABLED (JERRY_BUILTIN_REALMS) */
|
||||
#endif /* JERRY_ESNEXT || JERRY_BUILTIN_REALMS */
|
||||
default:
|
||||
{
|
||||
break;
|
||||
@@ -1053,7 +1053,7 @@ ecma_gc_mark (ecma_object_t *object_p) /**< object to mark from */
|
||||
|
||||
jmem_cpointer_t prop_iter_cp = object_p->u1.property_list_cp;
|
||||
|
||||
#if ENABLED (JERRY_PROPRETY_HASHMAP)
|
||||
#if JERRY_PROPRETY_HASHMAP
|
||||
if (prop_iter_cp != JMEM_CP_NULL)
|
||||
{
|
||||
ecma_property_header_t *prop_iter_p = ECMA_GET_NON_NULL_POINTER (ecma_property_header_t, prop_iter_cp);
|
||||
@@ -1062,7 +1062,7 @@ ecma_gc_mark (ecma_object_t *object_p) /**< object to mark from */
|
||||
prop_iter_cp = prop_iter_p->next_property_cp;
|
||||
}
|
||||
}
|
||||
#endif /* ENABLED (JERRY_PROPRETY_HASHMAP) */
|
||||
#endif /* JERRY_PROPRETY_HASHMAP */
|
||||
|
||||
while (prop_iter_cp != JMEM_CP_NULL)
|
||||
{
|
||||
@@ -1126,9 +1126,9 @@ ecma_free_arguments_object (ecma_extended_object_t *ext_object_p) /**< arguments
|
||||
ecma_mapped_arguments_t *mapped_arguments_p = (ecma_mapped_arguments_t *) ext_object_p;
|
||||
object_size = sizeof (ecma_mapped_arguments_t);
|
||||
|
||||
#if ENABLED (JERRY_SNAPSHOT_EXEC)
|
||||
#if JERRY_SNAPSHOT_EXEC
|
||||
if (!(mapped_arguments_p->unmapped.header.u.pseudo_array.extra_info & ECMA_ARGUMENTS_OBJECT_STATIC_BYTECODE))
|
||||
#endif /* ENABLED (JERRY_SNAPSHOT_EXEC) */
|
||||
#endif /* JERRY_SNAPSHOT_EXEC */
|
||||
{
|
||||
ecma_compiled_code_t *byte_code_p = ECMA_GET_INTERNAL_VALUE_POINTER (ecma_compiled_code_t,
|
||||
mapped_arguments_p->u.byte_code);
|
||||
@@ -1178,7 +1178,7 @@ ecma_free_fast_access_array (ecma_object_t *object_p) /**< fast access mode arra
|
||||
ecma_dealloc_extended_object (object_p, sizeof (ecma_extended_object_t));
|
||||
} /* ecma_free_fast_access_array */
|
||||
|
||||
#if ENABLED (JERRY_ESNEXT)
|
||||
#if JERRY_ESNEXT
|
||||
|
||||
/**
|
||||
* Free non-objects referenced by inactive generator functions, async functions, etc.
|
||||
@@ -1302,7 +1302,7 @@ ecma_gc_free_executable_object (ecma_object_t *object_p) /**< object */
|
||||
return size;
|
||||
} /* ecma_gc_free_executable_object */
|
||||
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
|
||||
/**
|
||||
* Free properties of an object
|
||||
@@ -1312,7 +1312,7 @@ ecma_gc_free_properties (ecma_object_t *object_p) /**< object */
|
||||
{
|
||||
jmem_cpointer_t prop_iter_cp = object_p->u1.property_list_cp;
|
||||
|
||||
#if ENABLED (JERRY_PROPRETY_HASHMAP)
|
||||
#if JERRY_PROPRETY_HASHMAP
|
||||
if (prop_iter_cp != JMEM_CP_NULL)
|
||||
{
|
||||
ecma_property_header_t *prop_iter_p = ECMA_GET_NON_NULL_POINTER (ecma_property_header_t,
|
||||
@@ -1323,7 +1323,7 @@ ecma_gc_free_properties (ecma_object_t *object_p) /**< object */
|
||||
prop_iter_cp = object_p->u1.property_list_cp;
|
||||
}
|
||||
}
|
||||
#endif /* ENABLED (JERRY_PROPRETY_HASHMAP) */
|
||||
#endif /* JERRY_PROPRETY_HASHMAP */
|
||||
|
||||
while (prop_iter_cp != JMEM_CP_NULL)
|
||||
{
|
||||
@@ -1355,7 +1355,7 @@ ecma_gc_free_properties (ecma_object_t *object_p) /**< object */
|
||||
/* Call the native's free callback. */
|
||||
switch (name_cp)
|
||||
{
|
||||
#if ENABLED (JERRY_ESNEXT)
|
||||
#if JERRY_ESNEXT
|
||||
case LIT_INTERNAL_MAGIC_STRING_ENVIRONMENT_RECORD:
|
||||
{
|
||||
ecma_environment_record_t *environment_record_p;
|
||||
@@ -1372,8 +1372,8 @@ ecma_gc_free_properties (ecma_object_t *object_p) /**< object */
|
||||
ecma_compact_collection_free (compact_collection_p);
|
||||
break;
|
||||
}
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
#if ENABLED (JERRY_BUILTIN_WEAKMAP) || ENABLED (JERRY_BUILTIN_WEAKSET)
|
||||
#endif /* JERRY_ESNEXT */
|
||||
#if JERRY_BUILTIN_WEAKMAP || JERRY_BUILTIN_WEAKSET
|
||||
case LIT_INTERNAL_MAGIC_STRING_WEAK_REFS:
|
||||
{
|
||||
ecma_collection_t *refs_p = ECMA_GET_INTERNAL_VALUE_POINTER (ecma_collection_t,
|
||||
@@ -1393,7 +1393,7 @@ ecma_gc_free_properties (ecma_object_t *object_p) /**< object */
|
||||
ecma_collection_destroy (refs_p);
|
||||
break;
|
||||
}
|
||||
#endif /* ENABLED (JERRY_BUILTIN_WEAKMAP) || ENABLED (JERRY_BUILTIN_WEAKSET) */
|
||||
#endif /* JERRY_BUILTIN_WEAKMAP || JERRY_BUILTIN_WEAKSET */
|
||||
default:
|
||||
{
|
||||
JERRY_ASSERT (name_cp == LIT_INTERNAL_MAGIC_STRING_NATIVE_POINTER);
|
||||
@@ -1402,12 +1402,12 @@ ecma_gc_free_properties (ecma_object_t *object_p) /**< object */
|
||||
}
|
||||
}
|
||||
|
||||
#if ENABLED (JERRY_LCACHE)
|
||||
#if JERRY_LCACHE
|
||||
if (ecma_is_property_lcached (property_p))
|
||||
{
|
||||
ecma_lcache_invalidate (object_p, name_cp, property_p);
|
||||
}
|
||||
#endif /* ENABLED (JERRY_LCACHE) */
|
||||
#endif /* JERRY_LCACHE */
|
||||
}
|
||||
|
||||
prop_iter_cp = prop_iter_p->next_property_cp;
|
||||
@@ -1460,7 +1460,7 @@ ecma_gc_free_object (ecma_object_t *object_p) /**< object to free */
|
||||
{
|
||||
JERRY_ASSERT (object_type == ECMA_OBJECT_TYPE_NATIVE_FUNCTION);
|
||||
|
||||
#if ENABLED (JERRY_ESNEXT)
|
||||
#if JERRY_ESNEXT
|
||||
if (extended_object_p->u.built_in.id == ECMA_BUILTIN_ID_HANDLER)
|
||||
{
|
||||
switch (extended_object_p->u.built_in.routine_id)
|
||||
@@ -1487,13 +1487,13 @@ ecma_gc_free_object (ecma_object_t *object_p) /**< object to free */
|
||||
ext_object_size = sizeof (ecma_promise_all_executor_t);
|
||||
break;
|
||||
}
|
||||
#if ENABLED (JERRY_BUILTIN_PROXY)
|
||||
#if JERRY_BUILTIN_PROXY
|
||||
case ECMA_NATIVE_HANDLER_PROXY_REVOKE:
|
||||
{
|
||||
ext_object_size = sizeof (ecma_revocable_proxy_object_t);
|
||||
break;
|
||||
}
|
||||
#endif /* ENABLED (JERRY_BUILTIN_PROXY) */
|
||||
#endif /* JERRY_BUILTIN_PROXY */
|
||||
case ECMA_NATIVE_HANDLER_VALUE_THUNK:
|
||||
case ECMA_NATIVE_HANDLER_VALUE_THROWER:
|
||||
{
|
||||
@@ -1507,7 +1507,7 @@ ecma_gc_free_object (ecma_object_t *object_p) /**< object to free */
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
}
|
||||
else if (extended_object_p->u.built_in.id == ECMA_BUILTIN_ID_GLOBAL)
|
||||
{
|
||||
@@ -1556,12 +1556,12 @@ ecma_gc_free_object (ecma_object_t *object_p) /**< object to free */
|
||||
{
|
||||
case LIT_MAGIC_STRING_STRING_UL:
|
||||
case LIT_MAGIC_STRING_NUMBER_UL:
|
||||
#if ENABLED (JERRY_ESNEXT)
|
||||
#if JERRY_ESNEXT
|
||||
case LIT_MAGIC_STRING_SYMBOL_UL:
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
#if ENABLED (JERRY_BUILTIN_BIGINT)
|
||||
#endif /* JERRY_ESNEXT */
|
||||
#if JERRY_BUILTIN_BIGINT
|
||||
case LIT_MAGIC_STRING_BIGINT_UL:
|
||||
#endif /* ENABLED (JERRY_BUILTIN_BIGINT) */
|
||||
#endif /* JERRY_BUILTIN_BIGINT */
|
||||
{
|
||||
ecma_free_value (ext_object_p->u.class_prop.u.value);
|
||||
break;
|
||||
@@ -1583,7 +1583,7 @@ ecma_gc_free_object (ecma_object_t *object_p) /**< object to free */
|
||||
|
||||
break;
|
||||
}
|
||||
#if ENABLED (JERRY_BUILTIN_TYPEDARRAY)
|
||||
#if JERRY_BUILTIN_TYPEDARRAY
|
||||
case LIT_MAGIC_STRING_ARRAY_BUFFER_UL:
|
||||
{
|
||||
uint32_t arraybuffer_length = ext_object_p->u.class_prop.u.length;
|
||||
@@ -1607,8 +1607,8 @@ ecma_gc_free_object (ecma_object_t *object_p) /**< object to free */
|
||||
|
||||
break;
|
||||
}
|
||||
#endif /* ENABLED (JERRY_BUILTIN_TYPEDARRAY) */
|
||||
#if ENABLED (JERRY_BUILTIN_PROMISE)
|
||||
#endif /* JERRY_BUILTIN_TYPEDARRAY */
|
||||
#if JERRY_BUILTIN_PROMISE
|
||||
case LIT_MAGIC_STRING_PROMISE_UL:
|
||||
{
|
||||
ecma_free_value_if_not_object (ext_object_p->u.class_prop.u.value);
|
||||
@@ -1619,20 +1619,20 @@ ecma_gc_free_object (ecma_object_t *object_p) /**< object to free */
|
||||
ext_object_size = sizeof (ecma_promise_object_t);
|
||||
break;
|
||||
}
|
||||
#endif /* ENABLED (JERRY_BUILTIN_PROMISE) */
|
||||
#if ENABLED (JERRY_BUILTIN_CONTAINER)
|
||||
#if ENABLED (JERRY_BUILTIN_MAP)
|
||||
#endif /* JERRY_BUILTIN_PROMISE */
|
||||
#if JERRY_BUILTIN_CONTAINER
|
||||
#if JERRY_BUILTIN_MAP
|
||||
case LIT_MAGIC_STRING_MAP_UL:
|
||||
#endif /* ENABLED (JERRY_BUILTIN_MAP) */
|
||||
#if ENABLED (JERRY_BUILTIN_SET)
|
||||
#endif /* JERRY_BUILTIN_MAP */
|
||||
#if JERRY_BUILTIN_SET
|
||||
case LIT_MAGIC_STRING_SET_UL:
|
||||
#endif /* ENABLED (JERRY_BUILTIN_SET) */
|
||||
#if ENABLED (JERRY_BUILTIN_WEAKMAP)
|
||||
#endif /* JERRY_BUILTIN_SET */
|
||||
#if JERRY_BUILTIN_WEAKMAP
|
||||
case LIT_MAGIC_STRING_WEAKMAP_UL:
|
||||
#endif /* ENABLED (JERRY_BUILTIN_WEAKMAP) */
|
||||
#if ENABLED (JERRY_BUILTIN_WEAKSET)
|
||||
#endif /* JERRY_BUILTIN_WEAKMAP */
|
||||
#if JERRY_BUILTIN_WEAKSET
|
||||
case LIT_MAGIC_STRING_WEAKSET_UL:
|
||||
#endif /* ENABLED (JERRY_BUILTIN_WEAKSET) */
|
||||
#endif /* JERRY_BUILTIN_WEAKSET */
|
||||
{
|
||||
ecma_extended_object_t *map_object_p = (ecma_extended_object_t *) object_p;
|
||||
ecma_collection_t *container_p = ECMA_GET_INTERNAL_VALUE_POINTER (ecma_collection_t,
|
||||
@@ -1642,15 +1642,15 @@ ecma_gc_free_object (ecma_object_t *object_p) /**< object to free */
|
||||
|
||||
break;
|
||||
}
|
||||
#endif /* ENABLED (JERRY_BUILTIN_CONTAINER) */
|
||||
#if ENABLED (JERRY_BUILTIN_DATAVIEW)
|
||||
#endif /* JERRY_BUILTIN_CONTAINER */
|
||||
#if JERRY_BUILTIN_DATAVIEW
|
||||
case LIT_MAGIC_STRING_DATAVIEW_UL:
|
||||
{
|
||||
ext_object_size = sizeof (ecma_dataview_object_t);
|
||||
break;
|
||||
}
|
||||
#endif /* ENABLED (JERRY_BUILTIN_DATAVIEW) */
|
||||
#if ENABLED (JERRY_ESNEXT)
|
||||
#endif /* JERRY_BUILTIN_DATAVIEW */
|
||||
#if JERRY_ESNEXT
|
||||
case LIT_MAGIC_STRING_GENERATOR_UL:
|
||||
case LIT_MAGIC_STRING_ASYNC_GENERATOR_UL:
|
||||
{
|
||||
@@ -1662,8 +1662,8 @@ ecma_gc_free_object (ecma_object_t *object_p) /**< object to free */
|
||||
ext_object_size = sizeof (ecma_promise_capabality_t);
|
||||
break;
|
||||
}
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
#if ENABLED (JERRY_MODULE_SYSTEM)
|
||||
#endif /* JERRY_ESNEXT */
|
||||
#if JERRY_MODULE_SYSTEM
|
||||
case LIT_MAGIC_STRING_RUNNABLE_UL:
|
||||
{
|
||||
ecma_extended_object_t *wrapper_p = (ecma_extended_object_t *) object_p;
|
||||
@@ -1676,7 +1676,7 @@ ecma_gc_free_object (ecma_object_t *object_p) /**< object to free */
|
||||
ecma_module_cleanup (root_module_p);
|
||||
break;
|
||||
}
|
||||
#endif /* ENABLED (JERRY_MODULE_SYSTEM) */
|
||||
#endif /* JERRY_MODULE_SYSTEM */
|
||||
default:
|
||||
{
|
||||
/* The undefined id represents an uninitialized class. */
|
||||
@@ -1691,42 +1691,42 @@ ecma_gc_free_object (ecma_object_t *object_p) /**< object to free */
|
||||
|
||||
break;
|
||||
}
|
||||
#if ENABLED (JERRY_BUILTIN_PROXY)
|
||||
#if JERRY_BUILTIN_PROXY
|
||||
case ECMA_OBJECT_TYPE_PROXY:
|
||||
{
|
||||
ext_object_size = sizeof (ecma_proxy_object_t);
|
||||
break;
|
||||
}
|
||||
#endif /* ENABLED (JERRY_BUILTIN_PROXY) */
|
||||
#endif /* JERRY_BUILTIN_PROXY */
|
||||
case ECMA_OBJECT_TYPE_FUNCTION:
|
||||
{
|
||||
/* Function with byte-code (not a built-in function). */
|
||||
ecma_extended_object_t *ext_func_p = (ecma_extended_object_t *) object_p;
|
||||
|
||||
#if ENABLED (JERRY_SNAPSHOT_EXEC)
|
||||
#if JERRY_SNAPSHOT_EXEC
|
||||
if (ext_func_p->u.function.bytecode_cp != ECMA_NULL_POINTER)
|
||||
{
|
||||
#endif /* ENABLED (JERRY_SNAPSHOT_EXEC) */
|
||||
#endif /* JERRY_SNAPSHOT_EXEC */
|
||||
ecma_compiled_code_t *byte_code_p = (ECMA_GET_INTERNAL_VALUE_POINTER (ecma_compiled_code_t,
|
||||
ext_func_p->u.function.bytecode_cp));
|
||||
|
||||
#if ENABLED (JERRY_ESNEXT)
|
||||
#if JERRY_ESNEXT
|
||||
if (CBC_FUNCTION_IS_ARROW (byte_code_p->status_flags))
|
||||
{
|
||||
ecma_free_value_if_not_object (((ecma_arrow_function_t *) object_p)->this_binding);
|
||||
ecma_free_value_if_not_object (((ecma_arrow_function_t *) object_p)->new_target);
|
||||
ext_object_size = sizeof (ecma_arrow_function_t);
|
||||
}
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
|
||||
ecma_bytecode_deref (byte_code_p);
|
||||
#if ENABLED (JERRY_SNAPSHOT_EXEC)
|
||||
#if JERRY_SNAPSHOT_EXEC
|
||||
}
|
||||
else
|
||||
{
|
||||
ext_object_size = sizeof (ecma_static_function_t);
|
||||
}
|
||||
#endif /* ENABLED (JERRY_SNAPSHOT_EXEC) */
|
||||
#endif /* JERRY_SNAPSHOT_EXEC */
|
||||
break;
|
||||
}
|
||||
case ECMA_OBJECT_TYPE_PSEUDO_ARRAY:
|
||||
@@ -1740,14 +1740,14 @@ ecma_gc_free_object (ecma_object_t *object_p) /**< object to free */
|
||||
ext_object_size = ecma_free_arguments_object (ext_object_p);
|
||||
break;
|
||||
}
|
||||
#if ENABLED (JERRY_BUILTIN_TYPEDARRAY)
|
||||
#if JERRY_BUILTIN_TYPEDARRAY
|
||||
case ECMA_PSEUDO_ARRAY_TYPEDARRAY_WITH_INFO:
|
||||
{
|
||||
ext_object_size = sizeof (ecma_extended_typedarray_object_t);
|
||||
break;
|
||||
}
|
||||
#endif /* ENABLED (JERRY_BUILTIN_TYPEDARRAY) */
|
||||
#if ENABLED (JERRY_ESNEXT)
|
||||
#endif /* JERRY_BUILTIN_TYPEDARRAY */
|
||||
#if JERRY_ESNEXT
|
||||
case ECMA_PSEUDO_STRING_ITERATOR:
|
||||
{
|
||||
ecma_value_t iterated_value = ext_object_p->u.pseudo_array.u2.iterated_value;
|
||||
@@ -1772,7 +1772,7 @@ ecma_gc_free_object (ecma_object_t *object_p) /**< object to free */
|
||||
ext_object_size = sizeof (ecma_regexp_string_iterator_t);
|
||||
break;
|
||||
}
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
default:
|
||||
{
|
||||
JERRY_ASSERT (ext_object_p->u.pseudo_array.type == ECMA_PSEUDO_ARRAY_TYPEDARRAY
|
||||
@@ -1792,9 +1792,9 @@ ecma_gc_free_object (ecma_object_t *object_p) /**< object to free */
|
||||
|
||||
ecma_value_t args_len_or_this = bound_func_p->header.u.bound_function.args_len_or_this;
|
||||
|
||||
#if ENABLED (JERRY_ESNEXT)
|
||||
#if JERRY_ESNEXT
|
||||
ecma_free_value (bound_func_p->target_length);
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
|
||||
if (!ecma_is_value_integer_number (args_len_or_this))
|
||||
{
|
||||
@@ -1953,10 +1953,10 @@ ecma_gc_run (void)
|
||||
obj_iter_cp = obj_next_cp;
|
||||
}
|
||||
|
||||
#if ENABLED (JERRY_BUILTIN_REGEXP)
|
||||
#if JERRY_BUILTIN_REGEXP
|
||||
/* Free RegExp bytecodes stored in cache */
|
||||
re_cache_gc ();
|
||||
#endif /* ENABLED (JERRY_BUILTIN_REGEXP) */
|
||||
#endif /* JERRY_BUILTIN_REGEXP */
|
||||
} /* ecma_gc_run */
|
||||
|
||||
/**
|
||||
@@ -1967,24 +1967,24 @@ ecma_gc_run (void)
|
||||
void
|
||||
ecma_free_unused_memory (jmem_pressure_t pressure) /**< current pressure */
|
||||
{
|
||||
#if ENABLED (JERRY_DEBUGGER)
|
||||
#if JERRY_DEBUGGER
|
||||
while ((JERRY_CONTEXT (debugger_flags) & JERRY_DEBUGGER_CONNECTED)
|
||||
&& JERRY_CONTEXT (debugger_byte_code_free_tail) != ECMA_NULL_POINTER)
|
||||
{
|
||||
/* Wait until all byte code is freed or the connection is aborted. */
|
||||
jerry_debugger_receive (NULL);
|
||||
}
|
||||
#endif /* ENABLED (JERRY_DEBUGGER) */
|
||||
#endif /* JERRY_DEBUGGER */
|
||||
|
||||
if (JERRY_LIKELY (pressure == JMEM_PRESSURE_LOW))
|
||||
{
|
||||
#if ENABLED (JERRY_PROPRETY_HASHMAP)
|
||||
#if JERRY_PROPRETY_HASHMAP
|
||||
if (JERRY_CONTEXT (ecma_prop_hashmap_alloc_state) > ECMA_PROP_HASHMAP_ALLOC_ON)
|
||||
{
|
||||
--JERRY_CONTEXT (ecma_prop_hashmap_alloc_state);
|
||||
}
|
||||
JERRY_CONTEXT (status_flags) &= (uint32_t) ~ECMA_STATUS_HIGH_PRESSURE_GC;
|
||||
#endif /* ENABLED (JERRY_PROPRETY_HASHMAP) */
|
||||
#endif /* JERRY_PROPRETY_HASHMAP */
|
||||
/*
|
||||
* If there is enough newly allocated objects since last GC, probably it is worthwhile to start GC now.
|
||||
* Otherwise, probability to free sufficient space is considered to be low.
|
||||
@@ -2001,7 +2001,7 @@ ecma_free_unused_memory (jmem_pressure_t pressure) /**< current pressure */
|
||||
else if (pressure == JMEM_PRESSURE_HIGH)
|
||||
{
|
||||
/* Freeing as much memory as we currently can */
|
||||
#if ENABLED (JERRY_PROPRETY_HASHMAP)
|
||||
#if JERRY_PROPRETY_HASHMAP
|
||||
if (JERRY_CONTEXT (status_flags) & ECMA_STATUS_HIGH_PRESSURE_GC)
|
||||
{
|
||||
JERRY_CONTEXT (ecma_prop_hashmap_alloc_state) = ECMA_PROP_HASHMAP_ALLOC_MAX;
|
||||
@@ -2011,11 +2011,11 @@ ecma_free_unused_memory (jmem_pressure_t pressure) /**< current pressure */
|
||||
++JERRY_CONTEXT (ecma_prop_hashmap_alloc_state);
|
||||
JERRY_CONTEXT (status_flags) |= ECMA_STATUS_HIGH_PRESSURE_GC;
|
||||
}
|
||||
#endif /* ENABLED (JERRY_PROPRETY_HASHMAP) */
|
||||
#endif /* JERRY_PROPRETY_HASHMAP */
|
||||
|
||||
ecma_gc_run ();
|
||||
|
||||
#if ENABLED (JERRY_PROPRETY_HASHMAP)
|
||||
#if JERRY_PROPRETY_HASHMAP
|
||||
/* Free hashmaps of remaining objects. */
|
||||
jmem_cpointer_t obj_iter_cp = JERRY_CONTEXT (ecma_gc_objects_cp);
|
||||
|
||||
@@ -2049,7 +2049,7 @@ ecma_free_unused_memory (jmem_pressure_t pressure) /**< current pressure */
|
||||
|
||||
obj_iter_cp = obj_iter_p->gc_next_cp;
|
||||
}
|
||||
#endif /* ENABLED (JERRY_PROPRETY_HASHMAP) */
|
||||
#endif /* JERRY_PROPRETY_HASHMAP */
|
||||
|
||||
jmem_pools_collect_empty ();
|
||||
return;
|
||||
|
||||
@@ -67,9 +67,9 @@ typedef enum
|
||||
{
|
||||
ECMA_STATUS_API_AVAILABLE = (1u << 0), /**< api available */
|
||||
ECMA_STATUS_DIRECT_EVAL = (1u << 1), /**< eval is called directly */
|
||||
#if ENABLED (JERRY_PROPRETY_HASHMAP)
|
||||
#if JERRY_PROPRETY_HASHMAP
|
||||
ECMA_STATUS_HIGH_PRESSURE_GC = (1u << 2), /**< last gc was under high pressure */
|
||||
#endif /* ENABLED (JERRY_PROPRETY_HASHMAP) */
|
||||
#endif /* JERRY_PROPRETY_HASHMAP */
|
||||
ECMA_STATUS_EXCEPTION = (1u << 3), /**< last exception is a normal exception */
|
||||
ECMA_STATUS_ABORT = (1u << 4), /**< last exception is an abort */
|
||||
ECMA_STATUS_ERROR_UPDATE = (1u << 5), /**< the error_object_created_callback_p is called */
|
||||
@@ -92,12 +92,12 @@ typedef enum
|
||||
ECMA_TYPE___MAX = ECMA_TYPE_ERROR /** highest value for ecma types */
|
||||
} ecma_type_t;
|
||||
|
||||
#if ENABLED (JERRY_DEBUGGER)
|
||||
#if JERRY_DEBUGGER
|
||||
/**
|
||||
* Shift for scope chain index part in ecma_parse_opts
|
||||
*/
|
||||
#define ECMA_PARSE_CHAIN_INDEX_SHIFT 16
|
||||
#endif /* ENABLED (JERRY_DEBUGGER) */
|
||||
#endif /* JERRY_DEBUGGER */
|
||||
|
||||
/**
|
||||
* Option flags for parser_parse_script and internal flags for global_status_flags in parser context.
|
||||
@@ -126,9 +126,9 @@ typedef enum
|
||||
ECMA_PARSE_ASYNC_FUNCTION = (1u << 11), /**< async function is parsed */
|
||||
|
||||
/* These flags are internally used by the parser. */
|
||||
#if ENABLED (JERRY_ESNEXT)
|
||||
#if JERRY_ESNEXT
|
||||
ECMA_PARSE_INTERNAL_PRE_SCANNING = (1u << 12),
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
#ifndef JERRY_NDEBUG
|
||||
/**
|
||||
* This flag represents an error in for in/of statements, which cannot be set
|
||||
@@ -217,14 +217,14 @@ enum
|
||||
* or function call argument list */
|
||||
/* Other values */
|
||||
ECMA_VALUE_INITIALIZED = ECMA_MAKE_VALUE (12), /**< represents initialized mapped arguments formal parameter */
|
||||
#if ENABLED (JERRY_ESNEXT)
|
||||
#if JERRY_ESNEXT
|
||||
ECMA_VALUE_SYNC_ITERATOR = ECMA_MAKE_VALUE (13), /**< option for ecma_op_get_iterator: sync iterator is requested */
|
||||
ECMA_VALUE_ASYNC_ITERATOR = ECMA_MAKE_VALUE (14), /**< option for ecma_op_get_iterator: async iterator is requested */
|
||||
ECMA_VALUE_GLOBAL_THIS = ECMA_MAKE_VALUE (15), /**< globalThis built-in */
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
};
|
||||
|
||||
#if !ENABLED (JERRY_NUMBER_TYPE_FLOAT64)
|
||||
#if !JERRY_NUMBER_TYPE_FLOAT64
|
||||
/**
|
||||
* Maximum integer number for an ecma value
|
||||
*/
|
||||
@@ -233,7 +233,7 @@ enum
|
||||
* Maximum integer number for an ecma value (shifted left with ECMA_DIRECT_SHIFT)
|
||||
*/
|
||||
#define ECMA_INTEGER_NUMBER_MAX_SHIFTED 0x7fffff0
|
||||
#else /* ENABLED (JERRY_NUMBER_TYPE_FLOAT64) */
|
||||
#else /* JERRY_NUMBER_TYPE_FLOAT64 */
|
||||
/**
|
||||
* Maximum integer number for an ecma value
|
||||
*/
|
||||
@@ -242,9 +242,9 @@ enum
|
||||
* Maximum integer number for an ecma value (shifted left with ECMA_DIRECT_SHIFT)
|
||||
*/
|
||||
#define ECMA_INTEGER_NUMBER_MAX_SHIFTED 0x7ffffff0
|
||||
#endif /* !ENABLED (JERRY_NUMBER_TYPE_FLOAT64) */
|
||||
#endif /* !JERRY_NUMBER_TYPE_FLOAT64 */
|
||||
|
||||
#if !ENABLED (JERRY_NUMBER_TYPE_FLOAT64)
|
||||
#if !JERRY_NUMBER_TYPE_FLOAT64
|
||||
/**
|
||||
* Minimum integer number for an ecma value
|
||||
*/
|
||||
@@ -253,7 +253,7 @@ enum
|
||||
* Minimum integer number for an ecma value (shifted left with ECMA_DIRECT_SHIFT)
|
||||
*/
|
||||
#define ECMA_INTEGER_NUMBER_MIN_SHIFTED -0x7fffff0
|
||||
#else /* ENABLED (JERRY_NUMBER_TYPE_FLOAT64) */
|
||||
#else /* JERRY_NUMBER_TYPE_FLOAT64 */
|
||||
/**
|
||||
* Minimum integer number for an ecma value
|
||||
*/
|
||||
@@ -262,7 +262,7 @@ enum
|
||||
* Minimum integer number for an ecma value (shifted left with ECMA_DIRECT_SHIFT)
|
||||
*/
|
||||
#define ECMA_INTEGER_NUMBER_MIN_SHIFTED (-0x7fffffff - 1) /* -0x80000000 */
|
||||
#endif /* !ENABLED (JERRY_NUMBER_TYPE_FLOAT64) */
|
||||
#endif /* !JERRY_NUMBER_TYPE_FLOAT64 */
|
||||
|
||||
#if ECMA_DIRECT_SHIFT != 4
|
||||
#error "Please update ECMA_INTEGER_NUMBER_MIN/MAX_SHIFTED according to the new value of ECMA_DIRECT_SHIFT."
|
||||
@@ -277,11 +277,11 @@ enum
|
||||
/**
|
||||
* Maximum integer number, which if squared, still fits in ecma_integer_value_t
|
||||
*/
|
||||
#if !ENABLED (JERRY_NUMBER_TYPE_FLOAT64)
|
||||
#if !JERRY_NUMBER_TYPE_FLOAT64
|
||||
#define ECMA_INTEGER_MULTIPLY_MAX 0xb50
|
||||
#else /* ENABLED (JERRY_NUMBER_TYPE_FLOAT64) */
|
||||
#else /* JERRY_NUMBER_TYPE_FLOAT64 */
|
||||
#define ECMA_INTEGER_MULTIPLY_MAX 0x2d41
|
||||
#endif /* !ENABLED (JERRY_NUMBER_TYPE_FLOAT64) */
|
||||
#endif /* !JERRY_NUMBER_TYPE_FLOAT64 */
|
||||
|
||||
/**
|
||||
* Checks whether the error flag is set.
|
||||
@@ -325,7 +325,7 @@ typedef struct ecma_native_pointer_t
|
||||
struct ecma_native_pointer_t *next_p; /**< points to the next ecma_native_pointer_t element */
|
||||
} ecma_native_pointer_t;
|
||||
|
||||
#if ENABLED (JERRY_ESNEXT)
|
||||
#if JERRY_ESNEXT
|
||||
|
||||
/**
|
||||
* Representation for class constructor environment record.
|
||||
@@ -336,7 +336,7 @@ typedef struct
|
||||
ecma_value_t function_object; /**< function object */
|
||||
} ecma_environment_record_t;
|
||||
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
|
||||
/**
|
||||
* Property list:
|
||||
@@ -360,10 +360,10 @@ typedef enum
|
||||
* that are not indices */
|
||||
ECMA_LIST_ENUMERABLE = (1 << 1), /**< exclude non-enumerable properties */
|
||||
ECMA_LIST_PROTOTYPE = (1 << 2), /**< list properties from prototype chain */
|
||||
#if ENABLED (JERRY_ESNEXT)
|
||||
#if JERRY_ESNEXT
|
||||
ECMA_LIST_SYMBOLS = (1 << 3), /**< list symbol properties */
|
||||
ECMA_LIST_SYMBOLS_ONLY = (1 << 4), /**< list symbol properties only */
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
ECMA_LIST_CONVERT_FAST_ARRAYS = (1 << 5), /**< after listing the properties convert
|
||||
* the fast access mode array back to normal array */
|
||||
} ecma_list_properties_options_t;
|
||||
@@ -393,9 +393,9 @@ typedef enum
|
||||
ECMA_PROPERTY_FLAG_DELETED = 1u << 0, /**< property is deleted */
|
||||
ECMA_FAST_ARRAY_FLAG = 1u << 0, /**< array is fast array */
|
||||
ECMA_PROPERTY_FLAG_LCACHED = 1u << 1, /**< property is lcached */
|
||||
#if ENABLED (JERRY_ESNEXT)
|
||||
#if JERRY_ESNEXT
|
||||
ECMA_ARRAY_TEMPLATE_LITERAL = 1u << 1, /**< array is a template literal constructed by the parser */
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
ECMA_PROPERTY_FLAG_CONFIGURABLE = 1u << 2, /**< property is configurable */
|
||||
ECMA_PROPERTY_FLAG_ENUMERABLE = 1u << 3, /**< property is enumerable */
|
||||
ECMA_PROPERTY_FLAG_WRITABLE = 1u << 4, /**< property is writable */
|
||||
@@ -434,11 +434,11 @@ typedef enum
|
||||
/**
|
||||
* Default flag of length property.
|
||||
*/
|
||||
#if ENABLED (JERRY_ESNEXT)
|
||||
#if JERRY_ESNEXT
|
||||
#define ECMA_PROPERTY_FLAG_DEFAULT_LENGTH ECMA_PROPERTY_FLAG_CONFIGURABLE
|
||||
#else /* !ENABLED (JERRY_ESNEXT) */
|
||||
#else /* !JERRY_ESNEXT */
|
||||
#define ECMA_PROPERTY_FLAG_DEFAULT_LENGTH ECMA_PROPERTY_FIXED
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
|
||||
/**
|
||||
* Shift for property name part.
|
||||
@@ -499,16 +499,16 @@ typedef uint8_t ecma_property_t; /**< ecma_property_types_t (3 bit) and ecma_pro
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
#if ENABLED (JERRY_CPOINTER_32_BIT)
|
||||
#if JERRY_CPOINTER_32_BIT
|
||||
jmem_cpointer_t next_property_cp; /**< next cpointer */
|
||||
#endif /* ENABLED (JERRY_CPOINTER_32_BIT) */
|
||||
#endif /* JERRY_CPOINTER_32_BIT */
|
||||
ecma_property_t types[ECMA_PROPERTY_PAIR_ITEM_COUNT]; /**< two property type slot. The first represent
|
||||
* the type of this property (e.g. property pair) */
|
||||
#if ENABLED (JERRY_CPOINTER_32_BIT)
|
||||
#if JERRY_CPOINTER_32_BIT
|
||||
uint16_t padding; /**< an unused value */
|
||||
#else /* !ENABLED (JERRY_CPOINTER_32_BIT) */
|
||||
#else /* !JERRY_CPOINTER_32_BIT */
|
||||
jmem_cpointer_t next_property_cp; /**< next cpointer */
|
||||
#endif /* ENABLED (JERRY_CPOINTER_32_BIT) */
|
||||
#endif /* JERRY_CPOINTER_32_BIT */
|
||||
} ecma_property_header_t;
|
||||
|
||||
/**
|
||||
@@ -526,11 +526,11 @@ typedef struct
|
||||
typedef union
|
||||
{
|
||||
ecma_value_t value; /**< value of a property */
|
||||
#if ENABLED (JERRY_CPOINTER_32_BIT)
|
||||
#if JERRY_CPOINTER_32_BIT
|
||||
jmem_cpointer_t getter_setter_pair_cp; /**< cpointer to getter setter pair */
|
||||
#else /* !ENABLED (JERRY_CPOINTER_32_BIT) */
|
||||
#else /* !JERRY_CPOINTER_32_BIT */
|
||||
ecma_getter_setter_pointers_t getter_setter_pair; /**< getter setter pair */
|
||||
#endif /* ENABLED (JERRY_CPOINTER_32_BIT) */
|
||||
#endif /* JERRY_CPOINTER_32_BIT */
|
||||
} ecma_property_value_t;
|
||||
|
||||
/**
|
||||
@@ -707,7 +707,7 @@ typedef enum
|
||||
ECMA_LEXICAL_ENVIRONMENT_TYPE__MAX = ECMA_LEXICAL_ENVIRONMENT_HOME_OBJECT_BOUND /**< maximum value */
|
||||
} ecma_lexical_environment_type_t;
|
||||
|
||||
#if ENABLED (JERRY_ESNEXT)
|
||||
#if JERRY_ESNEXT
|
||||
|
||||
/**
|
||||
* Types of array iterators.
|
||||
@@ -720,7 +720,7 @@ typedef enum
|
||||
ECMA_ITERATOR__COUNT, /**< number of iterator kinds */
|
||||
} ecma_iterator_kind_t;
|
||||
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
|
||||
/**
|
||||
* Offset for JERRY_CONTEXT (status_flags) top 8 bits.
|
||||
@@ -783,7 +783,7 @@ typedef enum
|
||||
*/
|
||||
#define ECMA_OBJECT_REF_ONE (1u << ECMA_OBJECT_REF_SHIFT)
|
||||
|
||||
#if ENABLED (JERRY_CPOINTER_32_BIT)
|
||||
#if JERRY_CPOINTER_32_BIT
|
||||
|
||||
/**
|
||||
* Bitmask for an ecma-object reference count field
|
||||
@@ -795,7 +795,7 @@ typedef enum
|
||||
*/
|
||||
typedef uint32_t ecma_object_descriptor_t;
|
||||
|
||||
#else /* !ENABLED (JERRY_CPOINTER_32_BIT) */
|
||||
#else /* !JERRY_CPOINTER_32_BIT */
|
||||
|
||||
/**
|
||||
* Bitmask for an ecma-object reference count field
|
||||
@@ -807,7 +807,7 @@ typedef uint32_t ecma_object_descriptor_t;
|
||||
*/
|
||||
typedef uint16_t ecma_object_descriptor_t;
|
||||
|
||||
#endif /* ENABLED (JERRY_CPOINTER_32_BIT) */
|
||||
#endif /* JERRY_CPOINTER_32_BIT */
|
||||
|
||||
/**
|
||||
* Represents non-visited white object
|
||||
@@ -872,28 +872,28 @@ typedef struct
|
||||
uint8_t routine_flags; /**< flags for built-in routines */
|
||||
} u2;
|
||||
|
||||
#if ENABLED (JERRY_BUILTIN_REALMS)
|
||||
#if JERRY_BUILTIN_REALMS
|
||||
ecma_value_t realm_value; /**< realm value */
|
||||
#else /* !ENABLED (JERRY_BUILTIN_REALMS) */
|
||||
#else /* !JERRY_BUILTIN_REALMS */
|
||||
uint32_t continue_instantiated_bitset[1]; /**< bit set for instantiated properties */
|
||||
#endif /* ENABLED (JERRY_BUILTIN_REALMS) */
|
||||
#endif /* JERRY_BUILTIN_REALMS */
|
||||
} ecma_built_in_props_t;
|
||||
|
||||
#if ENABLED (JERRY_BUILTIN_REALMS)
|
||||
#if JERRY_BUILTIN_REALMS
|
||||
|
||||
/**
|
||||
* Number of bits available in the instantiated bitset without allocation
|
||||
*/
|
||||
#define ECMA_BUILTIN_INSTANTIATED_BITSET_MIN_SIZE (8)
|
||||
|
||||
#else /* !ENABLED (JERRY_BUILTIN_REALMS) */
|
||||
#else /* !JERRY_BUILTIN_REALMS */
|
||||
|
||||
/**
|
||||
* Number of bits available in the instantiated bitset without allocation
|
||||
*/
|
||||
#define ECMA_BUILTIN_INSTANTIATED_BITSET_MIN_SIZE (8 + 32)
|
||||
|
||||
#endif /* ENABLED (JERRY_BUILTIN_REALMS) */
|
||||
#endif /* JERRY_BUILTIN_REALMS */
|
||||
|
||||
/**
|
||||
* Builtin routine function object status flags
|
||||
@@ -1025,9 +1025,9 @@ typedef struct
|
||||
typedef struct
|
||||
{
|
||||
ecma_extended_object_t extended_object; /**< extended object part */
|
||||
#if ENABLED (JERRY_BUILTIN_REALMS)
|
||||
#if JERRY_BUILTIN_REALMS
|
||||
ecma_value_t realm_value; /**< realm value */
|
||||
#endif /* ENABLED (JERRY_BUILTIN_REALMS) */
|
||||
#endif /* JERRY_BUILTIN_REALMS */
|
||||
ecma_native_handler_t native_handler_cb; /**< external function */
|
||||
} ecma_native_function_t;
|
||||
|
||||
@@ -1063,12 +1063,12 @@ typedef struct
|
||||
typedef struct
|
||||
{
|
||||
ecma_extended_object_t header; /**< extended object header */
|
||||
#if ENABLED (JERRY_ESNEXT)
|
||||
#if JERRY_ESNEXT
|
||||
ecma_value_t target_length; /**< length of target function */
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
} ecma_bound_function_t;
|
||||
|
||||
#if ENABLED (JERRY_SNAPSHOT_EXEC)
|
||||
#if JERRY_SNAPSHOT_EXEC
|
||||
|
||||
/**
|
||||
* Description of static function objects.
|
||||
@@ -1079,9 +1079,9 @@ typedef struct
|
||||
const ecma_compiled_code_t *bytecode_p; /**< real byte code pointer */
|
||||
} ecma_static_function_t;
|
||||
|
||||
#endif /* ENABLED (JERRY_SNAPSHOT_EXEC) */
|
||||
#endif /* JERRY_SNAPSHOT_EXEC */
|
||||
|
||||
#if ENABLED (JERRY_ESNEXT)
|
||||
#if JERRY_ESNEXT
|
||||
/**
|
||||
* Flags for runnable objects.
|
||||
*/
|
||||
@@ -1101,7 +1101,7 @@ typedef struct
|
||||
ecma_value_t new_target; /**< value of new.target */
|
||||
} ecma_arrow_function_t;
|
||||
|
||||
#if ENABLED (JERRY_SNAPSHOT_EXEC)
|
||||
#if JERRY_SNAPSHOT_EXEC
|
||||
|
||||
/**
|
||||
* Description of static arrow function objects.
|
||||
@@ -1112,11 +1112,11 @@ typedef struct
|
||||
const ecma_compiled_code_t *bytecode_p;
|
||||
} ecma_static_arrow_function_t;
|
||||
|
||||
#endif /* ENABLED (JERRY_SNAPSHOT_EXEC) */
|
||||
#endif /* JERRY_SNAPSHOT_EXEC */
|
||||
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
|
||||
#if ENABLED (JERRY_BUILTIN_CONTAINER)
|
||||
#if JERRY_BUILTIN_CONTAINER
|
||||
/**
|
||||
* Flags for container objects
|
||||
*/
|
||||
@@ -1169,7 +1169,7 @@ typedef struct
|
||||
#define ECMA_CONTAINER_START(collection_p) \
|
||||
(collection_p->buffer_p + 1)
|
||||
|
||||
#endif /* ENABLED (JERRY_BUILTIN_CONTAINER) */
|
||||
#endif /* JERRY_BUILTIN_CONTAINER */
|
||||
|
||||
typedef enum
|
||||
{
|
||||
@@ -1242,7 +1242,7 @@ typedef struct
|
||||
*/
|
||||
#define ECMA_IS_THROW ((uint8_t) ECMA_PROP_IS_THROW)
|
||||
|
||||
#if !ENABLED (JERRY_NUMBER_TYPE_FLOAT64)
|
||||
#if !JERRY_NUMBER_TYPE_FLOAT64
|
||||
/**
|
||||
* Description of an ecma-number
|
||||
*/
|
||||
@@ -1287,7 +1287,7 @@ typedef union
|
||||
* IEEE-754 2008, 3.6, Table 3.5
|
||||
*/
|
||||
#define ECMA_NUMBER_FRACTION_WIDTH (23)
|
||||
#elif ENABLED (JERRY_NUMBER_TYPE_FLOAT64)
|
||||
#elif JERRY_NUMBER_TYPE_FLOAT64
|
||||
/**
|
||||
* Description of an ecma-number
|
||||
*/
|
||||
@@ -1332,7 +1332,7 @@ typedef union
|
||||
* IEEE-754 2008, 3.6, Table 3.5
|
||||
*/
|
||||
#define ECMA_NUMBER_FRACTION_WIDTH (52)
|
||||
#endif /* !ENABLED (JERRY_NUMBER_TYPE_FLOAT64) */
|
||||
#endif /* !JERRY_NUMBER_TYPE_FLOAT64 */
|
||||
|
||||
/**
|
||||
* Value '0' of ecma_number_t
|
||||
@@ -1359,7 +1359,7 @@ typedef union
|
||||
*/
|
||||
#define ECMA_NUMBER_MINUS_ONE ((ecma_number_t) -1)
|
||||
|
||||
#if !ENABLED (JERRY_NUMBER_TYPE_FLOAT64)
|
||||
#if !JERRY_NUMBER_TYPE_FLOAT64
|
||||
/**
|
||||
* Number.MIN_VALUE (i.e., the smallest positive value of ecma-number)
|
||||
*
|
||||
@@ -1392,7 +1392,7 @@ typedef union
|
||||
* See also: ECMA_262 v6, 20.1.2.8
|
||||
*/
|
||||
# define ECMA_NUMBER_MIN_SAFE_INTEGER ((ecma_number_t) -0xFFFFFF)
|
||||
#elif ENABLED (JERRY_NUMBER_TYPE_FLOAT64)
|
||||
#elif JERRY_NUMBER_TYPE_FLOAT64
|
||||
/**
|
||||
* Number.MAX_VALUE (i.e., the maximum value of ecma-number)
|
||||
*
|
||||
@@ -1427,7 +1427,7 @@ typedef union
|
||||
* See also: ECMA_262 v6, 20.1.2.8
|
||||
*/
|
||||
# define ECMA_NUMBER_MIN_SAFE_INTEGER ((ecma_number_t) -0x1FFFFFFFFFFFFF)
|
||||
#endif /* !ENABLED (JERRY_NUMBER_TYPE_FLOAT64) */
|
||||
#endif /* !JERRY_NUMBER_TYPE_FLOAT64 */
|
||||
|
||||
/**
|
||||
* Euler number
|
||||
@@ -1541,11 +1541,11 @@ typedef enum
|
||||
* Maximum value of the immediate part of a direct magic string.
|
||||
* Must be compatible with the immediate property name.
|
||||
*/
|
||||
#if ENABLED (JERRY_CPOINTER_32_BIT)
|
||||
#if JERRY_CPOINTER_32_BIT
|
||||
#define ECMA_DIRECT_STRING_MAX_IMM 0x07ffffff
|
||||
#else /* !ENABLED (JERRY_CPOINTER_32_BIT) */
|
||||
#else /* !JERRY_CPOINTER_32_BIT */
|
||||
#define ECMA_DIRECT_STRING_MAX_IMM 0x0000ffff
|
||||
#endif /* ENABLED (JERRY_CPOINTER_32_BIT) */
|
||||
#endif /* JERRY_CPOINTER_32_BIT */
|
||||
|
||||
/**
|
||||
* Shift for direct string value part in ecma_value_t.
|
||||
@@ -1843,7 +1843,7 @@ typedef struct
|
||||
*/
|
||||
#define ECMA_EXTENDED_PRIMITIVE_MAX_REF (UINT32_MAX - (ECMA_EXTENDED_PRIMITIVE_REF_ONE - 1))
|
||||
|
||||
#if ENABLED (JERRY_PROPRETY_HASHMAP)
|
||||
#if JERRY_PROPRETY_HASHMAP
|
||||
|
||||
/**
|
||||
* The lowest state of the ecma_prop_hashmap_alloc_state counter.
|
||||
@@ -1857,7 +1857,7 @@ typedef struct
|
||||
*/
|
||||
#define ECMA_PROP_HASHMAP_ALLOC_MAX 4
|
||||
|
||||
#endif /* ENABLED (JERRY_PROPRETY_HASHMAP) */
|
||||
#endif /* JERRY_PROPRETY_HASHMAP */
|
||||
|
||||
/**
|
||||
* Number of values in a literal storage item
|
||||
@@ -1873,15 +1873,15 @@ typedef struct
|
||||
jmem_cpointer_t values[ECMA_LIT_STORAGE_VALUE_COUNT]; /**< list of values */
|
||||
} ecma_lit_storage_item_t;
|
||||
|
||||
#if ENABLED (JERRY_LCACHE)
|
||||
#if JERRY_LCACHE
|
||||
/**
|
||||
* Container of an LCache entry identifier
|
||||
*/
|
||||
#if ENABLED (JERRY_CPOINTER_32_BIT)
|
||||
#if JERRY_CPOINTER_32_BIT
|
||||
typedef uint64_t ecma_lcache_hash_entry_id_t;
|
||||
#else /* !ENABLED (JERRY_CPOINTER_32_BIT) */
|
||||
#else /* !JERRY_CPOINTER_32_BIT */
|
||||
typedef uint32_t ecma_lcache_hash_entry_id_t;
|
||||
#endif /* ENABLED (JERRY_CPOINTER_32_BIT) */
|
||||
#endif /* JERRY_CPOINTER_32_BIT */
|
||||
|
||||
/**
|
||||
* Entry of LCache hash table
|
||||
@@ -1905,9 +1905,9 @@ typedef struct
|
||||
*/
|
||||
#define ECMA_LCACHE_HASH_ROW_LENGTH 2
|
||||
|
||||
#endif /* ENABLED (JERRY_LCACHE) */
|
||||
#endif /* JERRY_LCACHE */
|
||||
|
||||
#if ENABLED (JERRY_BUILTIN_TYPEDARRAY)
|
||||
#if JERRY_BUILTIN_TYPEDARRAY
|
||||
|
||||
/**
|
||||
* Function callback descriptor of a %TypedArray% object getter
|
||||
@@ -1998,17 +1998,17 @@ typedef struct
|
||||
uint8_t element_size; /**< element size based on [[TypedArrayName]] in Table 49 */
|
||||
} ecma_typedarray_info_t;
|
||||
|
||||
#if ENABLED (JERRY_BUILTIN_BIGINT)
|
||||
#if JERRY_BUILTIN_BIGINT
|
||||
/**
|
||||
* Checks whether a given typedarray is BigInt type or not.
|
||||
**/
|
||||
#define ECMA_TYPEDARRAY_IS_BIGINT_TYPE(id) \
|
||||
((id) >= ECMA_BIGINT64_ARRAY)
|
||||
|
||||
#endif /* ENABLED (JERRY_BUILTIN_BIGINT) */
|
||||
#endif /* ENABLED (JERRY_BUILTIN_TYPEDARRAY) */
|
||||
#endif /* JERRY_BUILTIN_BIGINT */
|
||||
#endif /* JERRY_BUILTIN_TYPEDARRAY */
|
||||
|
||||
#if ENABLED (JERRY_ESNEXT)
|
||||
#if JERRY_ESNEXT
|
||||
|
||||
/**
|
||||
* Executable (e.g. generator, async) object flags.
|
||||
@@ -2113,9 +2113,9 @@ typedef struct
|
||||
* real index + 1 in the [[Values]] list - otherwise */
|
||||
} ecma_promise_all_executor_t;
|
||||
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
|
||||
#if ENABLED (JERRY_BUILTIN_DATAVIEW)
|
||||
#if JERRY_BUILTIN_DATAVIEW
|
||||
/**
|
||||
* Description of DataView objects.
|
||||
*/
|
||||
@@ -2125,7 +2125,7 @@ typedef struct
|
||||
ecma_object_t *buffer_p; /**< [[ViewedArrayBuffer]] internal slot */
|
||||
uint32_t byte_offset; /**< [[ByteOffset]] internal slot */
|
||||
} ecma_dataview_object_t;
|
||||
#endif /* ENABLED (JERRY_BUILTIN_DATAVIEW) */
|
||||
#endif /* JERRY_BUILTIN_DATAVIEW */
|
||||
|
||||
/**
|
||||
* Flag for indicating whether the symbol is a well known symbol
|
||||
@@ -2175,7 +2175,7 @@ do \
|
||||
*/
|
||||
#define ECMA_PROPERTY_POINTER_ERROR ((ecma_property_t *) 0x01)
|
||||
|
||||
#if ENABLED (JERRY_BUILTIN_PROXY)
|
||||
#if JERRY_BUILTIN_PROXY
|
||||
|
||||
/**
|
||||
* Proxy object flags.
|
||||
@@ -2210,25 +2210,25 @@ typedef struct
|
||||
ecma_extended_object_t header; /**< header part */
|
||||
ecma_value_t proxy; /**< [[RevocableProxy]] internal slot */
|
||||
} ecma_revocable_proxy_object_t;
|
||||
#endif /* ENABLED (JERRY_BUILTIN_PROXY) */
|
||||
#endif /* JERRY_BUILTIN_PROXY */
|
||||
|
||||
#if ENABLED (JERRY_ESNEXT)
|
||||
#if JERRY_ESNEXT
|
||||
/**
|
||||
* Type to repesent the maximum property index
|
||||
*
|
||||
* For ES6+ the maximum valid property index is 2**53 - 1
|
||||
*/
|
||||
typedef uint64_t ecma_length_t;
|
||||
#else /* !ENABLED (JERRY_ESNEXT) */
|
||||
#else /* !JERRY_ESNEXT */
|
||||
/**
|
||||
* Type to repesent the maximum property index
|
||||
*
|
||||
* For ES5+ the maximum valid property index is 2**32 - 1
|
||||
*/
|
||||
typedef uint32_t ecma_length_t;
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
|
||||
#if ENABLED (JERRY_BUILTIN_BIGINT)
|
||||
#if JERRY_BUILTIN_BIGINT
|
||||
|
||||
/**
|
||||
* BigUInt data is a sequence of uint32_t numbers.
|
||||
@@ -2258,7 +2258,7 @@ typedef uint32_t ecma_bigint_digit_t;
|
||||
#define ECMA_BIGINT_GET_BYTE_SIZE(size) \
|
||||
(size_t) (((size) + sizeof (ecma_bigint_digit_t)) & ~(2 * sizeof (ecma_bigint_digit_t) - 1))
|
||||
|
||||
#endif /* ENABLED (JERRY_BUILTIN_BIGINT) */
|
||||
#endif /* JERRY_BUILTIN_BIGINT */
|
||||
|
||||
/**
|
||||
* Struct for counting the different types properties in objects
|
||||
@@ -2305,9 +2305,9 @@ typedef struct
|
||||
union
|
||||
{
|
||||
ecma_value_t byte_code; /**< callee's compiled code */
|
||||
#if ENABLED (JERRY_SNAPSHOT_EXEC)
|
||||
#if JERRY_SNAPSHOT_EXEC
|
||||
ecma_compiled_code_t *byte_code_p; /**< real byte code pointer */
|
||||
#endif /* ENABLED (JERRY_SNAPSHOT_EXEC) */
|
||||
#endif /* JERRY_SNAPSHOT_EXEC */
|
||||
} u;
|
||||
} ecma_mapped_arguments_t;
|
||||
|
||||
|
||||
@@ -79,7 +79,7 @@ ecma_collection_free_objects (ecma_collection_t *collection_p) /**< value collec
|
||||
ecma_collection_destroy (collection_p);
|
||||
} /* ecma_collection_free_objects */
|
||||
|
||||
#if ENABLED (JERRY_ESNEXT)
|
||||
#if JERRY_ESNEXT
|
||||
|
||||
/**
|
||||
* Free the template literal objects and deallocate the collection
|
||||
@@ -117,7 +117,7 @@ ecma_collection_free_template_literal (ecma_collection_t *collection_p) /**< val
|
||||
ecma_collection_destroy (collection_p);
|
||||
} /* ecma_collection_free_template_literal */
|
||||
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
|
||||
/**
|
||||
* Free the non-object collection elements and deallocate the collection
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
* @{
|
||||
*/
|
||||
|
||||
#if ENABLED (JERRY_NUMBER_TYPE_FLOAT64)
|
||||
#if JERRY_NUMBER_TYPE_FLOAT64
|
||||
|
||||
/**
|
||||
* \addtogroup ecmahelpersbigintegers Helpers for operations intermediate 128-bit integers
|
||||
@@ -262,7 +262,7 @@ static const uint8_t ecma_uint4_clz[] = { 4, 3, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0, 0,
|
||||
*/
|
||||
#define NUMBER_MIN_DECIMAL_EXPONENT -324
|
||||
|
||||
#elif !ENABLED (JERRY_NUMBER_TYPE_FLOAT64)
|
||||
#elif !JERRY_NUMBER_TYPE_FLOAT64
|
||||
|
||||
/**
|
||||
* Number.MAX_VALUE exponent part when using 32 bit float representation.
|
||||
@@ -273,7 +273,7 @@ static const uint8_t ecma_uint4_clz[] = { 4, 3, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0, 0,
|
||||
*/
|
||||
#define NUMBER_MIN_DECIMAL_EXPONENT -45
|
||||
|
||||
#endif /* ENABLED (JERRY_NUMBER_TYPE_FLOAT64) */
|
||||
#endif /* JERRY_NUMBER_TYPE_FLOAT64 */
|
||||
|
||||
/**
|
||||
* Value of epsilon
|
||||
@@ -295,15 +295,15 @@ ecma_utf8_string_to_number_by_radix (const lit_utf8_byte_t *str_p, /**< utf-8 st
|
||||
const lit_utf8_byte_t *end_p, /**< end of utf-8 string */
|
||||
uint32_t radix) /**< radix */
|
||||
{
|
||||
#if ENABLED (JERRY_ESNEXT)
|
||||
#if JERRY_ESNEXT
|
||||
bool allow_underscore = (radix & ECMA_CONVERSION_ALLOW_UNDERSCORE);
|
||||
radix &= (uint32_t) ~ECMA_CONVERSION_ALLOW_UNDERSCORE;
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
JERRY_ASSERT (radix == 2 || radix == 8 || radix == 16);
|
||||
|
||||
ecma_number_t num = ECMA_NUMBER_ZERO;
|
||||
|
||||
#if ENABLED (JERRY_ESNEXT)
|
||||
#if JERRY_ESNEXT
|
||||
if (radix <= 8)
|
||||
{
|
||||
lit_code_point_t upper_limit = LIT_CHAR_0 + radix;
|
||||
@@ -326,7 +326,7 @@ ecma_utf8_string_to_number_by_radix (const lit_utf8_byte_t *str_p, /**< utf-8 st
|
||||
|
||||
return num;
|
||||
}
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
|
||||
for (const lit_utf8_byte_t * iter_p = str_p; iter_p <= end_p; iter_p++)
|
||||
{
|
||||
@@ -347,12 +347,12 @@ ecma_utf8_string_to_number_by_radix (const lit_utf8_byte_t *str_p, /**< utf-8 st
|
||||
{
|
||||
digit_value = 10 + (*iter_p - LIT_CHAR_UPPERCASE_A);
|
||||
}
|
||||
#if ENABLED (JERRY_ESNEXT)
|
||||
#if JERRY_ESNEXT
|
||||
else if (*iter_p == LIT_CHAR_UNDERSCORE && allow_underscore)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
else
|
||||
{
|
||||
return ecma_number_make_nan ();
|
||||
@@ -461,13 +461,13 @@ ecma_utf8_string_to_number (const lit_utf8_byte_t *str_p, /**< utf-8 string */
|
||||
digit_seen = true;
|
||||
digit_value = (*str_p - LIT_CHAR_0);
|
||||
}
|
||||
#if ENABLED (JERRY_ESNEXT)
|
||||
#if JERRY_ESNEXT
|
||||
else if (*str_p == LIT_CHAR_UNDERSCORE && (options & ECMA_CONVERSION_ALLOW_UNDERSCORE))
|
||||
{
|
||||
str_p++;
|
||||
continue;
|
||||
}
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
else
|
||||
{
|
||||
break;
|
||||
@@ -574,13 +574,13 @@ ecma_utf8_string_to_number (const lit_utf8_byte_t *str_p, /**< utf-8 string */
|
||||
{
|
||||
digit_value = (*str_p - LIT_CHAR_0);
|
||||
}
|
||||
#if ENABLED (JERRY_ESNEXT)
|
||||
#if JERRY_ESNEXT
|
||||
else if (*str_p == LIT_CHAR_UNDERSCORE && (options & ECMA_CONVERSION_ALLOW_UNDERSCORE))
|
||||
{
|
||||
str_p++;
|
||||
continue;
|
||||
}
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
else
|
||||
{
|
||||
return ecma_number_make_nan ();
|
||||
@@ -636,7 +636,7 @@ ecma_utf8_string_to_number (const lit_utf8_byte_t *str_p, /**< utf-8 string */
|
||||
return sign ? -ECMA_NUMBER_ZERO : ECMA_NUMBER_ZERO;
|
||||
}
|
||||
|
||||
#if ENABLED (JERRY_NUMBER_TYPE_FLOAT64)
|
||||
#if JERRY_NUMBER_TYPE_FLOAT64
|
||||
/*
|
||||
* 128-bit mantissa storage
|
||||
*
|
||||
@@ -721,7 +721,7 @@ ecma_utf8_string_to_number (const lit_utf8_byte_t *str_p, /**< utf-8 string */
|
||||
fraction_uint64 = ecma_round_high_to_uint64 (&fraction_uint128);
|
||||
|
||||
return ecma_number_make_from_sign_mantissa_and_exponent (sign, fraction_uint64, binary_exponent);
|
||||
#elif !ENABLED (JERRY_NUMBER_TYPE_FLOAT64)
|
||||
#elif !JERRY_NUMBER_TYPE_FLOAT64
|
||||
/* Less precise conversion */
|
||||
ecma_number_t num = (ecma_number_t) (uint32_t) fraction_uint64;
|
||||
|
||||
@@ -739,7 +739,7 @@ ecma_utf8_string_to_number (const lit_utf8_byte_t *str_p, /**< utf-8 string */
|
||||
}
|
||||
|
||||
return num;
|
||||
#endif /* ENABLED (JERRY_NUMBER_TYPE_FLOAT64) */
|
||||
#endif /* JERRY_NUMBER_TYPE_FLOAT64 */
|
||||
} /* ecma_utf8_string_to_number */
|
||||
|
||||
/**
|
||||
|
||||
@@ -39,7 +39,7 @@ JERRY_STATIC_ASSERT (((1 << (ECMA_DIRECT_SHIFT - 1)) | ECMA_TYPE_DIRECT) == ECMA
|
||||
#define ECMA_NUMBER_SIGN_POS (ECMA_NUMBER_FRACTION_WIDTH + \
|
||||
ECMA_NUMBER_BIASED_EXP_WIDTH)
|
||||
|
||||
#if !ENABLED (JERRY_NUMBER_TYPE_FLOAT64)
|
||||
#if !JERRY_NUMBER_TYPE_FLOAT64
|
||||
JERRY_STATIC_ASSERT (sizeof (ecma_number_t) == sizeof (uint32_t),
|
||||
size_of_ecma_number_t_must_be_equal_to_4_bytes);
|
||||
|
||||
@@ -102,7 +102,7 @@ ecma_number_unpack (ecma_number_t num, /**< ecma-number */
|
||||
*/
|
||||
const int32_t ecma_number_exponent_bias = 127;
|
||||
|
||||
#elif ENABLED (JERRY_NUMBER_TYPE_FLOAT64)
|
||||
#elif JERRY_NUMBER_TYPE_FLOAT64
|
||||
JERRY_STATIC_ASSERT (sizeof (ecma_number_t) == sizeof (uint64_t),
|
||||
size_of_ecma_number_t_must_be_equal_to_8_bytes);
|
||||
|
||||
@@ -165,7 +165,7 @@ ecma_number_unpack (ecma_number_t num, /**< ecma-number */
|
||||
*/
|
||||
const int32_t ecma_number_exponent_bias = 1023;
|
||||
|
||||
#endif /* ENABLED (JERRY_NUMBER_TYPE_FLOAT64) */
|
||||
#endif /* JERRY_NUMBER_TYPE_FLOAT64 */
|
||||
|
||||
/**
|
||||
* Get fraction of number
|
||||
@@ -248,11 +248,11 @@ ecma_number_make_nan (void)
|
||||
{
|
||||
/* IEEE754 QNaN = sign bit: 0, exponent: all 1 bits, fraction: 1....0 */
|
||||
ecma_number_accessor_t f;
|
||||
#if ENABLED (JERRY_NUMBER_TYPE_FLOAT64)
|
||||
#if JERRY_NUMBER_TYPE_FLOAT64
|
||||
f.as_uint64_t = 0x7ff8000000000000ull; /* double QNaN, same as the C99 nan("") returns. */
|
||||
#else /* !ENABLED (JERRY_NUMBER_TYPE_FLOAT64) */
|
||||
#else /* !JERRY_NUMBER_TYPE_FLOAT64 */
|
||||
f.as_uint32_t = 0x7fc00000u; /* float QNaN, same as the C99 nanf("") returns. */
|
||||
#endif /* ENABLED (JERRY_NUMBER_TYPE_FLOAT64) */
|
||||
#endif /* JERRY_NUMBER_TYPE_FLOAT64 */
|
||||
return f.as_ecma_number_t;
|
||||
} /* ecma_number_make_nan */
|
||||
|
||||
@@ -268,11 +268,11 @@ ecma_number_make_infinity (bool sign) /**< true - for negative Infinity,
|
||||
{
|
||||
/* IEEE754 INF = sign bit: sign, exponent: all 1 bits, fraction: 0....0 */
|
||||
ecma_number_accessor_t f;
|
||||
#if ENABLED (JERRY_NUMBER_TYPE_FLOAT64)
|
||||
#if JERRY_NUMBER_TYPE_FLOAT64
|
||||
f.as_uint64_t = sign ? 0xfff0000000000000ull : 0x7ff0000000000000ull;
|
||||
#else /* !ENABLED (JERRY_NUMBER_TYPE_FLOAT64) */
|
||||
#else /* !JERRY_NUMBER_TYPE_FLOAT64 */
|
||||
f.as_uint32_t = sign ? 0xff800000u : 0x7f800000u;
|
||||
#endif /* ENABLED (JERRY_NUMBER_TYPE_FLOAT64) */
|
||||
#endif /* JERRY_NUMBER_TYPE_FLOAT64 */
|
||||
return f.as_ecma_number_t;
|
||||
} /* ecma_number_make_infinity */
|
||||
|
||||
|
||||
@@ -206,7 +206,7 @@ ecma_new_ecma_string_from_magic_string_ex_id (lit_magic_string_ex_id_t id) /**<
|
||||
return string_desc_p;
|
||||
} /* ecma_new_ecma_string_from_magic_string_ex_id */
|
||||
|
||||
#if ENABLED (JERRY_ESNEXT)
|
||||
#if JERRY_ESNEXT
|
||||
/**
|
||||
* Allocate new ecma-string and fill it with reference to the symbol descriptor
|
||||
*
|
||||
@@ -243,7 +243,7 @@ ecma_prop_name_is_symbol (ecma_string_t *string_p) /**< ecma-string */
|
||||
return (!ECMA_IS_DIRECT_STRING (string_p)
|
||||
&& ECMA_STRING_GET_CONTAINER (string_p) == ECMA_STRING_CONTAINER_SYMBOL);
|
||||
} /* ecma_prop_name_is_symbol */
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
|
||||
/**
|
||||
* Allocate new UTF8 ecma-string and fill it with characters from the given utf8 buffer
|
||||
@@ -510,7 +510,7 @@ ecma_new_ecma_string_from_code_unit (ecma_char_t code_unit) /**< code unit */
|
||||
return ecma_new_ecma_string_from_utf8 (lit_utf8_bytes, bytes_size);
|
||||
} /* ecma_new_ecma_string_from_code_unit */
|
||||
|
||||
#if ENABLED (JERRY_ESNEXT)
|
||||
#if JERRY_ESNEXT
|
||||
|
||||
/**
|
||||
* Allocate new ecma-string and fill it with cesu-8 character which represents specified code units
|
||||
@@ -528,7 +528,7 @@ ecma_new_ecma_string_from_code_units (ecma_char_t first_code_unit, /**< code uni
|
||||
return ecma_new_ecma_string_from_utf8 (lit_utf8_bytes, bytes_size);
|
||||
} /* ecma_new_ecma_string_from_code_units */
|
||||
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
|
||||
/**
|
||||
* Allocate new ecma-string and fill it with ecma-number
|
||||
@@ -563,14 +563,14 @@ ecma_new_ecma_string_from_length (ecma_length_t number) /**< property length */
|
||||
return (ecma_string_t *) ECMA_CREATE_DIRECT_STRING (ECMA_DIRECT_STRING_UINT, (uintptr_t) number);
|
||||
}
|
||||
|
||||
#if ENABLED (JERRY_ESNEXT)
|
||||
#if JERRY_ESNEXT
|
||||
JERRY_ASSERT ((ecma_number_t) number <= ECMA_NUMBER_MAX_SAFE_INTEGER);
|
||||
|
||||
if (JERRY_UNLIKELY (number > UINT32_MAX))
|
||||
{
|
||||
return ecma_new_ecma_string_from_number ((ecma_number_t) number);
|
||||
}
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
|
||||
return ecma_new_non_direct_string_from_uint32 ((uint32_t) number);
|
||||
} /* ecma_new_ecma_string_from_length */
|
||||
@@ -951,7 +951,7 @@ ecma_destroy_ecma_string (ecma_string_t *string_p) /**< ecma-string */
|
||||
ecma_dealloc_string_buffer (string_p, ECMA_ASCII_STRING_GET_SIZE (string_p) + ECMA_ASCII_STRING_HEADER_SIZE);
|
||||
return;
|
||||
}
|
||||
#if ENABLED (JERRY_ESNEXT)
|
||||
#if JERRY_ESNEXT
|
||||
case ECMA_STRING_CONTAINER_SYMBOL:
|
||||
{
|
||||
ecma_extended_string_t *symbol_p = (ecma_extended_string_t *) string_p;
|
||||
@@ -959,7 +959,7 @@ ecma_destroy_ecma_string (ecma_string_t *string_p) /**< ecma-string */
|
||||
ecma_dealloc_extended_string (symbol_p);
|
||||
return;
|
||||
}
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
default:
|
||||
{
|
||||
JERRY_ASSERT (ECMA_STRING_GET_CONTAINER (string_p) == ECMA_STRING_CONTAINER_UINT32_IN_DESC
|
||||
@@ -2553,7 +2553,7 @@ ecma_string_trim (const ecma_string_t *string_p) /**< pointer to an ecma string
|
||||
return ret_string_p;
|
||||
} /* ecma_string_trim */
|
||||
|
||||
#if ENABLED (JERRY_ESNEXT)
|
||||
#if JERRY_ESNEXT
|
||||
|
||||
/**
|
||||
* Pad the beginning or the end of string with parameter given in fill_string to the length of max_length.
|
||||
@@ -2624,16 +2624,14 @@ ecma_string_pad (ecma_value_t original_string_p, /**< Input ecma string */
|
||||
ecma_stringbuilder_append (&builder, filler_p);
|
||||
}
|
||||
|
||||
lit_utf8_size_t read_size;
|
||||
ecma_char_t ch;
|
||||
|
||||
uint32_t remaining = fill_len - (prepend_count * filler_length);
|
||||
|
||||
ECMA_STRING_TO_UTF8_STRING (filler_p, start_p, utf8_str_size);
|
||||
const lit_utf8_byte_t *temp_start_p = start_p;
|
||||
while (remaining > 0)
|
||||
{
|
||||
read_size = lit_read_code_unit_from_utf8 (temp_start_p, &ch);
|
||||
ecma_char_t ch;
|
||||
lit_utf8_size_t read_size = lit_read_code_unit_from_utf8 (temp_start_p, &ch);
|
||||
ecma_stringbuilder_append_char (&builder, ch);
|
||||
temp_start_p += read_size;
|
||||
remaining--;
|
||||
@@ -2649,7 +2647,7 @@ ecma_string_pad (ecma_value_t original_string_p, /**< Input ecma string */
|
||||
|
||||
return ecma_make_string_value (ecma_stringbuilder_finalize (&builder));
|
||||
} /* ecma_string_pad */
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
|
||||
/**
|
||||
* Create an empty string builder
|
||||
@@ -2662,9 +2660,9 @@ ecma_stringbuilder_create (void)
|
||||
const lit_utf8_size_t initial_size = ECMA_ASCII_STRING_HEADER_SIZE;
|
||||
ecma_stringbuilder_header_t *header_p = (ecma_stringbuilder_header_t *) jmem_heap_alloc_block (initial_size);
|
||||
header_p->current_size = initial_size;
|
||||
#if ENABLED (JERRY_MEM_STATS)
|
||||
#if JERRY_MEM_STATS
|
||||
jmem_stats_allocate_string_bytes (initial_size);
|
||||
#endif /* ENABLED (JERRY_MEM_STATS) */
|
||||
#endif /* JERRY_MEM_STATS */
|
||||
|
||||
ecma_stringbuilder_t ret = {.header_p = header_p};
|
||||
return ret;
|
||||
@@ -2683,9 +2681,9 @@ ecma_stringbuilder_create_from (ecma_string_t *string_p) /**< ecma string */
|
||||
|
||||
ecma_stringbuilder_header_t *header_p = (ecma_stringbuilder_header_t *) jmem_heap_alloc_block (initial_size);
|
||||
header_p->current_size = initial_size;
|
||||
#if ENABLED (JERRY_MEM_STATS)
|
||||
#if JERRY_MEM_STATS
|
||||
jmem_stats_allocate_string_bytes (initial_size);
|
||||
#endif /* ENABLED (JERRY_MEM_STATS) */
|
||||
#endif /* JERRY_MEM_STATS */
|
||||
|
||||
size_t copied_size = ecma_string_copy_to_cesu8_buffer (string_p,
|
||||
ECMA_STRINGBUILDER_STRING_PTR (header_p),
|
||||
@@ -2709,9 +2707,9 @@ ecma_stringbuilder_create_raw (const lit_utf8_byte_t *data_p, /**< pointer to da
|
||||
|
||||
ecma_stringbuilder_header_t *header_p = (ecma_stringbuilder_header_t *) jmem_heap_alloc_block (initial_size);
|
||||
header_p->current_size = initial_size;
|
||||
#if ENABLED (JERRY_MEM_STATS)
|
||||
#if JERRY_MEM_STATS
|
||||
jmem_stats_allocate_string_bytes (initial_size);
|
||||
#endif /* ENABLED (JERRY_MEM_STATS) */
|
||||
#endif /* JERRY_MEM_STATS */
|
||||
|
||||
memcpy (ECMA_STRINGBUILDER_STRING_PTR (header_p), data_p, data_size);
|
||||
|
||||
@@ -2736,9 +2734,9 @@ ecma_stringbuilder_grow (ecma_stringbuilder_t *builder_p, /**< string builder */
|
||||
header_p->current_size = new_size;
|
||||
builder_p->header_p = header_p;
|
||||
|
||||
#if ENABLED (JERRY_MEM_STATS)
|
||||
#if JERRY_MEM_STATS
|
||||
jmem_stats_allocate_string_bytes (required_size);
|
||||
#endif /* ENABLED (JERRY_MEM_STATS) */
|
||||
#endif /* JERRY_MEM_STATS */
|
||||
|
||||
return ((lit_utf8_byte_t *) header_p) + header_p->current_size - required_size;
|
||||
} /* ecma_stringbuilder_grow */
|
||||
@@ -2784,9 +2782,9 @@ ecma_stringbuilder_revert (ecma_stringbuilder_t *builder_p, /**< string builder
|
||||
const lit_utf8_size_t new_size = size + ECMA_ASCII_STRING_HEADER_SIZE;
|
||||
JERRY_ASSERT (new_size <= header_p->current_size);
|
||||
|
||||
#if ENABLED (JERRY_MEM_STATS)
|
||||
#if JERRY_MEM_STATS
|
||||
jmem_stats_free_string_bytes (header_p->current_size - new_size);
|
||||
#endif /* ENABLED (JERRY_MEM_STATS) */
|
||||
#endif /* JERRY_MEM_STATS */
|
||||
|
||||
header_p = jmem_heap_realloc_block (header_p, header_p->current_size, new_size);
|
||||
header_p->current_size = new_size;
|
||||
@@ -2925,9 +2923,9 @@ ecma_stringbuilder_finalize (ecma_stringbuilder_t *builder_p) /**< string builde
|
||||
ECMA_STRINGBUILDER_STRING_PTR (header_p),
|
||||
string_size);
|
||||
|
||||
#if ENABLED (JERRY_MEM_STATS)
|
||||
#if JERRY_MEM_STATS
|
||||
jmem_stats_allocate_string_bytes (container_size - ECMA_ASCII_STRING_HEADER_SIZE);
|
||||
#endif /* ENABLED (JERRY_MEM_STATS) */
|
||||
#endif /* JERRY_MEM_STATS */
|
||||
|
||||
if (JERRY_LIKELY (string_size <= UINT16_MAX))
|
||||
{
|
||||
@@ -2966,12 +2964,12 @@ ecma_stringbuilder_destroy (ecma_stringbuilder_t *builder_p) /**< string builder
|
||||
builder_p->header_p = NULL;
|
||||
#endif
|
||||
|
||||
#if ENABLED (JERRY_MEM_STATS)
|
||||
#if JERRY_MEM_STATS
|
||||
jmem_stats_free_string_bytes (size);
|
||||
#endif /* ENABLED (JERRY_MEM_STATS) */
|
||||
#endif /* JERRY_MEM_STATS */
|
||||
} /* ecma_stringbuilder_destroy */
|
||||
|
||||
#if ENABLED (JERRY_ESNEXT)
|
||||
#if JERRY_ESNEXT
|
||||
/**
|
||||
* AdvanceStringIndex operation
|
||||
*
|
||||
@@ -3018,7 +3016,7 @@ ecma_op_advance_string_index (ecma_string_t *str_p, /**< input string */
|
||||
|
||||
return next_index + 1;
|
||||
} /* ecma_op_advance_string_index */
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
|
||||
/**
|
||||
* @}
|
||||
|
||||
@@ -56,12 +56,12 @@ JERRY_STATIC_ASSERT ((ECMA_VALUE_FALSE | (1 << ECMA_DIRECT_SHIFT)) == ECMA_VALUE
|
||||
&& ECMA_VALUE_FALSE != ECMA_VALUE_TRUE,
|
||||
only_the_lowest_bit_must_be_different_for_simple_value_true_and_false);
|
||||
|
||||
#if ENABLED (JERRY_BUILTIN_BIGINT)
|
||||
#if JERRY_BUILTIN_BIGINT
|
||||
|
||||
JERRY_STATIC_ASSERT (ECMA_NULL_POINTER == (ECMA_BIGINT_ZERO & ~(ecma_value_t) ECMA_VALUE_TYPE_MASK),
|
||||
ecma_bigint_zero_must_be_encoded_as_null_pointer);
|
||||
|
||||
#endif /* ENABLED (JERRY_BUILTIN_BIGINT) */
|
||||
#endif /* JERRY_BUILTIN_BIGINT */
|
||||
|
||||
/** \addtogroup ecma ECMA
|
||||
* @{
|
||||
@@ -332,12 +332,12 @@ ecma_is_value_string (ecma_value_t value) /**< ecma value */
|
||||
extern inline bool JERRY_ATTR_CONST JERRY_ATTR_ALWAYS_INLINE
|
||||
ecma_is_value_symbol (ecma_value_t value) /**< ecma value */
|
||||
{
|
||||
#if ENABLED (JERRY_ESNEXT)
|
||||
#if JERRY_ESNEXT
|
||||
return (ecma_get_value_type_field (value) == ECMA_TYPE_SYMBOL);
|
||||
#else /* ENABLED (JERRY_ESNEXT) */
|
||||
#else /* JERRY_ESNEXT */
|
||||
JERRY_UNUSED (value);
|
||||
return false;
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
} /* ecma_is_value_symbol */
|
||||
|
||||
/**
|
||||
@@ -362,12 +362,12 @@ ecma_is_value_magic_string (ecma_value_t value, /**< ecma value */
|
||||
extern inline bool JERRY_ATTR_CONST JERRY_ATTR_ALWAYS_INLINE
|
||||
ecma_is_value_bigint (ecma_value_t value) /**< ecma value */
|
||||
{
|
||||
#if ENABLED (JERRY_BUILTIN_BIGINT)
|
||||
#if JERRY_BUILTIN_BIGINT
|
||||
return (ecma_get_value_type_field (value) == ECMA_TYPE_BIGINT);
|
||||
#else /* !ENABLED (JERRY_BUILTIN_BIGINT) */
|
||||
#else /* !JERRY_BUILTIN_BIGINT */
|
||||
JERRY_UNUSED (value);
|
||||
return false;
|
||||
#endif /* ENABLED (JERRY_BUILTIN_BIGINT) */
|
||||
#endif /* JERRY_BUILTIN_BIGINT */
|
||||
} /* ecma_is_value_bigint */
|
||||
|
||||
/**
|
||||
@@ -379,11 +379,11 @@ ecma_is_value_bigint (ecma_value_t value) /**< ecma value */
|
||||
extern inline bool JERRY_ATTR_CONST JERRY_ATTR_ALWAYS_INLINE
|
||||
ecma_is_value_prop_name (ecma_value_t value) /**< ecma value */
|
||||
{
|
||||
#if ENABLED (JERRY_ESNEXT)
|
||||
#if JERRY_ESNEXT
|
||||
return ecma_is_value_string (value) || ecma_is_value_symbol (value);
|
||||
#else /* !ENABLED (JERRY_ESNEXT) */
|
||||
#else /* !JERRY_ESNEXT */
|
||||
return ecma_is_value_string (value);
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
} /* ecma_is_value_prop_name */
|
||||
|
||||
/**
|
||||
@@ -472,7 +472,7 @@ ecma_is_value_array (ecma_value_t arg) /**< argument */
|
||||
return ECMA_VALUE_TRUE;
|
||||
}
|
||||
|
||||
#if ENABLED (JERRY_BUILTIN_PROXY)
|
||||
#if JERRY_BUILTIN_PROXY
|
||||
if (ECMA_OBJECT_IS_PROXY (arg_obj_p))
|
||||
{
|
||||
ecma_proxy_object_t *proxy_obj_p = (ecma_proxy_object_t *) arg_obj_p;
|
||||
@@ -484,7 +484,7 @@ ecma_is_value_array (ecma_value_t arg) /**< argument */
|
||||
|
||||
return ecma_is_value_array (proxy_obj_p->target);
|
||||
}
|
||||
#endif /* ENABLED (JERRY_BUILTIN_PROXY) */
|
||||
#endif /* JERRY_BUILTIN_PROXY */
|
||||
|
||||
return ECMA_VALUE_FALSE;
|
||||
} /* ecma_is_value_array */
|
||||
@@ -563,11 +563,11 @@ ecma_is_number_equal_to_positive_zero (ecma_number_t ecma_number) /**< number */
|
||||
{
|
||||
ecma_number_accessor_t u;
|
||||
u.as_ecma_number_t = ecma_number;
|
||||
#if !ENABLED (JERRY_NUMBER_TYPE_FLOAT64)
|
||||
#if !JERRY_NUMBER_TYPE_FLOAT64
|
||||
return u.as_uint32_t == 0;
|
||||
#else /* ENABLED (JERRY_NUMBER_TYPE_FLOAT64) */
|
||||
#else /* JERRY_NUMBER_TYPE_FLOAT64 */
|
||||
return u.as_uint64_t == 0;
|
||||
#endif /* !ENABLED (JERRY_NUMBER_TYPE_FLOAT64) */
|
||||
#endif /* !JERRY_NUMBER_TYPE_FLOAT64 */
|
||||
} /* ecma_is_number_equal_to_positive_zero */
|
||||
|
||||
/**
|
||||
@@ -647,9 +647,9 @@ extern inline ecma_value_t JERRY_ATTR_PURE JERRY_ATTR_ALWAYS_INLINE
|
||||
ecma_make_string_value (const ecma_string_t *ecma_string_p) /**< string to reference in value */
|
||||
{
|
||||
JERRY_ASSERT (ecma_string_p != NULL);
|
||||
#if ENABLED (JERRY_ESNEXT)
|
||||
#if JERRY_ESNEXT
|
||||
JERRY_ASSERT (!ecma_prop_name_is_symbol ((ecma_string_t *) ecma_string_p));
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
|
||||
if ((((uintptr_t) ecma_string_p) & ECMA_VALUE_TYPE_MASK) != 0)
|
||||
{
|
||||
@@ -659,7 +659,7 @@ ecma_make_string_value (const ecma_string_t *ecma_string_p) /**< string to refer
|
||||
return ecma_pointer_to_ecma_value (ecma_string_p) | ECMA_TYPE_STRING;
|
||||
} /* ecma_make_string_value */
|
||||
|
||||
#if ENABLED (JERRY_ESNEXT)
|
||||
#if JERRY_ESNEXT
|
||||
/**
|
||||
* Symbol value constructor
|
||||
*
|
||||
@@ -673,7 +673,7 @@ ecma_make_symbol_value (const ecma_string_t *ecma_symbol_p) /**< symbol to refer
|
||||
|
||||
return ecma_pointer_to_ecma_value (ecma_symbol_p) | ECMA_TYPE_SYMBOL;
|
||||
} /* ecma_make_symbol_value */
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
|
||||
/**
|
||||
* Property-name value constructor
|
||||
@@ -685,12 +685,12 @@ ecma_make_prop_name_value (const ecma_string_t *ecma_prop_name_p) /**< property
|
||||
{
|
||||
JERRY_ASSERT (ecma_prop_name_p != NULL);
|
||||
|
||||
#if ENABLED (JERRY_ESNEXT)
|
||||
#if JERRY_ESNEXT
|
||||
if (ecma_prop_name_is_symbol ((ecma_string_t *) ecma_prop_name_p))
|
||||
{
|
||||
return ecma_make_symbol_value (ecma_prop_name_p);
|
||||
}
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
|
||||
return ecma_make_string_value (ecma_prop_name_p);
|
||||
} /* ecma_make_prop_name_value */
|
||||
@@ -729,9 +729,9 @@ ecma_make_extended_primitive_value (const ecma_extended_primitive_t *primitve_p,
|
||||
uint32_t type) /**< ecma type of extended primitve value */
|
||||
{
|
||||
JERRY_ASSERT (primitve_p != NULL);
|
||||
#if ENABLED (JERRY_BUILTIN_BIGINT)
|
||||
#if JERRY_BUILTIN_BIGINT
|
||||
JERRY_ASSERT (primitve_p != ECMA_BIGINT_POINTER_TO_ZERO);
|
||||
#endif /* ENABLED (JERRY_BUILTIN_BIGINT) */
|
||||
#endif /* JERRY_BUILTIN_BIGINT */
|
||||
JERRY_ASSERT (type == ECMA_TYPE_BIGINT || type == ECMA_TYPE_ERROR);
|
||||
|
||||
return ecma_pointer_to_ecma_value (primitve_p) | type;
|
||||
@@ -810,7 +810,7 @@ ecma_get_string_from_value (ecma_value_t value) /**< ecma value */
|
||||
return (ecma_string_t *) ecma_get_pointer_from_ecma_value (value);
|
||||
} /* ecma_get_string_from_value */
|
||||
|
||||
#if ENABLED (JERRY_ESNEXT)
|
||||
#if JERRY_ESNEXT
|
||||
/**
|
||||
* Get pointer to ecma-string from ecma value
|
||||
*
|
||||
@@ -823,7 +823,7 @@ ecma_get_symbol_from_value (ecma_value_t value) /**< ecma value */
|
||||
|
||||
return (ecma_string_t *) ecma_get_pointer_from_ecma_value (value);
|
||||
} /* ecma_get_symbol_from_value */
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
|
||||
/**
|
||||
* Get pointer to a property name from ecma value
|
||||
@@ -864,9 +864,9 @@ ecma_get_object_from_value (ecma_value_t value) /**< ecma value */
|
||||
extern inline ecma_extended_primitive_t * JERRY_ATTR_PURE JERRY_ATTR_ALWAYS_INLINE
|
||||
ecma_get_extended_primitive_from_value (ecma_value_t value) /**< ecma value */
|
||||
{
|
||||
#if ENABLED (JERRY_BUILTIN_BIGINT)
|
||||
#if JERRY_BUILTIN_BIGINT
|
||||
JERRY_ASSERT (value != ECMA_BIGINT_ZERO);
|
||||
#endif /* ENABLED (JERRY_BUILTIN_BIGINT) */
|
||||
#endif /* JERRY_BUILTIN_BIGINT */
|
||||
JERRY_ASSERT (ecma_get_value_type_field (value) == ECMA_TYPE_BIGINT
|
||||
|| ecma_get_value_type_field (value) == ECMA_TYPE_ERROR);
|
||||
|
||||
@@ -907,14 +907,14 @@ ecma_copy_value (ecma_value_t value) /**< value description */
|
||||
ecma_ref_ecma_string (ecma_get_string_from_value (value));
|
||||
return value;
|
||||
}
|
||||
#if ENABLED (JERRY_ESNEXT)
|
||||
#if JERRY_ESNEXT
|
||||
case ECMA_TYPE_SYMBOL:
|
||||
{
|
||||
ecma_ref_ecma_string (ecma_get_symbol_from_value (value));
|
||||
return value;
|
||||
}
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
#if ENABLED (JERRY_BUILTIN_BIGINT)
|
||||
#endif /* JERRY_ESNEXT */
|
||||
#if JERRY_BUILTIN_BIGINT
|
||||
case ECMA_TYPE_BIGINT:
|
||||
{
|
||||
if (value != ECMA_BIGINT_ZERO)
|
||||
@@ -923,7 +923,7 @@ ecma_copy_value (ecma_value_t value) /**< value description */
|
||||
}
|
||||
return value;
|
||||
}
|
||||
#endif /* ENABLED (JERRY_BUILTIN_BIGINT) */
|
||||
#endif /* JERRY_BUILTIN_BIGINT */
|
||||
case ECMA_TYPE_OBJECT:
|
||||
{
|
||||
ecma_ref_object (ecma_get_object_from_value (value));
|
||||
@@ -1138,20 +1138,20 @@ ecma_free_value (ecma_value_t value) /**< value description */
|
||||
ecma_deref_ecma_string (string_p);
|
||||
break;
|
||||
}
|
||||
#if ENABLED (JERRY_ESNEXT)
|
||||
#if JERRY_ESNEXT
|
||||
case ECMA_TYPE_SYMBOL:
|
||||
{
|
||||
ecma_deref_ecma_string (ecma_get_symbol_from_value (value));
|
||||
break;
|
||||
}
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
case ECMA_TYPE_OBJECT:
|
||||
{
|
||||
ecma_deref_object (ecma_get_object_from_value (value));
|
||||
break;
|
||||
}
|
||||
|
||||
#if ENABLED (JERRY_BUILTIN_BIGINT)
|
||||
#if JERRY_BUILTIN_BIGINT
|
||||
case ECMA_TYPE_BIGINT:
|
||||
{
|
||||
if (value != ECMA_BIGINT_ZERO)
|
||||
@@ -1160,7 +1160,7 @@ ecma_free_value (ecma_value_t value) /**< value description */
|
||||
}
|
||||
break;
|
||||
}
|
||||
#endif /* ENABLED (JERRY_BUILTIN_BIGINT) */
|
||||
#endif /* JERRY_BUILTIN_BIGINT */
|
||||
|
||||
default:
|
||||
{
|
||||
@@ -1264,18 +1264,18 @@ ecma_get_typeof_lit_id (ecma_value_t value) /**< input ecma value */
|
||||
{
|
||||
ret_value = LIT_MAGIC_STRING_STRING;
|
||||
}
|
||||
#if ENABLED (JERRY_ESNEXT)
|
||||
#if JERRY_ESNEXT
|
||||
else if (ecma_is_value_symbol (value))
|
||||
{
|
||||
ret_value = LIT_MAGIC_STRING_SYMBOL;
|
||||
}
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
#if ENABLED (JERRY_BUILTIN_BIGINT)
|
||||
#endif /* JERRY_ESNEXT */
|
||||
#if JERRY_BUILTIN_BIGINT
|
||||
else if (ecma_is_value_bigint (value))
|
||||
{
|
||||
ret_value = LIT_MAGIC_STRING_BIGINT;
|
||||
}
|
||||
#endif /* ENABLED (JERRY_BUILTIN_BIGINT) */
|
||||
#endif /* JERRY_BUILTIN_BIGINT */
|
||||
else
|
||||
{
|
||||
JERRY_ASSERT (ecma_is_value_object (value));
|
||||
|
||||
@@ -26,9 +26,9 @@
|
||||
#include "re-compiler.h"
|
||||
#include "ecma-builtins.h"
|
||||
|
||||
#if ENABLED (JERRY_DEBUGGER)
|
||||
#if JERRY_DEBUGGER
|
||||
#include "debugger.h"
|
||||
#endif /* ENABLED (JERRY_DEBUGGER) */
|
||||
#endif /* JERRY_DEBUGGER */
|
||||
|
||||
/** \addtogroup ecma ECMA
|
||||
* @{
|
||||
@@ -136,12 +136,12 @@ ecma_create_object_lex_env (ecma_object_t *outer_lexical_environment_p, /**< out
|
||||
ecma_object_t *binding_obj_p, /**< binding object */
|
||||
ecma_lexical_environment_type_t type) /**< type of the new lexical environment */
|
||||
{
|
||||
#if ENABLED (JERRY_ESNEXT)
|
||||
#if JERRY_ESNEXT
|
||||
JERRY_ASSERT (type == ECMA_LEXICAL_ENVIRONMENT_THIS_OBJECT_BOUND
|
||||
|| type == ECMA_LEXICAL_ENVIRONMENT_HOME_OBJECT_BOUND);
|
||||
#else /* !ENABLED (JERRY_ESNEXT) */
|
||||
#else /* !JERRY_ESNEXT */
|
||||
JERRY_ASSERT (type == ECMA_LEXICAL_ENVIRONMENT_THIS_OBJECT_BOUND);
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
|
||||
JERRY_ASSERT (binding_obj_p != NULL
|
||||
&& !ecma_is_lexical_environment (binding_obj_p));
|
||||
@@ -284,12 +284,12 @@ ecma_get_lex_env_binding_object (const ecma_object_t *object_p) /**< object-boun
|
||||
{
|
||||
JERRY_ASSERT (object_p != NULL);
|
||||
JERRY_ASSERT (ecma_is_lexical_environment (object_p));
|
||||
#if ENABLED (JERRY_ESNEXT)
|
||||
#if JERRY_ESNEXT
|
||||
JERRY_ASSERT (ecma_get_lex_env_type (object_p) == ECMA_LEXICAL_ENVIRONMENT_THIS_OBJECT_BOUND
|
||||
|| ecma_get_lex_env_type (object_p) == ECMA_LEXICAL_ENVIRONMENT_HOME_OBJECT_BOUND);
|
||||
#else /* !ENABLED (JERRY_ESNEXT) */
|
||||
#else /* !JERRY_ESNEXT */
|
||||
JERRY_ASSERT (ecma_get_lex_env_type (object_p) == ECMA_LEXICAL_ENVIRONMENT_THIS_OBJECT_BOUND);
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
|
||||
return ECMA_GET_NON_NULL_POINTER (ecma_object_t, object_p->u1.bound_object_cp);
|
||||
} /* ecma_get_lex_env_binding_object */
|
||||
@@ -390,7 +390,7 @@ ecma_create_property (ecma_object_t *object_p, /**< the object */
|
||||
ecma_property_header_t *first_property_p = ECMA_GET_NON_NULL_POINTER (ecma_property_header_t,
|
||||
*property_list_head_p);
|
||||
|
||||
#if ENABLED (JERRY_PROPRETY_HASHMAP)
|
||||
#if JERRY_PROPRETY_HASHMAP
|
||||
bool has_hashmap = false;
|
||||
|
||||
if (first_property_p->types[0] == ECMA_PROPERTY_TYPE_HASHMAP)
|
||||
@@ -400,7 +400,7 @@ ecma_create_property (ecma_object_t *object_p, /**< the object */
|
||||
*property_list_head_p);
|
||||
has_hashmap = true;
|
||||
}
|
||||
#endif /* ENABLED (JERRY_PROPRETY_HASHMAP) */
|
||||
#endif /* JERRY_PROPRETY_HASHMAP */
|
||||
|
||||
JERRY_ASSERT (ECMA_PROPERTY_IS_PROPERTY_PAIR (first_property_p));
|
||||
|
||||
@@ -424,7 +424,7 @@ ecma_create_property (ecma_object_t *object_p, /**< the object */
|
||||
|
||||
first_property_pair_p->values[0] = value;
|
||||
|
||||
#if ENABLED (JERRY_PROPRETY_HASHMAP)
|
||||
#if JERRY_PROPRETY_HASHMAP
|
||||
/* The property must be fully initialized before ecma_property_hashmap_insert
|
||||
* is called, because the insert operation may reallocate the hashmap, and
|
||||
* that triggers garbage collection which scans all properties of all objects.
|
||||
@@ -437,7 +437,7 @@ ecma_create_property (ecma_object_t *object_p, /**< the object */
|
||||
first_property_pair_p,
|
||||
0);
|
||||
}
|
||||
#endif /* ENABLED (JERRY_PROPRETY_HASHMAP) */
|
||||
#endif /* JERRY_PROPRETY_HASHMAP */
|
||||
|
||||
return first_property_pair_p->values + 0;
|
||||
}
|
||||
@@ -449,7 +449,7 @@ ecma_create_property (ecma_object_t *object_p, /**< the object */
|
||||
/* Need to query property_list_head_p again and recheck the existennce
|
||||
* of property hasmap, because ecma_alloc_property_pair may delete them. */
|
||||
property_list_head_p = &object_p->u1.property_list_cp;
|
||||
#if ENABLED (JERRY_PROPRETY_HASHMAP)
|
||||
#if JERRY_PROPRETY_HASHMAP
|
||||
bool has_hashmap = false;
|
||||
|
||||
if (*property_list_head_p != ECMA_NULL_POINTER)
|
||||
@@ -463,7 +463,7 @@ ecma_create_property (ecma_object_t *object_p, /**< the object */
|
||||
has_hashmap = true;
|
||||
}
|
||||
}
|
||||
#endif /* ENABLED (JERRY_PROPRETY_HASHMAP) */
|
||||
#endif /* JERRY_PROPRETY_HASHMAP */
|
||||
|
||||
/* Just copy the previous value (no need to decompress, compress). */
|
||||
first_property_pair_p->header.next_property_cp = *property_list_head_p;
|
||||
@@ -489,7 +489,7 @@ ecma_create_property (ecma_object_t *object_p, /**< the object */
|
||||
|
||||
first_property_pair_p->values[1] = value;
|
||||
|
||||
#if ENABLED (JERRY_PROPRETY_HASHMAP)
|
||||
#if JERRY_PROPRETY_HASHMAP
|
||||
/* See the comment before the other ecma_property_hashmap_insert above. */
|
||||
|
||||
if (has_hashmap)
|
||||
@@ -499,7 +499,7 @@ ecma_create_property (ecma_object_t *object_p, /**< the object */
|
||||
first_property_pair_p,
|
||||
1);
|
||||
}
|
||||
#endif /* ENABLED (JERRY_PROPRETY_HASHMAP) */
|
||||
#endif /* JERRY_PROPRETY_HASHMAP */
|
||||
|
||||
return first_property_pair_p->values + 1;
|
||||
} /* ecma_create_property */
|
||||
@@ -554,16 +554,16 @@ ecma_create_named_accessor_property (ecma_object_t *object_p, /**< object */
|
||||
uint8_t type_and_flags = prop_attributes;
|
||||
|
||||
ecma_property_value_t value;
|
||||
#if ENABLED (JERRY_CPOINTER_32_BIT)
|
||||
#if JERRY_CPOINTER_32_BIT
|
||||
ecma_getter_setter_pointers_t *getter_setter_pair_p;
|
||||
getter_setter_pair_p = jmem_pools_alloc (sizeof (ecma_getter_setter_pointers_t));
|
||||
ECMA_SET_POINTER (getter_setter_pair_p->getter_cp, get_p);
|
||||
ECMA_SET_POINTER (getter_setter_pair_p->setter_cp, set_p);
|
||||
ECMA_SET_NON_NULL_POINTER (value.getter_setter_pair_cp, getter_setter_pair_p);
|
||||
#else /* !ENABLED (JERRY_CPOINTER_32_BIT) */
|
||||
#else /* !JERRY_CPOINTER_32_BIT */
|
||||
ECMA_SET_POINTER (value.getter_setter_pair.getter_cp, get_p);
|
||||
ECMA_SET_POINTER (value.getter_setter_pair.setter_cp, set_p);
|
||||
#endif /* ENABLED (JERRY_CPOINTER_32_BIT) */
|
||||
#endif /* JERRY_CPOINTER_32_BIT */
|
||||
|
||||
return ecma_create_property (object_p, name_p, type_and_flags, value, out_prop_p);
|
||||
} /* ecma_create_named_accessor_property */
|
||||
@@ -583,19 +583,19 @@ ecma_find_named_property (ecma_object_t *obj_p, /**< object to find property in
|
||||
JERRY_ASSERT (ecma_is_lexical_environment (obj_p)
|
||||
|| !ecma_op_object_is_fast_array (obj_p));
|
||||
|
||||
ecma_property_t *property_p = NULL;
|
||||
|
||||
#if ENABLED (JERRY_LCACHE)
|
||||
property_p = ecma_lcache_lookup (obj_p, name_p);
|
||||
#if JERRY_LCACHE
|
||||
ecma_property_t *property_p = ecma_lcache_lookup (obj_p, name_p);
|
||||
if (property_p != NULL)
|
||||
{
|
||||
return property_p;
|
||||
}
|
||||
#endif /* ENABLED (JERRY_LCACHE) */
|
||||
#else /* !JERRY_LCACHE */
|
||||
ecma_property_t *property_p = NULL;
|
||||
#endif /* JERRY_LCACHE */
|
||||
|
||||
jmem_cpointer_t prop_iter_cp = obj_p->u1.property_list_cp;
|
||||
|
||||
#if ENABLED (JERRY_PROPRETY_HASHMAP)
|
||||
#if JERRY_PROPRETY_HASHMAP
|
||||
if (prop_iter_cp != JMEM_CP_NULL)
|
||||
{
|
||||
ecma_property_header_t *prop_iter_p = ECMA_GET_NON_NULL_POINTER (ecma_property_header_t,
|
||||
@@ -606,21 +606,21 @@ ecma_find_named_property (ecma_object_t *obj_p, /**< object to find property in
|
||||
property_p = ecma_property_hashmap_find ((ecma_property_hashmap_t *) prop_iter_p,
|
||||
name_p,
|
||||
&property_real_name_cp);
|
||||
#if ENABLED (JERRY_LCACHE)
|
||||
#if JERRY_LCACHE
|
||||
if (property_p != NULL
|
||||
&& !ecma_is_property_lcached (property_p))
|
||||
{
|
||||
ecma_lcache_insert (obj_p, property_real_name_cp, property_p);
|
||||
}
|
||||
#endif /* ENABLED (JERRY_LCACHE) */
|
||||
#endif /* JERRY_LCACHE */
|
||||
return property_p;
|
||||
}
|
||||
}
|
||||
#endif /* ENABLED (JERRY_PROPRETY_HASHMAP) */
|
||||
#endif /* JERRY_PROPRETY_HASHMAP */
|
||||
|
||||
#if ENABLED (JERRY_PROPRETY_HASHMAP)
|
||||
#if JERRY_PROPRETY_HASHMAP
|
||||
uint32_t steps = 0;
|
||||
#endif /* ENABLED (JERRY_PROPRETY_HASHMAP) */
|
||||
#endif /* JERRY_PROPRETY_HASHMAP */
|
||||
jmem_cpointer_t property_name_cp = ECMA_NULL_POINTER;
|
||||
|
||||
if (ECMA_IS_DIRECT_STRING (name_p))
|
||||
@@ -657,9 +657,9 @@ ecma_find_named_property (ecma_object_t *obj_p, /**< object to find property in
|
||||
break;
|
||||
}
|
||||
|
||||
#if ENABLED (JERRY_PROPRETY_HASHMAP)
|
||||
#if JERRY_PROPRETY_HASHMAP
|
||||
steps++;
|
||||
#endif /* ENABLED (JERRY_PROPRETY_HASHMAP) */
|
||||
#endif /* JERRY_PROPRETY_HASHMAP */
|
||||
prop_iter_cp = prop_iter_p->next_property_cp;
|
||||
}
|
||||
}
|
||||
@@ -698,27 +698,27 @@ ecma_find_named_property (ecma_object_t *obj_p, /**< object to find property in
|
||||
}
|
||||
}
|
||||
|
||||
#if ENABLED (JERRY_PROPRETY_HASHMAP)
|
||||
#if JERRY_PROPRETY_HASHMAP
|
||||
steps++;
|
||||
#endif /* ENABLED (JERRY_PROPRETY_HASHMAP) */
|
||||
#endif /* JERRY_PROPRETY_HASHMAP */
|
||||
prop_iter_cp = prop_iter_p->next_property_cp;
|
||||
}
|
||||
}
|
||||
|
||||
#if ENABLED (JERRY_PROPRETY_HASHMAP)
|
||||
#if JERRY_PROPRETY_HASHMAP
|
||||
if (steps >= (ECMA_PROPERTY_HASMAP_MINIMUM_SIZE / 2))
|
||||
{
|
||||
ecma_property_hashmap_create (obj_p);
|
||||
}
|
||||
#endif /* ENABLED (JERRY_PROPRETY_HASHMAP) */
|
||||
#endif /* JERRY_PROPRETY_HASHMAP */
|
||||
|
||||
#if ENABLED (JERRY_LCACHE)
|
||||
#if JERRY_LCACHE
|
||||
if (property_p != NULL
|
||||
&& !ecma_is_property_lcached (property_p))
|
||||
{
|
||||
ecma_lcache_insert (obj_p, property_name_cp, property_p);
|
||||
}
|
||||
#endif /* ENABLED (JERRY_LCACHE) */
|
||||
#endif /* JERRY_LCACHE */
|
||||
|
||||
return property_p;
|
||||
} /* ecma_find_named_property */
|
||||
@@ -768,20 +768,20 @@ ecma_free_property (ecma_object_t *object_p, /**< object the property belongs to
|
||||
}
|
||||
else
|
||||
{
|
||||
#if ENABLED (JERRY_CPOINTER_32_BIT)
|
||||
#if JERRY_CPOINTER_32_BIT
|
||||
ecma_getter_setter_pointers_t *getter_setter_pair_p;
|
||||
getter_setter_pair_p = ECMA_GET_NON_NULL_POINTER (ecma_getter_setter_pointers_t,
|
||||
ECMA_PROPERTY_VALUE_PTR (property_p)->getter_setter_pair_cp);
|
||||
jmem_pools_free (getter_setter_pair_p, sizeof (ecma_getter_setter_pointers_t));
|
||||
#endif /* ENABLED (JERRY_CPOINTER_32_BIT) */
|
||||
#endif /* JERRY_CPOINTER_32_BIT */
|
||||
}
|
||||
|
||||
#if ENABLED (JERRY_LCACHE)
|
||||
#if JERRY_LCACHE
|
||||
if (ecma_is_property_lcached (property_p))
|
||||
{
|
||||
ecma_lcache_invalidate (object_p, name_cp, property_p);
|
||||
}
|
||||
#endif /* ENABLED (JERRY_LCACHE) */
|
||||
#endif /* JERRY_LCACHE */
|
||||
|
||||
if (ECMA_PROPERTY_GET_NAME_TYPE (*property_p) == ECMA_DIRECT_STRING_PTR)
|
||||
{
|
||||
@@ -803,7 +803,7 @@ ecma_delete_property (ecma_object_t *object_p, /**< object */
|
||||
|
||||
ecma_property_header_t *prev_prop_p = NULL;
|
||||
|
||||
#if ENABLED (JERRY_PROPRETY_HASHMAP)
|
||||
#if JERRY_PROPRETY_HASHMAP
|
||||
ecma_property_hashmap_delete_status hashmap_status = ECMA_PROPERTY_HASHMAP_DELETE_NO_HASHMAP;
|
||||
|
||||
if (cur_prop_cp != JMEM_CP_NULL)
|
||||
@@ -818,7 +818,7 @@ ecma_delete_property (ecma_object_t *object_p, /**< object */
|
||||
hashmap_status = ECMA_PROPERTY_HASHMAP_DELETE_HAS_HASHMAP;
|
||||
}
|
||||
}
|
||||
#endif /* ENABLED (JERRY_PROPRETY_HASHMAP) */
|
||||
#endif /* JERRY_PROPRETY_HASHMAP */
|
||||
|
||||
while (cur_prop_cp != JMEM_CP_NULL)
|
||||
{
|
||||
@@ -835,14 +835,14 @@ ecma_delete_property (ecma_object_t *object_p, /**< object */
|
||||
{
|
||||
JERRY_ASSERT (ECMA_PROPERTY_IS_NAMED_PROPERTY (cur_prop_p->types[i]));
|
||||
|
||||
#if ENABLED (JERRY_PROPRETY_HASHMAP)
|
||||
#if JERRY_PROPRETY_HASHMAP
|
||||
if (hashmap_status == ECMA_PROPERTY_HASHMAP_DELETE_HAS_HASHMAP)
|
||||
{
|
||||
hashmap_status = ecma_property_hashmap_delete (object_p,
|
||||
prop_pair_p->names_cp[i],
|
||||
cur_prop_p->types + i);
|
||||
}
|
||||
#endif /* ENABLED (JERRY_PROPRETY_HASHMAP) */
|
||||
#endif /* JERRY_PROPRETY_HASHMAP */
|
||||
|
||||
ecma_free_property (object_p, prop_pair_p->names_cp[i], cur_prop_p->types + i);
|
||||
cur_prop_p->types[i] = ECMA_PROPERTY_TYPE_DELETED;
|
||||
@@ -852,14 +852,14 @@ ecma_delete_property (ecma_object_t *object_p, /**< object */
|
||||
|
||||
if (cur_prop_p->types[1 - i] != ECMA_PROPERTY_TYPE_DELETED)
|
||||
{
|
||||
#if ENABLED (JERRY_PROPRETY_HASHMAP)
|
||||
#if JERRY_PROPRETY_HASHMAP
|
||||
/* The other property is still valid. */
|
||||
if (hashmap_status == ECMA_PROPERTY_HASHMAP_DELETE_RECREATE_HASHMAP)
|
||||
{
|
||||
ecma_property_hashmap_free (object_p);
|
||||
ecma_property_hashmap_create (object_p);
|
||||
}
|
||||
#endif /* ENABLED (JERRY_PROPRETY_HASHMAP) */
|
||||
#endif /* JERRY_PROPRETY_HASHMAP */
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -876,13 +876,13 @@ ecma_delete_property (ecma_object_t *object_p, /**< object */
|
||||
|
||||
ecma_dealloc_property_pair ((ecma_property_pair_t *) cur_prop_p);
|
||||
|
||||
#if ENABLED (JERRY_PROPRETY_HASHMAP)
|
||||
#if JERRY_PROPRETY_HASHMAP
|
||||
if (hashmap_status == ECMA_PROPERTY_HASHMAP_DELETE_RECREATE_HASHMAP)
|
||||
{
|
||||
ecma_property_hashmap_free (object_p);
|
||||
ecma_property_hashmap_create (object_p);
|
||||
}
|
||||
#endif /* ENABLED (JERRY_PROPRETY_HASHMAP) */
|
||||
#endif /* JERRY_PROPRETY_HASHMAP */
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -961,11 +961,11 @@ ecma_named_data_property_assign_value (ecma_object_t *obj_p, /**< object */
|
||||
ecma_getter_setter_pointers_t *
|
||||
ecma_get_named_accessor_property (const ecma_property_value_t *prop_value_p) /**< property value reference */
|
||||
{
|
||||
#if ENABLED (JERRY_CPOINTER_32_BIT)
|
||||
#if JERRY_CPOINTER_32_BIT
|
||||
return ECMA_GET_NON_NULL_POINTER (ecma_getter_setter_pointers_t, prop_value_p->getter_setter_pair_cp);
|
||||
#else /* !ENABLED (JERRY_CPOINTER_32_BIT) */
|
||||
#else /* !JERRY_CPOINTER_32_BIT */
|
||||
return (ecma_getter_setter_pointers_t *) &prop_value_p->getter_setter_pair;
|
||||
#endif /* ENABLED (JERRY_CPOINTER_32_BIT) */
|
||||
#endif /* JERRY_CPOINTER_32_BIT */
|
||||
} /* ecma_get_named_accessor_property */
|
||||
|
||||
/**
|
||||
@@ -978,14 +978,14 @@ ecma_set_named_accessor_property_getter (ecma_object_t *object_p, /**< the prope
|
||||
{
|
||||
ecma_assert_object_contains_the_property (object_p, prop_value_p, false);
|
||||
|
||||
#if ENABLED (JERRY_CPOINTER_32_BIT)
|
||||
#if JERRY_CPOINTER_32_BIT
|
||||
ecma_getter_setter_pointers_t *getter_setter_pair_p;
|
||||
getter_setter_pair_p = ECMA_GET_NON_NULL_POINTER (ecma_getter_setter_pointers_t,
|
||||
prop_value_p->getter_setter_pair_cp);
|
||||
ECMA_SET_POINTER (getter_setter_pair_p->getter_cp, getter_p);
|
||||
#else /* !ENABLED (JERRY_CPOINTER_32_BIT) */
|
||||
#else /* !JERRY_CPOINTER_32_BIT */
|
||||
ECMA_SET_POINTER (prop_value_p->getter_setter_pair.getter_cp, getter_p);
|
||||
#endif /* ENABLED (JERRY_CPOINTER_32_BIT) */
|
||||
#endif /* JERRY_CPOINTER_32_BIT */
|
||||
} /* ecma_set_named_accessor_property_getter */
|
||||
|
||||
/**
|
||||
@@ -998,14 +998,14 @@ ecma_set_named_accessor_property_setter (ecma_object_t *object_p, /**< the prope
|
||||
{
|
||||
ecma_assert_object_contains_the_property (object_p, prop_value_p, false);
|
||||
|
||||
#if ENABLED (JERRY_CPOINTER_32_BIT)
|
||||
#if JERRY_CPOINTER_32_BIT
|
||||
ecma_getter_setter_pointers_t *getter_setter_pair_p;
|
||||
getter_setter_pair_p = ECMA_GET_NON_NULL_POINTER (ecma_getter_setter_pointers_t,
|
||||
prop_value_p->getter_setter_pair_cp);
|
||||
ECMA_SET_POINTER (getter_setter_pair_p->setter_cp, setter_p);
|
||||
#else /* !ENABLED (JERRY_CPOINTER_32_BIT) */
|
||||
#else /* !JERRY_CPOINTER_32_BIT */
|
||||
ECMA_SET_POINTER (prop_value_p->getter_setter_pair.setter_cp, setter_p);
|
||||
#endif /* ENABLED (JERRY_CPOINTER_32_BIT) */
|
||||
#endif /* JERRY_CPOINTER_32_BIT */
|
||||
} /* ecma_set_named_accessor_property_setter */
|
||||
|
||||
/**
|
||||
@@ -1107,7 +1107,7 @@ ecma_set_property_configurable_attr (ecma_property_t *property_p, /**< [in,out]
|
||||
}
|
||||
} /* ecma_set_property_configurable_attr */
|
||||
|
||||
#if ENABLED (JERRY_LCACHE)
|
||||
#if JERRY_LCACHE
|
||||
|
||||
/**
|
||||
* Check whether the property is registered in LCache
|
||||
@@ -1141,7 +1141,7 @@ ecma_set_property_lcached (ecma_property_t *property_p, /**< property */
|
||||
}
|
||||
} /* ecma_set_property_lcached */
|
||||
|
||||
#endif /* ENABLED (JERRY_LCACHE) */
|
||||
#endif /* JERRY_LCACHE */
|
||||
|
||||
/**
|
||||
* Construct empty property descriptor, i.e.:
|
||||
@@ -1228,7 +1228,7 @@ ecma_deref_error_reference (ecma_extended_primitive_t *error_ref_p) /**< error r
|
||||
}
|
||||
} /* ecma_deref_error_reference */
|
||||
|
||||
#if ENABLED (JERRY_BUILTIN_BIGINT)
|
||||
#if JERRY_BUILTIN_BIGINT
|
||||
|
||||
/**
|
||||
* Decrease ref count of a bigint value.
|
||||
@@ -1253,7 +1253,7 @@ ecma_deref_bigint (ecma_extended_primitive_t *bigint_p) /**< bigint value */
|
||||
jmem_heap_free_block (bigint_p, mem_size);
|
||||
} /* ecma_deref_bigint */
|
||||
|
||||
#endif /* ENABLED (JERRY_BUILTIN_BIGINT) */
|
||||
#endif /* JERRY_BUILTIN_BIGINT */
|
||||
|
||||
/**
|
||||
* Create an error reference from a given value.
|
||||
@@ -1410,7 +1410,7 @@ ecma_bytecode_deref (ecma_compiled_code_t *bytecode_p) /**< byte code pointer */
|
||||
}
|
||||
}
|
||||
|
||||
#if ENABLED (JERRY_DEBUGGER)
|
||||
#if JERRY_DEBUGGER
|
||||
if ((JERRY_CONTEXT (debugger_flags) & JERRY_DEBUGGER_CONNECTED)
|
||||
&& !(bytecode_p->status_flags & CBC_CODE_FLAGS_DEBUGGER_IGNORE)
|
||||
&& jerry_debugger_send_function_cp (JERRY_DEBUGGER_RELEASE_BYTE_CODE_CP, bytecode_p))
|
||||
@@ -1442,9 +1442,9 @@ ecma_bytecode_deref (ecma_compiled_code_t *bytecode_p) /**< byte code pointer */
|
||||
JERRY_CONTEXT (debugger_byte_code_free_head) = byte_code_free_cp;
|
||||
return;
|
||||
}
|
||||
#endif /* ENABLED (JERRY_DEBUGGER) */
|
||||
#endif /* JERRY_DEBUGGER */
|
||||
|
||||
#if ENABLED (JERRY_ESNEXT)
|
||||
#if JERRY_ESNEXT
|
||||
if (bytecode_p->status_flags & CBC_CODE_FLAGS_HAS_TAGGED_LITERALS)
|
||||
{
|
||||
ecma_collection_t *collection_p = ecma_compiled_code_get_tagged_template_collection (bytecode_p);
|
||||
@@ -1454,19 +1454,19 @@ ecma_bytecode_deref (ecma_compiled_code_t *bytecode_p) /**< byte code pointer */
|
||||
JERRY_CONTEXT (ecma_gc_new_objects) += collection_p->item_count * 2;
|
||||
ecma_collection_free_template_literal (collection_p);
|
||||
}
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
|
||||
#if ENABLED (JERRY_MEM_STATS)
|
||||
#if JERRY_MEM_STATS
|
||||
jmem_stats_free_byte_code_bytes (((size_t) bytecode_p->size) << JMEM_ALIGNMENT_LOG);
|
||||
#endif /* ENABLED (JERRY_MEM_STATS) */
|
||||
#endif /* JERRY_MEM_STATS */
|
||||
}
|
||||
else
|
||||
{
|
||||
#if ENABLED (JERRY_BUILTIN_REGEXP)
|
||||
#if JERRY_BUILTIN_REGEXP
|
||||
re_compiled_code_t *re_bytecode_p = (re_compiled_code_t *) bytecode_p;
|
||||
|
||||
ecma_deref_ecma_string (ecma_get_string_from_value (re_bytecode_p->source));
|
||||
#endif /* ENABLED (JERRY_BUILTIN_REGEXP) */
|
||||
#endif /* JERRY_BUILTIN_REGEXP */
|
||||
}
|
||||
|
||||
jmem_heap_free_block (bytecode_p,
|
||||
@@ -1499,7 +1499,7 @@ ecma_compiled_code_resolve_arguments_start (const ecma_compiled_code_t *bytecode
|
||||
return ((ecma_value_t *) byte_p) - ((cbc_uint16_arguments_t *) bytecode_header_p)->argument_end;
|
||||
} /* ecma_compiled_code_resolve_arguments_start */
|
||||
|
||||
#if ENABLED (JERRY_ESNEXT)
|
||||
#if JERRY_ESNEXT
|
||||
|
||||
/**
|
||||
* Resolve the position of the function name of the compiled code
|
||||
@@ -1552,7 +1552,7 @@ ecma_compiled_code_get_tagged_template_collection (const ecma_compiled_code_t *b
|
||||
return ECMA_GET_INTERNAL_VALUE_POINTER (ecma_collection_t, base_p[offset]);
|
||||
} /* ecma_compiled_code_get_tagged_template_collection */
|
||||
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
|
||||
/**
|
||||
* Get the resource name of a compiled code.
|
||||
@@ -1562,7 +1562,7 @@ ecma_compiled_code_get_tagged_template_collection (const ecma_compiled_code_t *b
|
||||
ecma_value_t
|
||||
ecma_get_resource_name (const ecma_compiled_code_t *bytecode_p) /**< compiled code */
|
||||
{
|
||||
#if ENABLED (JERRY_RESOURCE_NAME)
|
||||
#if JERRY_RESOURCE_NAME
|
||||
if (bytecode_p->status_flags & CBC_CODE_FLAGS_UINT16_ARGUMENTS)
|
||||
{
|
||||
cbc_uint16_arguments_t *args_p = (cbc_uint16_arguments_t *) bytecode_p;
|
||||
@@ -1573,10 +1573,10 @@ ecma_get_resource_name (const ecma_compiled_code_t *bytecode_p) /**< compiled co
|
||||
cbc_uint8_arguments_t *args_p = (cbc_uint8_arguments_t *) bytecode_p;
|
||||
ecma_value_t *lit_pool_p = (ecma_value_t *) ((uint8_t *) bytecode_p + sizeof (cbc_uint8_arguments_t));
|
||||
return lit_pool_p[args_p->const_literal_end - args_p->register_end - 1];
|
||||
#else /* !ENABLED (JERRY_RESOURCE_NAME) */
|
||||
#else /* !JERRY_RESOURCE_NAME */
|
||||
JERRY_UNUSED (bytecode_p);
|
||||
return ecma_make_magic_string_value (LIT_MAGIC_STRING_RESOURCE_ANON);
|
||||
#endif /* !ENABLED (JERRY_RESOURCE_NAME) */
|
||||
#endif /* !JERRY_RESOURCE_NAME */
|
||||
} /* ecma_get_resource_name */
|
||||
|
||||
#if (JERRY_STACK_LIMIT != 0)
|
||||
|
||||
@@ -209,11 +209,11 @@ typedef enum
|
||||
*
|
||||
* @param obj_p ecma-object
|
||||
*/
|
||||
#if ENABLED (JERRY_BUILTIN_PROXY)
|
||||
#if JERRY_BUILTIN_PROXY
|
||||
#define ECMA_OBJECT_IS_PROXY(obj_p) (ECMA_OBJECT_TYPE_IS_PROXY (ecma_get_object_type ((obj_p))))
|
||||
#else /* !ENABLED (JERRY_BUILTIN_PROXY) */
|
||||
#else /* !JERRY_BUILTIN_PROXY */
|
||||
#define ECMA_OBJECT_IS_PROXY(obj_p) (false)
|
||||
#endif /* ENABLED (JERRY_BUILTIN_PROXY) */
|
||||
#endif /* JERRY_BUILTIN_PROXY */
|
||||
|
||||
/* ecma-helpers-value.c */
|
||||
ecma_type_t JERRY_ATTR_CONST ecma_get_value_type_field (ecma_value_t value);
|
||||
@@ -254,9 +254,9 @@ ecma_value_t ecma_make_number_value (ecma_number_t ecma_number);
|
||||
ecma_value_t ecma_make_int32_value (int32_t int32_number);
|
||||
ecma_value_t ecma_make_uint32_value (uint32_t uint32_number);
|
||||
ecma_value_t JERRY_ATTR_PURE ecma_make_string_value (const ecma_string_t *ecma_string_p);
|
||||
#if ENABLED (JERRY_ESNEXT)
|
||||
#if JERRY_ESNEXT
|
||||
ecma_value_t JERRY_ATTR_PURE ecma_make_symbol_value (const ecma_string_t *ecma_symbol_p);
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
ecma_value_t JERRY_ATTR_PURE ecma_make_prop_name_value (const ecma_string_t *ecma_prop_name_p);
|
||||
ecma_value_t JERRY_ATTR_PURE ecma_make_magic_string_value (lit_magic_string_id_t id);
|
||||
ecma_value_t JERRY_ATTR_PURE ecma_make_object_value (const ecma_object_t *object_p);
|
||||
@@ -267,9 +267,9 @@ ecma_number_t JERRY_ATTR_PURE ecma_get_float_from_value (ecma_value_t value);
|
||||
ecma_number_t * ecma_get_pointer_from_float_value (ecma_value_t value);
|
||||
ecma_number_t JERRY_ATTR_PURE ecma_get_number_from_value (ecma_value_t value);
|
||||
ecma_string_t JERRY_ATTR_PURE *ecma_get_string_from_value (ecma_value_t value);
|
||||
#if ENABLED (JERRY_ESNEXT)
|
||||
#if JERRY_ESNEXT
|
||||
ecma_string_t JERRY_ATTR_PURE *ecma_get_symbol_from_value (ecma_value_t value);
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
ecma_string_t JERRY_ATTR_PURE *ecma_get_prop_name_from_value (ecma_value_t value);
|
||||
ecma_object_t JERRY_ATTR_PURE *ecma_get_object_from_value (ecma_value_t value);
|
||||
ecma_extended_primitive_t JERRY_ATTR_PURE *ecma_get_extended_primitive_from_value (ecma_value_t value);
|
||||
@@ -290,24 +290,24 @@ void ecma_free_number (ecma_value_t value);
|
||||
lit_magic_string_id_t ecma_get_typeof_lit_id (ecma_value_t value);
|
||||
|
||||
/* ecma-helpers-string.c */
|
||||
#if ENABLED (JERRY_ESNEXT)
|
||||
#if JERRY_ESNEXT
|
||||
ecma_string_t *ecma_new_symbol_from_descriptor_string (ecma_value_t string_desc);
|
||||
bool ecma_prop_name_is_symbol (ecma_string_t *string_p);
|
||||
ecma_length_t ecma_op_advance_string_index (ecma_string_t *str_p, ecma_length_t index_num, bool is_unicode);
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
#if ENABLED (JERRY_BUILTIN_MAP) || ENABLED (JERRY_BUILTIN_SET)
|
||||
#endif /* JERRY_ESNEXT */
|
||||
#if JERRY_BUILTIN_MAP || JERRY_BUILTIN_SET
|
||||
ecma_string_t *ecma_new_map_key_string (ecma_value_t value);
|
||||
bool ecma_prop_name_is_map_key (ecma_string_t *string_p);
|
||||
#endif /* ENABLED (JERRY_BUILTIN_MAP) || ENABLED (JERRY_BUILTIN_SET) */
|
||||
#endif /* JERRY_BUILTIN_MAP || JERRY_BUILTIN_SET */
|
||||
ecma_string_t *ecma_new_ecma_string_from_utf8 (const lit_utf8_byte_t *string_p, lit_utf8_size_t string_size);
|
||||
ecma_string_t *ecma_new_ecma_string_from_utf8_converted_to_cesu8 (const lit_utf8_byte_t *string_p,
|
||||
lit_utf8_size_t string_size);
|
||||
ecma_string_t *ecma_new_ecma_external_string_from_cesu8 (const lit_utf8_byte_t *string_p, lit_utf8_size_t string_size,
|
||||
ecma_object_native_free_callback_t free_cb);
|
||||
ecma_string_t *ecma_new_ecma_string_from_code_unit (ecma_char_t code_unit);
|
||||
#if ENABLED (JERRY_ESNEXT)
|
||||
#if JERRY_ESNEXT
|
||||
ecma_string_t *ecma_new_ecma_string_from_code_units (ecma_char_t first_code_unit, ecma_char_t second_code_unit);
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
ecma_string_t *ecma_new_ecma_string_from_length (ecma_length_t index);
|
||||
ecma_string_t *ecma_new_ecma_string_from_uint32 (uint32_t uint32_number);
|
||||
ecma_string_t *ecma_new_non_direct_string_from_uint32 (uint32_t uint32_number);
|
||||
@@ -382,12 +382,12 @@ const lit_utf8_byte_t *ecma_string_trim_back (const lit_utf8_byte_t *start_p, co
|
||||
void ecma_string_trim_helper (const lit_utf8_byte_t **utf8_str_p,
|
||||
lit_utf8_size_t *utf8_str_size);
|
||||
ecma_string_t *ecma_string_trim (const ecma_string_t *string_p);
|
||||
#if ENABLED (JERRY_ESNEXT)
|
||||
#if JERRY_ESNEXT
|
||||
ecma_value_t ecma_string_pad (ecma_value_t original_string_p,
|
||||
ecma_value_t max_length,
|
||||
ecma_value_t fill_string,
|
||||
bool pad_on_start);
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
|
||||
ecma_stringbuilder_t ecma_stringbuilder_create (void);
|
||||
ecma_stringbuilder_t ecma_stringbuilder_create_from (ecma_string_t *string_p);
|
||||
@@ -441,9 +441,9 @@ void ecma_collection_destroy (ecma_collection_t *collection_p);
|
||||
void ecma_collection_free (ecma_collection_t *collection_p);
|
||||
void ecma_collection_free_if_not_object (ecma_collection_t *collection_p);
|
||||
void ecma_collection_free_objects (ecma_collection_t *collection_p);
|
||||
#if ENABLED (JERRY_ESNEXT)
|
||||
#if JERRY_ESNEXT
|
||||
void ecma_collection_free_template_literal (ecma_collection_t *collection_p);
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
bool ecma_collection_check_duplicated_entries (ecma_collection_t *collection_p);
|
||||
bool ecma_collection_has_string_value (ecma_collection_t *collection_p, ecma_string_t *string_p);
|
||||
|
||||
@@ -498,19 +498,19 @@ void ecma_set_property_enumerable_attr (ecma_property_t *property_p, bool is_enu
|
||||
bool ecma_is_property_configurable (ecma_property_t property);
|
||||
void ecma_set_property_configurable_attr (ecma_property_t *property_p, bool is_configurable);
|
||||
|
||||
#if ENABLED (JERRY_LCACHE)
|
||||
#if JERRY_LCACHE
|
||||
bool ecma_is_property_lcached (ecma_property_t *property_p);
|
||||
void ecma_set_property_lcached (ecma_property_t *property_p, bool is_lcached);
|
||||
#endif /* ENABLED (JERRY_LCACHE) */
|
||||
#endif /* JERRY_LCACHE */
|
||||
|
||||
ecma_property_descriptor_t ecma_make_empty_property_descriptor (void);
|
||||
void ecma_free_property_descriptor (ecma_property_descriptor_t *prop_desc_p);
|
||||
|
||||
void ecma_ref_extended_primitive (ecma_extended_primitive_t *primitve_p);
|
||||
void ecma_deref_error_reference (ecma_extended_primitive_t *error_ref_p);
|
||||
#if ENABLED (JERRY_BUILTIN_BIGINT)
|
||||
#if JERRY_BUILTIN_BIGINT
|
||||
void ecma_deref_bigint (ecma_extended_primitive_t *bigint_p);
|
||||
#endif /* ENABLED (JERRY_BUILTIN_BIGINT) */
|
||||
#endif /* JERRY_BUILTIN_BIGINT */
|
||||
|
||||
ecma_value_t ecma_create_error_reference (ecma_value_t value, bool is_exception);
|
||||
ecma_value_t ecma_create_error_reference_from_context (void);
|
||||
@@ -520,11 +520,11 @@ void ecma_raise_error_from_error_reference (ecma_value_t value);
|
||||
void ecma_bytecode_ref (ecma_compiled_code_t *bytecode_p);
|
||||
void ecma_bytecode_deref (ecma_compiled_code_t *bytecode_p);
|
||||
ecma_value_t *ecma_compiled_code_resolve_arguments_start (const ecma_compiled_code_t *bytecode_header_p);
|
||||
#if ENABLED (JERRY_ESNEXT)
|
||||
#if JERRY_ESNEXT
|
||||
ecma_value_t *ecma_compiled_code_resolve_function_name (const ecma_compiled_code_t *bytecode_header_p);
|
||||
uint32_t ecma_compiled_code_resolve_extended_info (const ecma_compiled_code_t *bytecode_header_p);
|
||||
ecma_collection_t *ecma_compiled_code_get_tagged_template_collection (const ecma_compiled_code_t *bytecode_header_p);
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
ecma_value_t ecma_get_resource_name (const ecma_compiled_code_t *bytecode_p);
|
||||
#if (JERRY_STACK_LIMIT != 0)
|
||||
uintptr_t ecma_get_current_stack_usage (void);
|
||||
|
||||
@@ -46,23 +46,23 @@ ecma_init (void)
|
||||
|
||||
ecma_init_global_environment ();
|
||||
|
||||
#if ENABLED (JERRY_PROPRETY_HASHMAP)
|
||||
#if JERRY_PROPRETY_HASHMAP
|
||||
JERRY_CONTEXT (ecma_prop_hashmap_alloc_state) = ECMA_PROP_HASHMAP_ALLOC_ON;
|
||||
JERRY_CONTEXT (status_flags) &= (uint32_t) ~ECMA_STATUS_HIGH_PRESSURE_GC;
|
||||
#endif /* ENABLED (JERRY_PROPRETY_HASHMAP) */
|
||||
#endif /* JERRY_PROPRETY_HASHMAP */
|
||||
|
||||
#if (JERRY_STACK_LIMIT != 0)
|
||||
volatile int sp;
|
||||
JERRY_CONTEXT (stack_base) = (uintptr_t) &sp;
|
||||
#endif /* (JERRY_STACK_LIMIT != 0) */
|
||||
|
||||
#if ENABLED (JERRY_BUILTIN_PROMISE)
|
||||
#if JERRY_BUILTIN_PROMISE
|
||||
ecma_job_queue_init ();
|
||||
#endif /* ENABLED (JERRY_BUILTIN_PROMISE) */
|
||||
#endif /* JERRY_BUILTIN_PROMISE */
|
||||
|
||||
#if ENABLED (JERRY_ESNEXT)
|
||||
#if JERRY_ESNEXT
|
||||
JERRY_CONTEXT (current_new_target_p) = NULL;
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
} /* ecma_init */
|
||||
|
||||
/**
|
||||
@@ -71,9 +71,9 @@ ecma_init (void)
|
||||
void
|
||||
ecma_finalize (void)
|
||||
{
|
||||
#if ENABLED (JERRY_ESNEXT)
|
||||
#if JERRY_ESNEXT
|
||||
JERRY_ASSERT (JERRY_CONTEXT (current_new_target_p) == NULL);
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
|
||||
ecma_finalize_global_environment ();
|
||||
uint8_t runs = 0;
|
||||
@@ -88,7 +88,7 @@ ecma_finalize (void)
|
||||
}
|
||||
while (JERRY_CONTEXT (ecma_gc_new_objects) != 0);
|
||||
|
||||
#if ENABLED (JERRY_ESNEXT)
|
||||
#if JERRY_ESNEXT
|
||||
jmem_cpointer_t *global_symbols_cp = JERRY_CONTEXT (global_symbols_cp);
|
||||
|
||||
for (uint32_t i = 0; i < ECMA_BUILTIN_GLOBAL_SYMBOL_COUNT; i++)
|
||||
@@ -98,7 +98,7 @@ ecma_finalize (void)
|
||||
ecma_deref_ecma_string (ECMA_GET_NON_NULL_POINTER (ecma_string_t, global_symbols_cp[i]));
|
||||
}
|
||||
}
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
|
||||
ecma_finalize_lit_storage ();
|
||||
} /* ecma_finalize */
|
||||
|
||||
@@ -26,16 +26,16 @@
|
||||
* @{
|
||||
*/
|
||||
|
||||
#if ENABLED (JERRY_LCACHE)
|
||||
#if JERRY_LCACHE
|
||||
|
||||
/**
|
||||
* Bitshift index for calculating hash.
|
||||
*/
|
||||
#if ENABLED (JERRY_CPOINTER_32_BIT)
|
||||
#if JERRY_CPOINTER_32_BIT
|
||||
#define ECMA_LCACHE_HASH_BITSHIFT_INDEX (2 * JMEM_ALIGNMENT_LOG)
|
||||
#else /* !ENABLED (JERRY_CPOINTER_32_BIT) */
|
||||
#else /* !JERRY_CPOINTER_32_BIT */
|
||||
#define ECMA_LCACHE_HASH_BITSHIFT_INDEX 0
|
||||
#endif /* ENABLED (JERRY_CPOINTER_32_BIT) */
|
||||
#endif /* JERRY_CPOINTER_32_BIT */
|
||||
|
||||
/**
|
||||
* Mask for hash bits
|
||||
@@ -213,7 +213,7 @@ ecma_lcache_invalidate (const ecma_object_t *object_p, /**< object */
|
||||
}
|
||||
} /* ecma_lcache_invalidate */
|
||||
|
||||
#endif /* ENABLED (JERRY_LCACHE) */
|
||||
#endif /* JERRY_LCACHE */
|
||||
|
||||
/**
|
||||
* @}
|
||||
|
||||
@@ -23,12 +23,12 @@
|
||||
* @{
|
||||
*/
|
||||
|
||||
#if ENABLED (JERRY_LCACHE)
|
||||
#if JERRY_LCACHE
|
||||
void ecma_lcache_insert (const ecma_object_t *object_p, const jmem_cpointer_t name_cp, ecma_property_t *prop_p);
|
||||
ecma_property_t *ecma_lcache_lookup (const ecma_object_t *object_p, const ecma_string_t *prop_name_p);
|
||||
void ecma_lcache_invalidate (const ecma_object_t *object_p, const jmem_cpointer_t name_cp, ecma_property_t *prop_p);
|
||||
|
||||
#endif /* ENABLED (JERRY_LCACHE) */
|
||||
#endif /* JERRY_LCACHE */
|
||||
|
||||
/**
|
||||
* @}
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
* @{
|
||||
*/
|
||||
|
||||
#if ENABLED (JERRY_ESNEXT)
|
||||
#if JERRY_ESNEXT
|
||||
/**
|
||||
* Free symbol list
|
||||
*/
|
||||
@@ -55,7 +55,7 @@ ecma_free_symbol_list (jmem_cpointer_t symbol_list_cp) /**< symbol list */
|
||||
symbol_list_cp = next_item_cp;
|
||||
}
|
||||
} /* ecma_free_symbol_list */
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
|
||||
/**
|
||||
* Free string list
|
||||
@@ -110,7 +110,7 @@ ecma_free_number_list (jmem_cpointer_t number_list_cp) /**< number list */
|
||||
}
|
||||
} /* ecma_free_number_list */
|
||||
|
||||
#if ENABLED (JERRY_BUILTIN_BIGINT)
|
||||
#if JERRY_BUILTIN_BIGINT
|
||||
|
||||
/**
|
||||
* Free bigint list
|
||||
@@ -140,7 +140,7 @@ ecma_free_bigint_list (jmem_cpointer_t bigint_list_cp) /**< bigint list */
|
||||
}
|
||||
} /* ecma_free_bigint_list */
|
||||
|
||||
#endif /* ENABLED (JERRY_BUILTIN_BIGINT) */
|
||||
#endif /* JERRY_BUILTIN_BIGINT */
|
||||
|
||||
/**
|
||||
* Finalize literal storage
|
||||
@@ -148,14 +148,14 @@ ecma_free_bigint_list (jmem_cpointer_t bigint_list_cp) /**< bigint list */
|
||||
void
|
||||
ecma_finalize_lit_storage (void)
|
||||
{
|
||||
#if ENABLED (JERRY_ESNEXT)
|
||||
#if JERRY_ESNEXT
|
||||
ecma_free_symbol_list (JERRY_CONTEXT (symbol_list_first_cp));
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
ecma_free_string_list (JERRY_CONTEXT (string_list_first_cp));
|
||||
ecma_free_number_list (JERRY_CONTEXT (number_list_first_cp));
|
||||
#if ENABLED (JERRY_BUILTIN_BIGINT)
|
||||
#if JERRY_BUILTIN_BIGINT
|
||||
ecma_free_bigint_list (JERRY_CONTEXT (bigint_list_first_cp));
|
||||
#endif /* ENABLED (JERRY_BUILTIN_BIGINT) */
|
||||
#endif /* JERRY_BUILTIN_BIGINT */
|
||||
} /* ecma_finalize_lit_storage */
|
||||
|
||||
/**
|
||||
@@ -306,7 +306,7 @@ ecma_find_or_create_literal_number (ecma_number_t number_arg) /**< number to be
|
||||
return num;
|
||||
} /* ecma_find_or_create_literal_number */
|
||||
|
||||
#if ENABLED (JERRY_BUILTIN_BIGINT)
|
||||
#if JERRY_BUILTIN_BIGINT
|
||||
|
||||
/**
|
||||
* Find or create a literal BigInt.
|
||||
@@ -381,7 +381,7 @@ ecma_find_or_create_literal_bigint (ecma_value_t bigint) /**< bigint to be searc
|
||||
return bigint;
|
||||
} /* ecma_find_or_create_literal_bigint */
|
||||
|
||||
#endif /* ENABLED (JERRY_BUILTIN_BIGINT) */
|
||||
#endif /* JERRY_BUILTIN_BIGINT */
|
||||
|
||||
/**
|
||||
* Log2 of snapshot literal alignment.
|
||||
@@ -403,14 +403,14 @@ ecma_find_or_create_literal_bigint (ecma_value_t bigint) /**< bigint to be searc
|
||||
*/
|
||||
#define JERRY_SNAPSHOT_LITERAL_IS_NUMBER (1u << ECMA_VALUE_SHIFT)
|
||||
|
||||
#if ENABLED (JERRY_BUILTIN_BIGINT)
|
||||
#if JERRY_BUILTIN_BIGINT
|
||||
/**
|
||||
* Literal value is BigInt.
|
||||
*/
|
||||
#define JERRY_SNAPSHOT_LITERAL_IS_BIGINT (2u << ECMA_VALUE_SHIFT)
|
||||
#endif /* ENABLED (JERRY_BUILTIN_BIGINT) */
|
||||
#endif /* JERRY_BUILTIN_BIGINT */
|
||||
|
||||
#if ENABLED (JERRY_SNAPSHOT_SAVE)
|
||||
#if JERRY_SNAPSHOT_SAVE
|
||||
|
||||
/**
|
||||
* Append the value at the end of the appropriate list if it is not present there.
|
||||
@@ -420,9 +420,9 @@ void ecma_save_literals_append_value (ecma_value_t value, /**< value to be appen
|
||||
{
|
||||
/* Unlike direct numbers, direct strings are converted to character literals. */
|
||||
if (!ecma_is_value_string (value)
|
||||
#if ENABLED (JERRY_BUILTIN_BIGINT)
|
||||
#if JERRY_BUILTIN_BIGINT
|
||||
&& (!ecma_is_value_bigint (value) || value == ECMA_BIGINT_ZERO)
|
||||
#endif /* ENABLED (JERRY_BUILTIN_BIGINT) */
|
||||
#endif /* JERRY_BUILTIN_BIGINT */
|
||||
&& !ecma_is_value_float_number (value))
|
||||
{
|
||||
return;
|
||||
@@ -558,7 +558,7 @@ ecma_save_literals_for_snapshot (ecma_collection_t *lit_pool_p, /**< list of kno
|
||||
{
|
||||
lit_table_size += (uint32_t) sizeof (ecma_number_t);
|
||||
}
|
||||
#if ENABLED (JERRY_BUILTIN_BIGINT)
|
||||
#if JERRY_BUILTIN_BIGINT
|
||||
else if (ecma_is_value_bigint (lit_buffer_p[i]))
|
||||
{
|
||||
ecma_extended_primitive_t *bigint_p = ecma_get_extended_primitive_from_value (lit_buffer_p[i]);
|
||||
@@ -566,7 +566,7 @@ ecma_save_literals_for_snapshot (ecma_collection_t *lit_pool_p, /**< list of kno
|
||||
lit_table_size += (uint32_t) JERRY_ALIGNUP (sizeof (uint32_t) + ECMA_BIGINT_GET_SIZE (bigint_p),
|
||||
JERRY_SNAPSHOT_LITERAL_ALIGNMENT);
|
||||
}
|
||||
#endif /* ENABLED (JERRY_BUILTIN_BIGINT) */
|
||||
#endif /* JERRY_BUILTIN_BIGINT */
|
||||
else
|
||||
{
|
||||
ecma_string_t *string_p = ecma_get_string_from_value (lit_buffer_p[i]);
|
||||
@@ -617,7 +617,7 @@ ecma_save_literals_for_snapshot (ecma_collection_t *lit_pool_p, /**< list of kno
|
||||
|
||||
length = JERRY_ALIGNUP (sizeof (ecma_number_t), JERRY_SNAPSHOT_LITERAL_ALIGNMENT);
|
||||
}
|
||||
#if ENABLED (JERRY_BUILTIN_BIGINT)
|
||||
#if JERRY_BUILTIN_BIGINT
|
||||
else if (ecma_is_value_bigint (lit_buffer_p[i]))
|
||||
{
|
||||
map_p->literal_offset |= JERRY_SNAPSHOT_LITERAL_IS_BIGINT;
|
||||
@@ -630,7 +630,7 @@ ecma_save_literals_for_snapshot (ecma_collection_t *lit_pool_p, /**< list of kno
|
||||
|
||||
length = JERRY_ALIGNUP (sizeof (uint32_t) + size, JERRY_SNAPSHOT_LITERAL_ALIGNMENT);
|
||||
}
|
||||
#endif /* ENABLED (JERRY_BUILTIN_BIGINT) */
|
||||
#endif /* JERRY_BUILTIN_BIGINT */
|
||||
else
|
||||
{
|
||||
ecma_string_t *string_p = ecma_get_string_from_value (lit_buffer_p[i]);
|
||||
@@ -654,9 +654,9 @@ ecma_save_literals_for_snapshot (ecma_collection_t *lit_pool_p, /**< list of kno
|
||||
return true;
|
||||
} /* ecma_save_literals_for_snapshot */
|
||||
|
||||
#endif /* ENABLED (JERRY_SNAPSHOT_SAVE) */
|
||||
#endif /* JERRY_SNAPSHOT_SAVE */
|
||||
|
||||
#if ENABLED (JERRY_SNAPSHOT_EXEC) || ENABLED (JERRY_SNAPSHOT_SAVE)
|
||||
#if JERRY_SNAPSHOT_EXEC || JERRY_SNAPSHOT_SAVE
|
||||
|
||||
/**
|
||||
* Get the compressed pointer of a given literal.
|
||||
@@ -678,7 +678,7 @@ ecma_snapshot_get_literal (const uint8_t *literal_base_p, /**< literal start */
|
||||
return ecma_find_or_create_literal_number (num);
|
||||
}
|
||||
|
||||
#if ENABLED (JERRY_BUILTIN_BIGINT)
|
||||
#if JERRY_BUILTIN_BIGINT
|
||||
if (literal_value & JERRY_SNAPSHOT_LITERAL_IS_BIGINT)
|
||||
{
|
||||
uint32_t bigint_sign_and_size = *(uint32_t *) literal_p;
|
||||
@@ -698,7 +698,7 @@ ecma_snapshot_get_literal (const uint8_t *literal_base_p, /**< literal start */
|
||||
memcpy (ECMA_BIGINT_GET_DIGITS (bigint_p, 0), literal_p + sizeof (uint32_t), size);
|
||||
return ecma_find_or_create_literal_bigint (ecma_make_extended_primitive_value (bigint_p, ECMA_TYPE_BIGINT));
|
||||
}
|
||||
#endif /* ENABLED (JERRY_BUILTIN_BIGINT) */
|
||||
#endif /* JERRY_BUILTIN_BIGINT */
|
||||
|
||||
uint16_t length = *(const uint16_t *) literal_p;
|
||||
|
||||
@@ -734,17 +734,17 @@ ecma_snapshot_resolve_serializable_values (ecma_compiled_code_t *compiled_code_p
|
||||
base_p -= argument_end;
|
||||
}
|
||||
|
||||
#if ENABLED (JERRY_ESNEXT)
|
||||
#if JERRY_ESNEXT
|
||||
/* function name */
|
||||
if (CBC_FUNCTION_GET_TYPE (compiled_code_p->status_flags) != CBC_FUNCTION_CONSTRUCTOR)
|
||||
{
|
||||
base_p--;
|
||||
}
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
|
||||
return base_p;
|
||||
} /* ecma_snapshot_resolve_serializable_values */
|
||||
#endif /* ENABLED (JERRY_SNAPSHOT_EXEC) || ENABLED (JERRY_SNAPSHOT_SAVE) */
|
||||
#endif /* JERRY_SNAPSHOT_EXEC || JERRY_SNAPSHOT_SAVE */
|
||||
|
||||
/**
|
||||
* @}
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
* @{
|
||||
*/
|
||||
|
||||
#if ENABLED (JERRY_SNAPSHOT_SAVE)
|
||||
#if JERRY_SNAPSHOT_SAVE
|
||||
/**
|
||||
* Snapshot literal - offset map
|
||||
*/
|
||||
@@ -36,31 +36,31 @@ typedef struct
|
||||
ecma_value_t literal_id; /**< literal id */
|
||||
ecma_value_t literal_offset; /**< literal offset */
|
||||
} lit_mem_to_snapshot_id_map_entry_t;
|
||||
#endif /* ENABLED (JERRY_SNAPSHOT_SAVE) */
|
||||
#endif /* JERRY_SNAPSHOT_SAVE */
|
||||
|
||||
void ecma_finalize_lit_storage (void);
|
||||
|
||||
ecma_value_t ecma_find_or_create_literal_string (const lit_utf8_byte_t *chars_p, lit_utf8_size_t size);
|
||||
ecma_value_t ecma_find_or_create_literal_number (ecma_number_t number_arg);
|
||||
#if ENABLED (JERRY_BUILTIN_BIGINT)
|
||||
#if JERRY_BUILTIN_BIGINT
|
||||
ecma_value_t ecma_find_or_create_literal_bigint (ecma_value_t bigint);
|
||||
#endif /* ENABLED (JERRY_BUILTIN_BIGINT) */
|
||||
#endif /* JERRY_BUILTIN_BIGINT */
|
||||
|
||||
#if ENABLED (JERRY_SNAPSHOT_SAVE)
|
||||
#if JERRY_SNAPSHOT_SAVE
|
||||
void ecma_save_literals_append_value (ecma_value_t value, ecma_collection_t *lit_pool_p);
|
||||
void ecma_save_literals_add_compiled_code (const ecma_compiled_code_t *compiled_code_p,
|
||||
ecma_collection_t *lit_pool_p);
|
||||
bool ecma_save_literals_for_snapshot (ecma_collection_t *lit_pool_p, uint32_t *buffer_p, size_t buffer_size,
|
||||
size_t *in_out_buffer_offset_p, lit_mem_to_snapshot_id_map_entry_t **out_map_p,
|
||||
uint32_t *out_map_len_p);
|
||||
#endif /* ENABLED (JERRY_SNAPSHOT_SAVE) */
|
||||
#endif /* JERRY_SNAPSHOT_SAVE */
|
||||
|
||||
#if ENABLED (JERRY_SNAPSHOT_EXEC) || ENABLED (JERRY_SNAPSHOT_SAVE)
|
||||
#if JERRY_SNAPSHOT_EXEC || JERRY_SNAPSHOT_SAVE
|
||||
ecma_value_t
|
||||
ecma_snapshot_get_literal (const uint8_t *literal_base_p, ecma_value_t literal_value);
|
||||
ecma_value_t *
|
||||
ecma_snapshot_resolve_serializable_values (ecma_compiled_code_t *compiled_code_p, uint8_t *byte_code_end_p);
|
||||
#endif /* ENABLED (JERRY_SNAPSHOT_EXEC) || ENABLED (JERRY_SNAPSHOT_SAVE) */
|
||||
#endif /* JERRY_SNAPSHOT_EXEC || JERRY_SNAPSHOT_SAVE */
|
||||
|
||||
/**
|
||||
* @}
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
#include "lit-char-helpers.h"
|
||||
#include "vm.h"
|
||||
|
||||
#if ENABLED (JERRY_MODULE_SYSTEM)
|
||||
#if JERRY_MODULE_SYSTEM
|
||||
|
||||
/**
|
||||
* Takes a ModuleSpecifier and applies path normalization to it.
|
||||
@@ -551,11 +551,11 @@ ecma_module_evaluate (ecma_module_t *module_p) /**< module */
|
||||
return ECMA_VALUE_EMPTY;
|
||||
}
|
||||
|
||||
#if ENABLED (JERRY_BUILTIN_REALMS)
|
||||
#if JERRY_BUILTIN_REALMS
|
||||
ecma_object_t *global_object_p = (ecma_object_t *) ecma_op_function_get_realm (module_p->compiled_code_p);
|
||||
#else /* !ENABLED (JERRY_BUILTIN_REALMS) */
|
||||
#else /* !JERRY_BUILTIN_REALMS */
|
||||
ecma_object_t *global_object_p = ecma_builtin_get_global ();
|
||||
#endif /* ENABLED (JERRY_BUILTIN_REALMS) */
|
||||
#endif /* JERRY_BUILTIN_REALMS */
|
||||
|
||||
module_p->state = ECMA_MODULE_STATE_EVALUATING;
|
||||
module_p->scope_p = ecma_create_decl_lex_env (ecma_get_global_environment (global_object_p));
|
||||
@@ -771,12 +771,12 @@ ecma_module_connect_imports (ecma_module_t *module_p)
|
||||
|
||||
ecma_value_t status = ecma_op_has_binding (lex_env_p, import_names_p->local_name_p);
|
||||
|
||||
#if ENABLED (JERRY_BUILTIN_PROXY)
|
||||
#if JERRY_BUILTIN_PROXY
|
||||
if (ECMA_IS_VALUE_ERROR (status))
|
||||
{
|
||||
return status;
|
||||
}
|
||||
#endif /* ENABLED (JERRY_BUILTIN_PROXY) */
|
||||
#endif /* JERRY_BUILTIN_PROXY */
|
||||
|
||||
if (ecma_is_value_true (status))
|
||||
{
|
||||
@@ -1010,7 +1010,7 @@ ecma_module_parse (ecma_module_t *module_p) /**< module */
|
||||
ecma_module_t *prev_module_p = JERRY_CONTEXT (module_current_p);
|
||||
JERRY_CONTEXT (module_current_p) = module_p;
|
||||
|
||||
#if ENABLED (JERRY_DEBUGGER) && ENABLED (JERRY_PARSER)
|
||||
#if JERRY_DEBUGGER && JERRY_PARSER
|
||||
if (JERRY_CONTEXT (debugger_flags) & JERRY_DEBUGGER_CONNECTED)
|
||||
{
|
||||
jerry_debugger_send_string (JERRY_DEBUGGER_SOURCE_CODE_NAME,
|
||||
@@ -1018,7 +1018,7 @@ ecma_module_parse (ecma_module_t *module_p) /**< module */
|
||||
module_path_p,
|
||||
module_path_size - 1);
|
||||
}
|
||||
#endif /* ENABLED (JERRY_DEBUGGER) && ENABLED (JERRY_PARSER) */
|
||||
#endif /* JERRY_DEBUGGER && JERRY_PARSER */
|
||||
|
||||
ecma_compiled_code_t *bytecode_p = parser_parse_script (NULL,
|
||||
0,
|
||||
@@ -1156,4 +1156,4 @@ ecma_module_cleanup (ecma_module_t *head_p) /**< module */
|
||||
head_p = next_p;
|
||||
}
|
||||
} /* ecma_module_cleanup */
|
||||
#endif /* ENABLED (JERRY_MODULE_SYSTEM) */
|
||||
#endif /* JERRY_MODULE_SYSTEM */
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
#include "common.h"
|
||||
#include "ecma-globals.h"
|
||||
|
||||
#if ENABLED (JERRY_MODULE_SYSTEM)
|
||||
#if JERRY_MODULE_SYSTEM
|
||||
|
||||
#define ECMA_MODULE_MAX_PATH 255u
|
||||
|
||||
@@ -131,6 +131,6 @@ void ecma_module_cleanup_context (void);
|
||||
|
||||
void ecma_module_release_module_nodes (ecma_module_node_t *module_node_p);
|
||||
void ecma_module_cleanup (ecma_module_t *head_p);
|
||||
#endif /* ENABLED (JERRY_MODULE_SYSTEM) */
|
||||
#endif /* JERRY_MODULE_SYSTEM */
|
||||
|
||||
#endif /* !ECMA_MODULE_H */
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
* @{
|
||||
*/
|
||||
|
||||
#if ENABLED (JERRY_PROPRETY_HASHMAP)
|
||||
#if JERRY_PROPRETY_HASHMAP
|
||||
|
||||
/**
|
||||
* Compute the total size of the property hashmap.
|
||||
@@ -528,7 +528,7 @@ ecma_property_hashmap_find (ecma_property_hashmap_t *hashmap_p, /**< hashmap */
|
||||
#endif /* !JERRY_NDEBUG */
|
||||
}
|
||||
} /* ecma_property_hashmap_find */
|
||||
#endif /* ENABLED (JERRY_PROPRETY_HASHMAP) */
|
||||
#endif /* JERRY_PROPRETY_HASHMAP */
|
||||
|
||||
/**
|
||||
* @}
|
||||
|
||||
@@ -53,7 +53,7 @@ typedef struct
|
||||
*/
|
||||
} ecma_property_hashmap_t;
|
||||
|
||||
#if ENABLED (JERRY_PROPRETY_HASHMAP)
|
||||
#if JERRY_PROPRETY_HASHMAP
|
||||
|
||||
/**
|
||||
* Simple ecma values
|
||||
@@ -74,7 +74,7 @@ ecma_property_hashmap_delete_status ecma_property_hashmap_delete (ecma_object_t
|
||||
|
||||
ecma_property_t *ecma_property_hashmap_find (ecma_property_hashmap_t *hashmap_p, ecma_string_t *name_p,
|
||||
jmem_cpointer_t *property_real_name_cp);
|
||||
#endif /* ENABLED (JERRY_PROPRETY_HASHMAP) */
|
||||
#endif /* JERRY_PROPRETY_HASHMAP */
|
||||
|
||||
/**
|
||||
* @}
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
#include "ecma-typedarray-object.h"
|
||||
#include "ecma-arraybuffer-object.h"
|
||||
|
||||
#if ENABLED (JERRY_ESNEXT)
|
||||
#if JERRY_ESNEXT
|
||||
|
||||
#define ECMA_BUILTINS_INTERNAL
|
||||
#include "ecma-builtins-internal.h"
|
||||
@@ -188,4 +188,4 @@ ecma_builtin_array_iterator_prototype_object_next (ecma_value_t this_val) /**< t
|
||||
* @}
|
||||
*/
|
||||
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
#include "ecma-builtin-helpers-macro-defines.inc.h"
|
||||
|
||||
#if ENABLED (JERRY_ESNEXT)
|
||||
#if JERRY_ESNEXT
|
||||
|
||||
STRING_VALUE (LIT_GLOBAL_SYMBOL_TO_STRING_TAG,
|
||||
LIT_MAGIC_STRING_ARRAY_ITERATOR_UL,
|
||||
@@ -29,6 +29,6 @@ STRING_VALUE (LIT_GLOBAL_SYMBOL_TO_STRING_TAG,
|
||||
* (property name, C routine name, arguments number or NON_FIXED, value of the routine's length property) */
|
||||
ROUTINE (LIT_MAGIC_STRING_NEXT, ecma_builtin_array_iterator_prototype_object_next, 0, 0)
|
||||
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
|
||||
#include "ecma-builtin-helpers-macro-undefs.inc.h"
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
#include "ecma-builtin-helpers.h"
|
||||
#include "ecma-builtins.h"
|
||||
|
||||
#if ENABLED (JERRY_ESNEXT)
|
||||
#if JERRY_ESNEXT
|
||||
|
||||
#define ECMA_BUILTINS_INTERNAL
|
||||
#include "ecma-builtins-internal.h"
|
||||
@@ -25,4 +25,4 @@
|
||||
#define BUILTIN_UNDERSCORED_ID array_prototype_unscopables
|
||||
#include "ecma-builtin-internal-routines-template.inc.h"
|
||||
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
#include "ecma-builtin-helpers-macro-defines.inc.h"
|
||||
|
||||
#if ENABLED (JERRY_ESNEXT)
|
||||
#if JERRY_ESNEXT
|
||||
|
||||
SIMPLE_VALUE (LIT_MAGIC_STRING_COPY_WITHIN,
|
||||
ECMA_VALUE_TRUE,
|
||||
@@ -61,6 +61,6 @@ SIMPLE_VALUE (LIT_MAGIC_STRING_VALUES,
|
||||
ECMA_VALUE_TRUE,
|
||||
ECMA_PROPERTY_CONFIGURABLE_ENUMERABLE_WRITABLE)
|
||||
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
|
||||
#include "ecma-builtin-helpers-macro-undefs.inc.h"
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
#include "lit-char-helpers.h"
|
||||
#include "jrt.h"
|
||||
|
||||
#if ENABLED (JERRY_BUILTIN_ARRAY)
|
||||
#if JERRY_BUILTIN_ARRAY
|
||||
|
||||
#define ECMA_BUILTINS_INTERNAL
|
||||
#include "ecma-builtins-internal.h"
|
||||
@@ -46,9 +46,9 @@ enum
|
||||
{
|
||||
ECMA_ARRAY_PROTOTYPE_ROUTINE_START = 0,
|
||||
/* Note: these 2 routine ids must be in this order */
|
||||
#if !ENABLED (JERRY_ESNEXT)
|
||||
#if !JERRY_ESNEXT
|
||||
ECMA_ARRAY_PROTOTYPE_TO_STRING,
|
||||
#endif /* !ENABLED (JERRY_ESNEXT) */
|
||||
#endif /* !JERRY_ESNEXT */
|
||||
ECMA_ARRAY_PROTOTYPE_SORT,
|
||||
ECMA_ARRAY_PROTOTYPE_CONCAT,
|
||||
ECMA_ARRAY_PROTOTYPE_TO_LOCALE_STRING,
|
||||
@@ -187,16 +187,16 @@ ecma_builtin_array_prototype_object_concat (const ecma_value_t args[], /**< argu
|
||||
ecma_object_t *obj_p) /**< array object */
|
||||
{
|
||||
/* 2. */
|
||||
#if ENABLED (JERRY_ESNEXT)
|
||||
#if JERRY_ESNEXT
|
||||
ecma_object_t *new_array_p = ecma_op_array_species_create (obj_p, 0);
|
||||
|
||||
if (JERRY_UNLIKELY (new_array_p == NULL))
|
||||
{
|
||||
return ECMA_VALUE_ERROR;
|
||||
}
|
||||
#else /* !ENABLED (JERRY_ESNEXT) */
|
||||
#else /* !JERRY_ESNEXT */
|
||||
ecma_object_t *new_array_p = ecma_op_new_array_object (0);
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
|
||||
ecma_length_t new_length = 0;
|
||||
|
||||
@@ -459,7 +459,7 @@ ecma_builtin_array_prototype_object_push (const ecma_value_t *argument_list_p, /
|
||||
return ecma_make_uint32_value (new_length);
|
||||
}
|
||||
|
||||
#if ENABLED (JERRY_ESNEXT)
|
||||
#if JERRY_ESNEXT
|
||||
/* 5. */
|
||||
if ((ecma_number_t) (length + arguments_number) > ECMA_NUMBER_MAX_SAFE_INTEGER)
|
||||
{
|
||||
@@ -479,7 +479,7 @@ ecma_builtin_array_prototype_object_push (const ecma_value_t *argument_list_p, /
|
||||
}
|
||||
|
||||
ecma_number_t n = (ecma_number_t) length;
|
||||
#else /* ENABLED (JERRY_ESNEXT) */
|
||||
#else /* JERRY_ESNEXT */
|
||||
ecma_number_t n = (ecma_number_t) length;
|
||||
|
||||
/* 5. */
|
||||
@@ -496,7 +496,7 @@ ecma_builtin_array_prototype_object_push (const ecma_value_t *argument_list_p, /
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
/* 6 - 7. */
|
||||
ecma_value_t set_length_value = ecma_builtin_array_prototype_helper_set_length (obj_p, n);
|
||||
|
||||
@@ -553,18 +553,18 @@ ecma_builtin_array_prototype_object_reverse (ecma_value_t this_arg, /**< this ar
|
||||
ecma_string_t *lower_str_p = ecma_new_ecma_string_from_length (lower);
|
||||
ecma_string_t *upper_str_p = ecma_new_ecma_string_from_length (upper);
|
||||
|
||||
#if ENABLED (JERRY_ESNEXT)
|
||||
#if JERRY_ESNEXT
|
||||
ecma_value_t lower_value = ECMA_VALUE_EMPTY;
|
||||
ecma_value_t upper_value = ECMA_VALUE_EMPTY;
|
||||
|
||||
ecma_value_t has_lower = ecma_op_object_has_property (obj_p, lower_str_p);
|
||||
|
||||
#if ENABLED (JERRY_BUILTIN_PROXY)
|
||||
#if JERRY_BUILTIN_PROXY
|
||||
if (ECMA_IS_VALUE_ERROR (has_lower))
|
||||
{
|
||||
goto clean_up;
|
||||
}
|
||||
#endif /* ENABLED (JERRY_BUILTIN_PROXY) */
|
||||
#endif /* JERRY_BUILTIN_PROXY */
|
||||
|
||||
bool lower_exist = ecma_is_value_true (has_lower);
|
||||
|
||||
@@ -580,12 +580,12 @@ ecma_builtin_array_prototype_object_reverse (ecma_value_t this_arg, /**< this ar
|
||||
|
||||
ecma_value_t has_upper = ecma_op_object_has_property (obj_p, upper_str_p);
|
||||
|
||||
#if ENABLED (JERRY_BUILTIN_PROXY)
|
||||
#if JERRY_BUILTIN_PROXY
|
||||
if (ECMA_IS_VALUE_ERROR (has_upper))
|
||||
{
|
||||
goto clean_up;
|
||||
}
|
||||
#endif /* ENABLED (JERRY_BUILTIN_PROXY) */
|
||||
#endif /* JERRY_BUILTIN_PROXY */
|
||||
|
||||
bool upper_exist = ecma_is_value_true (has_upper);
|
||||
|
||||
@@ -598,7 +598,7 @@ ecma_builtin_array_prototype_object_reverse (ecma_value_t this_arg, /**< this ar
|
||||
goto clean_up;
|
||||
}
|
||||
}
|
||||
#else /* !ENABLED (JERRY_ESNEXT) */
|
||||
#else /* !JERRY_ESNEXT */
|
||||
ecma_value_t lower_value = ecma_op_object_get (obj_p, lower_str_p);
|
||||
|
||||
if (ECMA_IS_VALUE_ERROR (lower_value))
|
||||
@@ -620,7 +620,7 @@ ecma_builtin_array_prototype_object_reverse (ecma_value_t this_arg, /**< this ar
|
||||
|
||||
bool lower_exist = ecma_is_value_true (has_lower);
|
||||
bool upper_exist = ecma_is_value_true (has_upper);
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
|
||||
if (lower_exist && upper_exist)
|
||||
{
|
||||
@@ -843,7 +843,7 @@ ecma_builtin_array_prototype_object_slice (ecma_value_t arg1, /**< start */
|
||||
|
||||
bool use_fast_path = ecma_op_object_is_fast_array (obj_p);
|
||||
ecma_length_t copied_length = (end > start) ? end - start : 0;
|
||||
#if ENABLED (JERRY_ESNEXT)
|
||||
#if JERRY_ESNEXT
|
||||
ecma_object_t *new_array_p = ecma_op_array_species_create (obj_p, copied_length);
|
||||
|
||||
if (JERRY_UNLIKELY (new_array_p == NULL))
|
||||
@@ -852,9 +852,9 @@ ecma_builtin_array_prototype_object_slice (ecma_value_t arg1, /**< start */
|
||||
}
|
||||
|
||||
use_fast_path &= ecma_op_object_is_fast_array (new_array_p);
|
||||
#else /* !ENABLED (JERRY_ESNEXT) */
|
||||
#else /* !JERRY_ESNEXT */
|
||||
ecma_object_t *new_array_p = ecma_op_new_array_object (0);
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
|
||||
if (use_fast_path && copied_length > 0)
|
||||
{
|
||||
@@ -873,7 +873,7 @@ ecma_builtin_array_prototype_object_slice (ecma_value_t arg1, /**< start */
|
||||
|
||||
ecma_extended_object_t *ext_to_obj_p = (ecma_extended_object_t *) new_array_p;
|
||||
|
||||
#if ENABLED (JERRY_ESNEXT)
|
||||
#if JERRY_ESNEXT
|
||||
uint32_t target_length = ext_to_obj_p->u.array.length;
|
||||
ecma_value_t *to_buffer_p;
|
||||
JERRY_ASSERT (copied_length <= UINT32_MAX);
|
||||
@@ -891,9 +891,9 @@ ecma_builtin_array_prototype_object_slice (ecma_value_t arg1, /**< start */
|
||||
ecma_delete_fast_array_properties (new_array_p, (uint32_t) copied_length);
|
||||
to_buffer_p = ECMA_GET_NON_NULL_POINTER (ecma_value_t, new_array_p->u1.property_list_cp);
|
||||
}
|
||||
#else /* !ENABLED (JERRY_ESNEXT) */
|
||||
#else /* !JERRY_ESNEXT */
|
||||
ecma_value_t *to_buffer_p = ecma_fast_array_extend (new_array_p, copied_length);
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
|
||||
ecma_value_t *from_buffer_p = ECMA_GET_NON_NULL_POINTER (ecma_value_t, obj_p->u1.property_list_cp);
|
||||
|
||||
@@ -902,9 +902,9 @@ ecma_builtin_array_prototype_object_slice (ecma_value_t arg1, /**< start */
|
||||
|
||||
for (uint32_t k = (uint32_t) start; k < (uint32_t) end; k++, n++)
|
||||
{
|
||||
#if ENABLED (JERRY_ESNEXT)
|
||||
#if JERRY_ESNEXT
|
||||
ecma_free_value_if_not_object (to_buffer_p[n]);
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
to_buffer_p[n] = ecma_copy_value_if_not_object (from_buffer_p[k]);
|
||||
}
|
||||
|
||||
@@ -933,30 +933,30 @@ ecma_builtin_array_prototype_object_slice (ecma_value_t arg1, /**< start */
|
||||
{
|
||||
/* 10.c.ii */
|
||||
ecma_value_t put_comp;
|
||||
#if ENABLED (JERRY_ESNEXT)
|
||||
#if JERRY_ESNEXT
|
||||
const uint32_t prop_flags = ECMA_PROPERTY_CONFIGURABLE_ENUMERABLE_WRITABLE | ECMA_IS_THROW;
|
||||
#else /* !ENABLED (JERRY_ESNEXT) */
|
||||
#else /* !JERRY_ESNEXT */
|
||||
const uint32_t prop_flags = ECMA_PROPERTY_CONFIGURABLE_ENUMERABLE_WRITABLE;
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
put_comp = ecma_builtin_helper_def_prop_by_index (new_array_p,
|
||||
n,
|
||||
get_value,
|
||||
prop_flags);
|
||||
ecma_free_value (get_value);
|
||||
|
||||
#if ENABLED (JERRY_ESNEXT)
|
||||
#if JERRY_ESNEXT
|
||||
if (ECMA_IS_VALUE_ERROR (put_comp))
|
||||
{
|
||||
ecma_deref_object (new_array_p);
|
||||
return put_comp;
|
||||
}
|
||||
#else /* !ENABLED (JERRY_ESNEXT) */
|
||||
#else /* !JERRY_ESNEXT */
|
||||
JERRY_ASSERT (ecma_is_value_true (put_comp));
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
}
|
||||
}
|
||||
|
||||
#if ENABLED (JERRY_ESNEXT)
|
||||
#if JERRY_ESNEXT
|
||||
ecma_value_t set_length_value = ecma_builtin_array_prototype_helper_set_length (new_array_p, ((ecma_number_t) n));
|
||||
|
||||
if (ECMA_IS_VALUE_ERROR (set_length_value))
|
||||
@@ -964,7 +964,7 @@ ecma_builtin_array_prototype_object_slice (ecma_value_t arg1, /**< start */
|
||||
ecma_deref_object (new_array_p);
|
||||
return set_length_value;
|
||||
}
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
|
||||
return ecma_make_object_value (new_array_p);
|
||||
} /* ecma_builtin_array_prototype_object_slice */
|
||||
@@ -1291,7 +1291,7 @@ ecma_builtin_array_prototype_object_splice (const ecma_value_t args[], /**< argu
|
||||
|
||||
ecma_length_t new_length = len + insert_count - actual_delete_count;
|
||||
|
||||
#if ENABLED (JERRY_ESNEXT)
|
||||
#if JERRY_ESNEXT
|
||||
/* ES11: 8. */
|
||||
if ((ecma_number_t) new_length > ECMA_NUMBER_MAX_SAFE_INTEGER)
|
||||
{
|
||||
@@ -1305,10 +1305,10 @@ ecma_builtin_array_prototype_object_splice (const ecma_value_t args[], /**< argu
|
||||
{
|
||||
return ECMA_VALUE_ERROR;
|
||||
}
|
||||
#else /* !ENABLED (JERRY_ESNEXT) */
|
||||
#else /* !JERRY_ESNEXT */
|
||||
/* ES5.1: 2. */
|
||||
ecma_object_t *new_array_p = ecma_op_new_array_object (actual_delete_count);
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
|
||||
/* ES5.1: 8, ES11: 10. */
|
||||
ecma_length_t k = 0;
|
||||
@@ -1327,11 +1327,11 @@ ecma_builtin_array_prototype_object_splice (const ecma_value_t args[], /**< argu
|
||||
|
||||
if (ecma_is_value_found (from_present))
|
||||
{
|
||||
#if ENABLED (JERRY_ESNEXT)
|
||||
#if JERRY_ESNEXT
|
||||
const uint32_t prop_flags = ECMA_PROPERTY_CONFIGURABLE_ENUMERABLE_WRITABLE | ECMA_IS_THROW;
|
||||
#else /* !ENABLED (JERRY_ESNEXT) */
|
||||
#else /* !JERRY_ESNEXT */
|
||||
const uint32_t prop_flags = ECMA_PROPERTY_CONFIGURABLE_ENUMERABLE_WRITABLE;
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
|
||||
ecma_value_t put_comp = ecma_builtin_helper_def_prop_by_index (new_array_p,
|
||||
k,
|
||||
@@ -1339,19 +1339,19 @@ ecma_builtin_array_prototype_object_splice (const ecma_value_t args[], /**< argu
|
||||
prop_flags);
|
||||
ecma_free_value (from_present);
|
||||
|
||||
#if ENABLED (JERRY_ESNEXT)
|
||||
#if JERRY_ESNEXT
|
||||
if (ECMA_IS_VALUE_ERROR (put_comp))
|
||||
{
|
||||
ecma_deref_object (new_array_p);
|
||||
return put_comp;
|
||||
}
|
||||
#else /* !ENABLED (JERRY_ESNEXT) */
|
||||
#else /* !JERRY_ESNEXT */
|
||||
JERRY_ASSERT (ecma_is_value_true (put_comp));
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
}
|
||||
}
|
||||
|
||||
#if ENABLED (JERRY_ESNEXT)
|
||||
#if JERRY_ESNEXT
|
||||
/* ES11: 12. */
|
||||
ecma_value_t set_length = ecma_builtin_array_prototype_helper_set_length (new_array_p,
|
||||
((ecma_number_t) actual_delete_count));
|
||||
@@ -1361,7 +1361,7 @@ ecma_builtin_array_prototype_object_splice (const ecma_value_t args[], /**< argu
|
||||
ecma_deref_object (new_array_p);
|
||||
return set_length;
|
||||
}
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
|
||||
/* ES5.1: 12, ES11: 15. */
|
||||
if (insert_count < actual_delete_count)
|
||||
@@ -1531,20 +1531,20 @@ ecma_builtin_array_prototype_object_unshift (const ecma_value_t args[], /**< arg
|
||||
}
|
||||
}
|
||||
|
||||
#if ENABLED (JERRY_ESNEXT)
|
||||
#if JERRY_ESNEXT
|
||||
const bool should_iterate = args_number > 0;
|
||||
#else /* !ENABLED (JERRY_ESNEXT) */
|
||||
#else /* !JERRY_ESNEXT */
|
||||
const bool should_iterate = true;
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
if (should_iterate)
|
||||
{
|
||||
#if ENABLED (JERRY_ESNEXT)
|
||||
#if JERRY_ESNEXT
|
||||
/* ES11:4.a. */
|
||||
if ((ecma_number_t) (len + args_number) > ECMA_NUMBER_MAX_SAFE_INTEGER)
|
||||
{
|
||||
return ecma_raise_type_error (ECMA_ERR_MSG ("Unshift elements over 2**53-1 length is disallowed"));
|
||||
}
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
|
||||
/* ES5.1:5.,6. ES11: 4.b, 4.c */
|
||||
for (ecma_length_t k = len; k > 0; k--)
|
||||
@@ -1936,16 +1936,16 @@ ecma_builtin_array_prototype_object_map (ecma_value_t arg1, /**< callbackfn */
|
||||
}
|
||||
|
||||
/* 6. */
|
||||
#if ENABLED (JERRY_ESNEXT)
|
||||
#if JERRY_ESNEXT
|
||||
ecma_object_t *new_array_p = ecma_op_array_species_create (obj_p, len);
|
||||
|
||||
if (JERRY_UNLIKELY (new_array_p == NULL))
|
||||
{
|
||||
return ECMA_VALUE_ERROR;
|
||||
}
|
||||
#else /* !ENABLED (JERRY_ESNEXT) */
|
||||
#else /* !JERRY_ESNEXT */
|
||||
ecma_object_t *new_array_p = ecma_op_new_array_object (len);
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
|
||||
JERRY_ASSERT (ecma_is_value_object (arg1));
|
||||
ecma_object_t *func_object_p = ecma_get_object_from_value (arg1);
|
||||
@@ -1981,11 +1981,11 @@ ecma_builtin_array_prototype_object_map (ecma_value_t arg1, /**< callbackfn */
|
||||
|
||||
/* 8.c.iii */
|
||||
ecma_value_t put_comp;
|
||||
#if ENABLED (JERRY_ESNEXT)
|
||||
#if JERRY_ESNEXT
|
||||
const uint32_t prop_flags = ECMA_PROPERTY_CONFIGURABLE_ENUMERABLE_WRITABLE | ECMA_IS_THROW;
|
||||
#else /* !ENABLED (JERRY_ESNEXT) */
|
||||
#else /* !JERRY_ESNEXT */
|
||||
const uint32_t prop_flags = ECMA_PROPERTY_CONFIGURABLE_ENUMERABLE_WRITABLE;
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
put_comp = ecma_builtin_helper_def_prop_by_index (new_array_p,
|
||||
index,
|
||||
mapped_value,
|
||||
@@ -1993,15 +1993,15 @@ ecma_builtin_array_prototype_object_map (ecma_value_t arg1, /**< callbackfn */
|
||||
|
||||
ecma_free_value (mapped_value);
|
||||
ecma_free_value (current_value);
|
||||
#if ENABLED (JERRY_ESNEXT)
|
||||
#if JERRY_ESNEXT
|
||||
if (ECMA_IS_VALUE_ERROR (put_comp))
|
||||
{
|
||||
ecma_deref_object (new_array_p);
|
||||
return put_comp;
|
||||
}
|
||||
#else /* !ENABLED (JERRY_ESNEXT) */
|
||||
#else /* !JERRY_ESNEXT */
|
||||
JERRY_ASSERT (ecma_is_value_true (put_comp));
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2030,7 +2030,7 @@ ecma_builtin_array_prototype_object_filter (ecma_value_t arg1, /**< callbackfn *
|
||||
}
|
||||
|
||||
/* 6. */
|
||||
#if ENABLED (JERRY_ESNEXT)
|
||||
#if JERRY_ESNEXT
|
||||
ecma_object_t *new_array_p = ecma_op_array_species_create (obj_p, 0);
|
||||
|
||||
if (JERRY_UNLIKELY (new_array_p == NULL))
|
||||
@@ -2040,12 +2040,12 @@ ecma_builtin_array_prototype_object_filter (ecma_value_t arg1, /**< callbackfn *
|
||||
|
||||
/* ES11: 22.1.3.7. 7.c.iii.1 */
|
||||
const uint32_t prop_flags = ECMA_PROPERTY_CONFIGURABLE_ENUMERABLE_WRITABLE | ECMA_IS_THROW;
|
||||
#else /* !ENABLED (JERRY_ESNEXT) */
|
||||
#else /* !JERRY_ESNEXT */
|
||||
ecma_object_t *new_array_p = ecma_op_new_array_object (0);
|
||||
|
||||
/* ES5.1: 15.4.4.20. 9.c.iii.1 */
|
||||
const uint32_t prop_flags = ECMA_PROPERTY_CONFIGURABLE_ENUMERABLE_WRITABLE;
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
|
||||
/* We already checked that arg1 is callable, so it will always be an object. */
|
||||
JERRY_ASSERT (ecma_is_value_object (arg1));
|
||||
@@ -2091,7 +2091,7 @@ ecma_builtin_array_prototype_object_filter (ecma_value_t arg1, /**< callbackfn *
|
||||
new_array_index,
|
||||
get_value,
|
||||
prop_flags);
|
||||
#if ENABLED (JERRY_ESNEXT)
|
||||
#if JERRY_ESNEXT
|
||||
if (ECMA_IS_VALUE_ERROR (put_comp))
|
||||
{
|
||||
ecma_free_value (call_value);
|
||||
@@ -2100,9 +2100,9 @@ ecma_builtin_array_prototype_object_filter (ecma_value_t arg1, /**< callbackfn *
|
||||
|
||||
return put_comp;
|
||||
}
|
||||
#else /* !ENABLED (JERRY_ESNEXT) */
|
||||
#else /* !JERRY_ESNEXT */
|
||||
JERRY_ASSERT (ecma_is_value_true (put_comp));
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
new_array_index++;
|
||||
}
|
||||
|
||||
@@ -2238,7 +2238,7 @@ ecma_builtin_array_reduce_from (const ecma_value_t args_p[], /**< routine's argu
|
||||
return accumulator;
|
||||
} /* ecma_builtin_array_reduce_from */
|
||||
|
||||
#if ENABLED (JERRY_ESNEXT)
|
||||
#if JERRY_ESNEXT
|
||||
|
||||
/**
|
||||
* The Array.prototype object's 'fill' routine
|
||||
@@ -2864,7 +2864,7 @@ ecma_builtin_array_prototype_object_flat_map (ecma_value_t callback, /**< callba
|
||||
/* 6. */
|
||||
return ecma_make_object_value (new_array_p);
|
||||
} /* ecma_builtin_array_prototype_object_flat_map */
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
|
||||
/**
|
||||
* Dispatcher of the built-in's routines
|
||||
@@ -2892,12 +2892,12 @@ ecma_builtin_array_prototype_dispatch_routine (uint8_t builtin_routine_id, /**<
|
||||
{
|
||||
ecma_value_t ret_value = ECMA_VALUE_EMPTY;
|
||||
|
||||
#if !ENABLED (JERRY_ESNEXT)
|
||||
#if !JERRY_ESNEXT
|
||||
if (builtin_routine_id == ECMA_ARRAY_PROTOTYPE_TO_STRING)
|
||||
{
|
||||
ret_value = ecma_array_object_to_string (obj_this);
|
||||
}
|
||||
#endif /* !ENABLED (JERRY_ESNEXT) */
|
||||
#endif /* !JERRY_ESNEXT */
|
||||
if (builtin_routine_id == ECMA_ARRAY_PROTOTYPE_SORT)
|
||||
{
|
||||
ret_value = ecma_builtin_array_prototype_object_sort (this_arg,
|
||||
@@ -2916,7 +2916,7 @@ ecma_builtin_array_prototype_dispatch_routine (uint8_t builtin_routine_id, /**<
|
||||
return ret_value;
|
||||
}
|
||||
|
||||
#if ENABLED (JERRY_ESNEXT)
|
||||
#if JERRY_ESNEXT
|
||||
if (JERRY_UNLIKELY (builtin_routine_id >= ECMA_ARRAY_PROTOTYPE_ENTRIES
|
||||
&& builtin_routine_id <= ECMA_ARRAY_PROTOTYPE_KEYS))
|
||||
{
|
||||
@@ -2935,7 +2935,7 @@ ecma_builtin_array_prototype_dispatch_routine (uint8_t builtin_routine_id, /**<
|
||||
ecma_deref_object (obj_p);
|
||||
return ret_value;
|
||||
}
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
|
||||
ecma_length_t length;
|
||||
ecma_value_t len_value = ecma_op_object_get_length (obj_p, &length);
|
||||
@@ -3054,7 +3054,7 @@ ecma_builtin_array_prototype_dispatch_routine (uint8_t builtin_routine_id, /**<
|
||||
length);
|
||||
break;
|
||||
}
|
||||
#if ENABLED (JERRY_ESNEXT)
|
||||
#if JERRY_ESNEXT
|
||||
case ECMA_ARRAY_PROTOTYPE_COPY_WITHIN:
|
||||
{
|
||||
ret_value = ecma_builtin_array_prototype_object_copy_within (arguments_list_p,
|
||||
@@ -3106,7 +3106,7 @@ ecma_builtin_array_prototype_dispatch_routine (uint8_t builtin_routine_id, /**<
|
||||
length);
|
||||
break;
|
||||
}
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
default:
|
||||
{
|
||||
JERRY_ASSERT (builtin_routine_id == ECMA_ARRAY_PROTOTYPE_FILTER);
|
||||
@@ -3131,4 +3131,4 @@ ecma_builtin_array_prototype_dispatch_routine (uint8_t builtin_routine_id, /**<
|
||||
* @}
|
||||
*/
|
||||
|
||||
#endif /* ENABLED (JERRY_BUILTIN_ARRAY) */
|
||||
#endif /* JERRY_BUILTIN_ARRAY */
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
#include "ecma-builtin-helpers-macro-defines.inc.h"
|
||||
|
||||
#if ENABLED (JERRY_BUILTIN_ARRAY)
|
||||
#if JERRY_BUILTIN_ARRAY
|
||||
|
||||
/* Object properties:
|
||||
* (property name, object pointer getter) */
|
||||
@@ -29,12 +29,12 @@ OBJECT_VALUE (LIT_MAGIC_STRING_CONSTRUCTOR,
|
||||
ECMA_BUILTIN_ID_ARRAY,
|
||||
ECMA_PROPERTY_CONFIGURABLE_WRITABLE)
|
||||
|
||||
#if ENABLED (JERRY_ESNEXT)
|
||||
#if JERRY_ESNEXT
|
||||
/* ECMA-262 v6, 22.1.3.31 */
|
||||
OBJECT_VALUE (LIT_GLOBAL_SYMBOL_UNSCOPABLES,
|
||||
ECMA_BUILTIN_ID_ARRAY_PROTOTYPE_UNSCOPABLES,
|
||||
ECMA_PROPERTY_FLAG_CONFIGURABLE)
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
|
||||
/* Number properties:
|
||||
* (property name, object pointer getter) */
|
||||
@@ -47,9 +47,9 @@ NUMBER_VALUE (LIT_MAGIC_STRING_LENGTH,
|
||||
/* Routine properties:
|
||||
* (property name, C routine name, arguments number or NON_FIXED, value of the routine's length property) */
|
||||
ROUTINE (LIT_MAGIC_STRING_TO_LOCALE_STRING_UL, ECMA_ARRAY_PROTOTYPE_TO_LOCALE_STRING, 0, 0)
|
||||
#if !ENABLED (JERRY_ESNEXT)
|
||||
#if !JERRY_ESNEXT
|
||||
ROUTINE (LIT_MAGIC_STRING_TO_STRING_UL, ECMA_ARRAY_PROTOTYPE_TO_STRING, 0, 0)
|
||||
#endif /* !ENABLED (JERRY_ESNEXT) */
|
||||
#endif /* !JERRY_ESNEXT */
|
||||
ROUTINE (LIT_MAGIC_STRING_CONCAT, ECMA_ARRAY_PROTOTYPE_CONCAT, NON_FIXED, 1)
|
||||
ROUTINE (LIT_MAGIC_STRING_JOIN, ECMA_ARRAY_PROTOTYPE_JOIN, 1, 1)
|
||||
ROUTINE (LIT_MAGIC_STRING_POP, ECMA_ARRAY_PROTOTYPE_POP, 0, 0)
|
||||
@@ -71,7 +71,7 @@ ROUTINE (LIT_MAGIC_STRING_FILTER, ECMA_ARRAY_PROTOTYPE_FILTER, 2, 1)
|
||||
/* Note these 2 routines must be in this order */
|
||||
ROUTINE (LIT_MAGIC_STRING_REDUCE, ECMA_ARRAY_PROTOTYPE_REDUCE, 2, 1)
|
||||
ROUTINE (LIT_MAGIC_STRING_REDUCE_RIGHT_UL, ECMA_ARRAY_PROTOTYPE_REDUCE_RIGHT, 2, 1)
|
||||
#if ENABLED (JERRY_ESNEXT)
|
||||
#if JERRY_ESNEXT
|
||||
ROUTINE (LIT_MAGIC_STRING_FIND, ECMA_ARRAY_PROTOTYPE_FIND, 2, 1)
|
||||
ROUTINE (LIT_MAGIC_STRING_FIND_INDEX, ECMA_ARRAY_PROTOTYPE_FIND_INDEX, 2, 1)
|
||||
ROUTINE (LIT_MAGIC_STRING_FILL, ECMA_ARRAY_PROTOTYPE_FILL, 3, 1)
|
||||
@@ -87,8 +87,8 @@ INTRINSIC_PROPERTY (LIT_MAGIC_STRING_VALUES, LIT_INTERNAL_MAGIC_STRING_ARRAY_PRO
|
||||
ECMA_PROPERTY_CONFIGURABLE_WRITABLE)
|
||||
INTRINSIC_PROPERTY (LIT_GLOBAL_SYMBOL_ITERATOR, LIT_INTERNAL_MAGIC_STRING_ARRAY_PROTOTYPE_VALUES,
|
||||
ECMA_PROPERTY_CONFIGURABLE_WRITABLE)
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
|
||||
#endif /* ENABLED (JERRY_BUILTIN_ARRAY) */
|
||||
#endif /* JERRY_BUILTIN_ARRAY */
|
||||
|
||||
#include "ecma-builtin-helpers-macro-undefs.inc.h"
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
#include "jcontext.h"
|
||||
#include "jrt.h"
|
||||
|
||||
#if ENABLED (JERRY_BUILTIN_ARRAY)
|
||||
#if JERRY_BUILTIN_ARRAY
|
||||
|
||||
#define ECMA_BUILTINS_INTERNAL
|
||||
#include "ecma-builtins-internal.h"
|
||||
@@ -45,11 +45,11 @@ enum
|
||||
{
|
||||
ECMA_ARRAY_ROUTINE_START = 0,
|
||||
ECMA_ARRAY_ROUTINE_IS_ARRAY,
|
||||
#if ENABLED (JERRY_ESNEXT)
|
||||
#if JERRY_ESNEXT
|
||||
ECMA_ARRAY_ROUTINE_FROM,
|
||||
ECMA_ARRAY_ROUTINE_OF,
|
||||
ECMA_ARRAY_ROUTINE_SPECIES_GET
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
};
|
||||
|
||||
#define BUILTIN_INC_HEADER_NAME "ecma-builtin-array.inc.h"
|
||||
@@ -66,7 +66,7 @@ enum
|
||||
* @{
|
||||
*/
|
||||
|
||||
#if ENABLED (JERRY_ESNEXT)
|
||||
#if JERRY_ESNEXT
|
||||
/**
|
||||
* The Array object's 'from' routine
|
||||
*
|
||||
@@ -468,7 +468,7 @@ ecma_builtin_array_object_of (ecma_value_t this_arg, /**< 'this' argument */
|
||||
return ecma_make_object_value (obj_p);
|
||||
} /* ecma_builtin_array_object_of */
|
||||
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
|
||||
/**
|
||||
* Handle calling [[Call]] of built-in Array object
|
||||
@@ -511,9 +511,9 @@ ecma_builtin_array_dispatch_construct (const ecma_value_t *arguments_list_p, /**
|
||||
{
|
||||
JERRY_ASSERT (arguments_list_len == 0 || arguments_list_p != NULL);
|
||||
|
||||
#if !ENABLED (JERRY_ESNEXT)
|
||||
#if !JERRY_ESNEXT
|
||||
return ecma_builtin_array_dispatch_call (arguments_list_p, arguments_list_len);
|
||||
#else /* ENABLED (JERRY_ESNEXT) */
|
||||
#else /* JERRY_ESNEXT */
|
||||
ecma_object_t *proto_p = ecma_op_get_prototype_from_constructor (JERRY_CONTEXT (current_new_target_p),
|
||||
ECMA_BUILTIN_ID_ARRAY_PROTOTYPE);
|
||||
|
||||
@@ -534,7 +534,7 @@ ecma_builtin_array_dispatch_construct (const ecma_value_t *arguments_list_p, /**
|
||||
ECMA_SET_NON_NULL_POINTER (object_p->u2.prototype_cp, proto_p);
|
||||
ecma_deref_object (proto_p);
|
||||
return result;
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
} /* ecma_builtin_array_dispatch_construct */
|
||||
|
||||
/**
|
||||
@@ -558,7 +558,7 @@ ecma_builtin_array_dispatch_routine (uint8_t builtin_routine_id, /**< built-in w
|
||||
|
||||
return arguments_number > 0 ? ecma_is_value_array (arguments_list_p[0]) : ECMA_VALUE_FALSE;
|
||||
}
|
||||
#if ENABLED (JERRY_ESNEXT)
|
||||
#if JERRY_ESNEXT
|
||||
case ECMA_ARRAY_ROUTINE_FROM:
|
||||
{
|
||||
return ecma_builtin_array_object_from (this_arg, arguments_list_p, arguments_number);
|
||||
@@ -571,7 +571,7 @@ ecma_builtin_array_dispatch_routine (uint8_t builtin_routine_id, /**< built-in w
|
||||
{
|
||||
return ecma_copy_value (this_arg);
|
||||
}
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
default:
|
||||
{
|
||||
JERRY_UNREACHABLE ();
|
||||
@@ -585,4 +585,4 @@ ecma_builtin_array_dispatch_routine (uint8_t builtin_routine_id, /**< built-in w
|
||||
* @}
|
||||
*/
|
||||
|
||||
#endif /* ENABLED (JERRY_BUILTIN_ARRAY) */
|
||||
#endif /* JERRY_BUILTIN_ARRAY */
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
#include "ecma-builtin-helpers-macro-defines.inc.h"
|
||||
|
||||
#if ENABLED (JERRY_BUILTIN_ARRAY)
|
||||
#if JERRY_BUILTIN_ARRAY
|
||||
|
||||
/* Object properties:
|
||||
* (property name, object pointer getter) */
|
||||
@@ -36,16 +36,16 @@ NUMBER_VALUE (LIT_MAGIC_STRING_LENGTH,
|
||||
1,
|
||||
ECMA_PROPERTY_FLAG_DEFAULT_LENGTH)
|
||||
|
||||
#if ENABLED (JERRY_ESNEXT)
|
||||
#if JERRY_ESNEXT
|
||||
STRING_VALUE (LIT_MAGIC_STRING_NAME,
|
||||
LIT_MAGIC_STRING_ARRAY_UL,
|
||||
ECMA_PROPERTY_FLAG_CONFIGURABLE)
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
|
||||
/* Routine properties:
|
||||
* (property name, C routine name, arguments number or NON_FIXED, value of the routine's length property) */
|
||||
ROUTINE (LIT_MAGIC_STRING_IS_ARRAY_UL, ECMA_ARRAY_ROUTINE_IS_ARRAY, 1, 1)
|
||||
#if ENABLED (JERRY_ESNEXT)
|
||||
#if JERRY_ESNEXT
|
||||
ROUTINE (LIT_MAGIC_STRING_FROM, ECMA_ARRAY_ROUTINE_FROM, NON_FIXED, 1)
|
||||
ROUTINE (LIT_MAGIC_STRING_OF, ECMA_ARRAY_ROUTINE_OF, NON_FIXED, 0)
|
||||
|
||||
@@ -53,8 +53,8 @@ ROUTINE (LIT_MAGIC_STRING_OF, ECMA_ARRAY_ROUTINE_OF, NON_FIXED, 0)
|
||||
ACCESSOR_READ_ONLY (LIT_GLOBAL_SYMBOL_SPECIES,
|
||||
ECMA_ARRAY_ROUTINE_SPECIES_GET,
|
||||
ECMA_PROPERTY_FLAG_CONFIGURABLE)
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
|
||||
#endif /* !(ENABLED (JERRY_BUILTIN_ARRAY)) */
|
||||
#endif /* !(JERRY_BUILTIN_ARRAY) */
|
||||
|
||||
#include "ecma-builtin-helpers-macro-undefs.inc.h"
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
#include "jrt.h"
|
||||
#include "jrt-libc-includes.h"
|
||||
|
||||
#if ENABLED (JERRY_BUILTIN_TYPEDARRAY)
|
||||
#if JERRY_BUILTIN_TYPEDARRAY
|
||||
|
||||
#define ECMA_BUILTINS_INTERNAL
|
||||
#include "ecma-builtins-internal.h"
|
||||
@@ -233,4 +233,4 @@ free_new_arraybuffer:
|
||||
* @}
|
||||
*/
|
||||
|
||||
#endif /* ENABLED (JERRY_BUILTIN_TYPEDARRAY) */
|
||||
#endif /* JERRY_BUILTIN_TYPEDARRAY */
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
#include "ecma-builtin-helpers-macro-defines.inc.h"
|
||||
|
||||
#if ENABLED (JERRY_BUILTIN_TYPEDARRAY)
|
||||
#if JERRY_BUILTIN_TYPEDARRAY
|
||||
|
||||
/* Object properties:
|
||||
* (property name, object pointer getter) */
|
||||
@@ -42,6 +42,6 @@ STRING_VALUE (LIT_GLOBAL_SYMBOL_TO_STRING_TAG,
|
||||
* (property name, C routine name, arguments number or NON_FIXED, value of the routine's length property) */
|
||||
ROUTINE (LIT_MAGIC_STRING_SLICE, ecma_builtin_arraybuffer_prototype_object_slice, NON_FIXED, 2)
|
||||
|
||||
#endif /* ENABLED (JERRY_BUILTIN_TYPEDARRAY) */
|
||||
#endif /* JERRY_BUILTIN_TYPEDARRAY */
|
||||
|
||||
#include "ecma-builtin-helpers-macro-undefs.inc.h"
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
#include "ecma-typedarray-object.h"
|
||||
#include "jrt.h"
|
||||
|
||||
#if ENABLED (JERRY_BUILTIN_TYPEDARRAY)
|
||||
#if JERRY_BUILTIN_TYPEDARRAY
|
||||
|
||||
#define ECMA_BUILTINS_INTERNAL
|
||||
#include "ecma-builtins-internal.h"
|
||||
@@ -110,4 +110,4 @@ ecma_builtin_arraybuffer_species_get (ecma_value_t this_value) /**< This Value *
|
||||
* @}
|
||||
*/
|
||||
|
||||
#endif /* ENABLED (JERRY_BUILTIN_TYPEDARRAY) */
|
||||
#endif /* JERRY_BUILTIN_TYPEDARRAY */
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
#include "ecma-builtin-helpers-macro-defines.inc.h"
|
||||
|
||||
#if ENABLED (JERRY_BUILTIN_TYPEDARRAY)
|
||||
#if JERRY_BUILTIN_TYPEDARRAY
|
||||
|
||||
/* Number properties:
|
||||
* (property name, number value, writable, enumerable, configurable) */
|
||||
@@ -50,6 +50,6 @@ ACCESSOR_READ_ONLY (LIT_GLOBAL_SYMBOL_SPECIES,
|
||||
ecma_builtin_arraybuffer_species_get,
|
||||
ECMA_PROPERTY_FLAG_CONFIGURABLE)
|
||||
|
||||
#endif /* ENABLED (JERRY_BUILTIN_TYPEDARRAY) */
|
||||
#endif /* JERRY_BUILTIN_TYPEDARRAY */
|
||||
|
||||
#include "ecma-builtin-helpers-macro-undefs.inc.h"
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
|
||||
#include "ecma-globals.h"
|
||||
|
||||
#if ENABLED (JERRY_ESNEXT)
|
||||
#if JERRY_ESNEXT
|
||||
|
||||
#define ECMA_BUILTINS_INTERNAL
|
||||
#include "ecma-builtins-internal.h"
|
||||
@@ -40,4 +40,4 @@
|
||||
* @}
|
||||
*/
|
||||
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
#include "ecma-builtin-helpers-macro-defines.inc.h"
|
||||
|
||||
#if ENABLED (JERRY_ESNEXT)
|
||||
#if JERRY_ESNEXT
|
||||
|
||||
/* ECMA-262 v11, 25.7.3.1 */
|
||||
OBJECT_VALUE (LIT_MAGIC_STRING_CONSTRUCTOR,
|
||||
@@ -31,6 +31,6 @@ STRING_VALUE (LIT_GLOBAL_SYMBOL_TO_STRING_TAG,
|
||||
LIT_MAGIC_STRING_ASYNC_FUNCTION_UL,
|
||||
ECMA_PROPERTY_FLAG_CONFIGURABLE)
|
||||
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
|
||||
#include "ecma-builtin-helpers-macro-undefs.inc.h"
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
|
||||
#include "ecma-globals.h"
|
||||
|
||||
#if ENABLED (JERRY_ESNEXT)
|
||||
#if JERRY_ESNEXT
|
||||
|
||||
#define ECMA_BUILTINS_INTERNAL
|
||||
#include "ecma-builtins-internal.h"
|
||||
@@ -71,4 +71,4 @@ ecma_builtin_async_function_dispatch_construct (const ecma_value_t *arguments_li
|
||||
* @}
|
||||
*/
|
||||
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
#include "ecma-builtin-helpers-macro-defines.inc.h"
|
||||
|
||||
#if ENABLED (JERRY_ESNEXT)
|
||||
#if JERRY_ESNEXT
|
||||
|
||||
/* ECMA-262 v11, 25.7.2 */
|
||||
STRING_VALUE (LIT_MAGIC_STRING_NAME,
|
||||
@@ -41,6 +41,6 @@ STRING_VALUE (LIT_GLOBAL_SYMBOL_TO_STRING_TAG,
|
||||
LIT_MAGIC_STRING_ASYNC_FUNCTION_UL,
|
||||
ECMA_PROPERTY_FLAG_CONFIGURABLE)
|
||||
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
|
||||
#include "ecma-builtin-helpers-macro-undefs.inc.h"
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
|
||||
#include "ecma-globals.h"
|
||||
|
||||
#if ENABLED (JERRY_ESNEXT)
|
||||
#if JERRY_ESNEXT
|
||||
|
||||
#define ECMA_BUILTINS_INTERNAL
|
||||
#include "ecma-builtins-internal.h"
|
||||
@@ -71,4 +71,4 @@ ecma_builtin_async_generator_function_dispatch_construct (const ecma_value_t *ar
|
||||
* @}
|
||||
*/
|
||||
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
#include "ecma-builtin-helpers-macro-defines.inc.h"
|
||||
|
||||
#if ENABLED (JERRY_ESNEXT)
|
||||
#if JERRY_ESNEXT
|
||||
|
||||
/* ECMA-262 v10, 25.3.2 */
|
||||
STRING_VALUE (LIT_MAGIC_STRING_NAME,
|
||||
@@ -36,6 +36,6 @@ OBJECT_VALUE (LIT_MAGIC_STRING_PROTOTYPE,
|
||||
ECMA_BUILTIN_ID_ASYNC_GENERATOR,
|
||||
ECMA_PROPERTY_FIXED)
|
||||
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
|
||||
#include "ecma-builtin-helpers-macro-undefs.inc.h"
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
#include "opcodes.h"
|
||||
#include "vm-defines.h"
|
||||
|
||||
#if ENABLED (JERRY_ESNEXT)
|
||||
#if JERRY_ESNEXT
|
||||
|
||||
#define ECMA_BUILTINS_INTERNAL
|
||||
#include "ecma-builtins-internal.h"
|
||||
@@ -144,4 +144,4 @@ ecma_builtin_async_generator_prototype_dispatch_routine (uint8_t builtin_routine
|
||||
* @}
|
||||
*/
|
||||
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
#include "ecma-builtin-helpers-macro-defines.inc.h"
|
||||
|
||||
#if ENABLED (JERRY_ESNEXT)
|
||||
#if JERRY_ESNEXT
|
||||
|
||||
/* Object properties:
|
||||
* (property name, object pointer getter) */
|
||||
@@ -40,6 +40,6 @@ ROUTINE (LIT_MAGIC_STRING_NEXT, ECMA_ASYNC_GENERATOR_PROTOTYPE_ROUTINE_NEXT, 1,
|
||||
ROUTINE (LIT_MAGIC_STRING_RETURN, ECMA_ASYNC_GENERATOR_PROTOTYPE_ROUTINE_RETURN, 1, 1)
|
||||
ROUTINE (LIT_MAGIC_STRING_THROW, ECMA_ASYNC_GENERATOR_PROTOTYPE_ROUTINE_THROW, 1, 1)
|
||||
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
|
||||
#include "ecma-builtin-helpers-macro-undefs.inc.h"
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
|
||||
#include "ecma-globals.h"
|
||||
|
||||
#if ENABLED (JERRY_ESNEXT)
|
||||
#if JERRY_ESNEXT
|
||||
|
||||
#define ECMA_BUILTINS_INTERNAL
|
||||
#include "ecma-builtins-internal.h"
|
||||
@@ -40,4 +40,4 @@
|
||||
* @}
|
||||
*/
|
||||
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
#include "ecma-builtin-helpers-macro-defines.inc.h"
|
||||
|
||||
#if ENABLED (JERRY_ESNEXT)
|
||||
#if JERRY_ESNEXT
|
||||
|
||||
/* ECMA-262 v6, 25.3.2.3.1 */
|
||||
OBJECT_VALUE (LIT_MAGIC_STRING_CONSTRUCTOR,
|
||||
@@ -36,6 +36,6 @@ STRING_VALUE (LIT_GLOBAL_SYMBOL_TO_STRING_TAG,
|
||||
LIT_MAGIC_STRING_ASYNC_GENERATOR_FUNCTION_UL,
|
||||
ECMA_PROPERTY_FLAG_CONFIGURABLE)
|
||||
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
|
||||
#include "ecma-builtin-helpers-macro-undefs.inc.h"
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
#include "ecma-builtins.h"
|
||||
#include "ecma-iterator-object.h"
|
||||
|
||||
#if ENABLED (JERRY_ESNEXT)
|
||||
#if JERRY_ESNEXT
|
||||
|
||||
#define ECMA_BUILTINS_INTERNAL
|
||||
#include "ecma-builtins-internal.h"
|
||||
@@ -60,4 +60,4 @@ ecma_builtin_async_iterator_prototype_object_async_iterator (ecma_value_t this_v
|
||||
* @}
|
||||
*/
|
||||
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
|
||||
@@ -19,12 +19,12 @@
|
||||
|
||||
#include "ecma-builtin-helpers-macro-defines.inc.h"
|
||||
|
||||
#if ENABLED (JERRY_ESNEXT)
|
||||
#if JERRY_ESNEXT
|
||||
|
||||
/* Routine properties:
|
||||
* (property name, C routine name, arguments number or NON_FIXED, value of the routine's length property) */
|
||||
ROUTINE (LIT_GLOBAL_SYMBOL_ASYNC_ITERATOR, ecma_builtin_async_iterator_prototype_object_async_iterator, 0, 0)
|
||||
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
|
||||
#include "ecma-builtin-helpers-macro-undefs.inc.h"
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
#include "ecma-bigint.h"
|
||||
#include "ecma-exceptions.h"
|
||||
|
||||
#if ENABLED (JERRY_BUILTIN_BIGINT)
|
||||
#if JERRY_BUILTIN_BIGINT
|
||||
|
||||
#define ECMA_BUILTINS_INTERNAL
|
||||
#include "ecma-builtins-internal.h"
|
||||
@@ -131,4 +131,4 @@ ecma_builtin_bigint_prototype_object_to_string (ecma_value_t this_arg, /**< this
|
||||
* @}
|
||||
*/
|
||||
|
||||
#endif /* ENABLED (JERRY_BUILTIN_BIGINT) */
|
||||
#endif /* JERRY_BUILTIN_BIGINT */
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
#include "ecma-builtin-helpers-macro-defines.inc.h"
|
||||
|
||||
#if ENABLED (JERRY_BUILTIN_BIGINT)
|
||||
#if JERRY_BUILTIN_BIGINT
|
||||
|
||||
/* Object properties:
|
||||
* (property name, object pointer getter) */
|
||||
@@ -39,6 +39,6 @@ STRING_VALUE (LIT_GLOBAL_SYMBOL_TO_STRING_TAG,
|
||||
ROUTINE (LIT_MAGIC_STRING_VALUE_OF_UL, ecma_builtin_bigint_prototype_object_value_of, 0, 0)
|
||||
ROUTINE (LIT_MAGIC_STRING_TO_STRING_UL, ecma_builtin_bigint_prototype_object_to_string, NON_FIXED, 0)
|
||||
|
||||
#endif /* ENABLED (JERRY_BUILTIN_BIGINT) */
|
||||
#endif /* JERRY_BUILTIN_BIGINT */
|
||||
|
||||
#include "ecma-builtin-helpers-macro-undefs.inc.h"
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
#include "ecma-builtins.h"
|
||||
#include "ecma-exceptions.h"
|
||||
|
||||
#if ENABLED (JERRY_BUILTIN_BIGINT)
|
||||
#if JERRY_BUILTIN_BIGINT
|
||||
|
||||
#define ECMA_BUILTINS_INTERNAL
|
||||
#include "ecma-builtins-internal.h"
|
||||
@@ -77,4 +77,4 @@ ecma_builtin_bigint_dispatch_construct (const ecma_value_t *arguments_list_p, /*
|
||||
* @}
|
||||
*/
|
||||
|
||||
#endif /* ENABLED (JERRY_BUILTIN_BIGINT) */
|
||||
#endif /* JERRY_BUILTIN_BIGINT */
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
#include "ecma-builtin-helpers-macro-defines.inc.h"
|
||||
|
||||
#if ENABLED (JERRY_BUILTIN_BIGINT)
|
||||
#if JERRY_BUILTIN_BIGINT
|
||||
|
||||
/* Number properties:
|
||||
* (property name, number value, writable, enumerable, configurable) */
|
||||
@@ -42,6 +42,6 @@ OBJECT_VALUE (LIT_MAGIC_STRING_PROTOTYPE,
|
||||
ECMA_BUILTIN_ID_BIGINT_PROTOTYPE,
|
||||
ECMA_PROPERTY_FIXED)
|
||||
|
||||
#endif /* ENABLED (JERRY_BUILTIN_BIGINT) */
|
||||
#endif /* JERRY_BUILTIN_BIGINT */
|
||||
|
||||
#include "ecma-builtin-helpers-macro-undefs.inc.h"
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
#include "ecma-string-object.h"
|
||||
#include "jrt.h"
|
||||
|
||||
#if ENABLED (JERRY_BUILTIN_BOOLEAN)
|
||||
#if JERRY_BUILTIN_BOOLEAN
|
||||
|
||||
#define ECMA_BUILTINS_INTERNAL
|
||||
#include "ecma-builtins-internal.h"
|
||||
@@ -137,4 +137,4 @@ ecma_builtin_boolean_prototype_dispatch_routine (uint8_t builtin_routine_id, /**
|
||||
* @}
|
||||
*/
|
||||
|
||||
#endif /* ENABLED (JERRY_BUILTIN_BOOLEAN) */
|
||||
#endif /* JERRY_BUILTIN_BOOLEAN */
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
#include "ecma-builtin-helpers-macro-defines.inc.h"
|
||||
|
||||
#if ENABLED (JERRY_BUILTIN_BOOLEAN)
|
||||
#if JERRY_BUILTIN_BOOLEAN
|
||||
|
||||
/* Object properties:
|
||||
* (property name, object pointer getter) */
|
||||
@@ -34,6 +34,6 @@ OBJECT_VALUE (LIT_MAGIC_STRING_CONSTRUCTOR,
|
||||
ROUTINE (LIT_MAGIC_STRING_TO_STRING_UL, ECMA_BOOLEAN_PROTOTYPE_ROUTINE_TO_STRING, 0, 0)
|
||||
ROUTINE (LIT_MAGIC_STRING_VALUE_OF_UL, ECMA_BOOLEAN_PROTOTYPE_ROUTINE_VALUE_OF, 0, 0)
|
||||
|
||||
#endif /* ENABLED (JERRY_BUILTIN_BOOLEAN) */
|
||||
#endif /* JERRY_BUILTIN_BOOLEAN */
|
||||
|
||||
#include "ecma-builtin-helpers-macro-undefs.inc.h"
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
#include "ecma-objects.h"
|
||||
#include "jrt.h"
|
||||
|
||||
#if ENABLED (JERRY_BUILTIN_BOOLEAN)
|
||||
#if JERRY_BUILTIN_BOOLEAN
|
||||
|
||||
#define ECMA_BUILTINS_INTERNAL
|
||||
#include "ecma-builtins-internal.h"
|
||||
@@ -95,4 +95,4 @@ ecma_builtin_boolean_dispatch_construct (const ecma_value_t *arguments_list_p, /
|
||||
* @}
|
||||
*/
|
||||
|
||||
#endif /* ENABLED (JERRY_BUILTIN_BOOLEAN) */
|
||||
#endif /* JERRY_BUILTIN_BOOLEAN */
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
#include "ecma-builtin-helpers-macro-defines.inc.h"
|
||||
|
||||
#if ENABLED (JERRY_BUILTIN_BOOLEAN)
|
||||
#if JERRY_BUILTIN_BOOLEAN
|
||||
|
||||
/* Object properties:
|
||||
* (property name, object pointer getter) */
|
||||
@@ -36,12 +36,12 @@ NUMBER_VALUE (LIT_MAGIC_STRING_LENGTH,
|
||||
1,
|
||||
ECMA_PROPERTY_FLAG_DEFAULT_LENGTH)
|
||||
|
||||
#if ENABLED (JERRY_ESNEXT)
|
||||
#if JERRY_ESNEXT
|
||||
STRING_VALUE (LIT_MAGIC_STRING_NAME,
|
||||
LIT_MAGIC_STRING_BOOLEAN_UL,
|
||||
ECMA_PROPERTY_FLAG_CONFIGURABLE)
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
|
||||
#endif /* ENABLED (JERRY_BUILTIN_BOOLEAN) */
|
||||
#endif /* JERRY_BUILTIN_BOOLEAN */
|
||||
|
||||
#include "ecma-builtin-helpers-macro-undefs.inc.h"
|
||||
|
||||
@@ -18,11 +18,11 @@
|
||||
#include "ecma-dataview-object.h"
|
||||
#include "ecma-gc.h"
|
||||
|
||||
#if ENABLED (JERRY_BUILTIN_DATAVIEW)
|
||||
#if JERRY_BUILTIN_DATAVIEW
|
||||
|
||||
#if !ENABLED (JERRY_BUILTIN_TYPEDARRAY)
|
||||
#if !JERRY_BUILTIN_TYPEDARRAY
|
||||
#error "DataView builtin requires ES2015 TypedArray builtin"
|
||||
#endif /* !ENABLED (JERRY_BUILTIN_TYPEDARRAY) */
|
||||
#endif /* !JERRY_BUILTIN_TYPEDARRAY */
|
||||
|
||||
#define ECMA_BUILTINS_INTERNAL
|
||||
#include "ecma-builtins-internal.h"
|
||||
@@ -49,13 +49,13 @@ enum
|
||||
ECMA_DATAVIEW_PROTOTYPE_GET_INT32,
|
||||
ECMA_DATAVIEW_PROTOTYPE_GET_UINT32,
|
||||
ECMA_DATAVIEW_PROTOTYPE_GET_FLOAT32,
|
||||
#if ENABLED (JERRY_NUMBER_TYPE_FLOAT64)
|
||||
#if JERRY_NUMBER_TYPE_FLOAT64
|
||||
ECMA_DATAVIEW_PROTOTYPE_GET_FLOAT64,
|
||||
#endif /* ENABLED (JERRY_NUMBER_TYPE_FLOAT64) */
|
||||
#if ENABLED (JERRY_BUILTIN_BIGINT)
|
||||
#endif /* JERRY_NUMBER_TYPE_FLOAT64 */
|
||||
#if JERRY_BUILTIN_BIGINT
|
||||
ECMA_DATAVIEW_PROTOTYPE_GET_BIGINT64,
|
||||
ECMA_DATAVIEW_PROTOTYPE_GET_BIGUINT64,
|
||||
#endif /* ENABLED (JERRY_BUILTIN_BIGINT) */
|
||||
#endif /* JERRY_BUILTIN_BIGINT */
|
||||
ECMA_DATAVIEW_PROTOTYPE_SET_INT8,
|
||||
ECMA_DATAVIEW_PROTOTYPE_SET_UINT8,
|
||||
ECMA_DATAVIEW_PROTOTYPE_SET_UINT8_CLAMPED, /* unused value */
|
||||
@@ -64,13 +64,13 @@ enum
|
||||
ECMA_DATAVIEW_PROTOTYPE_SET_INT32,
|
||||
ECMA_DATAVIEW_PROTOTYPE_SET_UINT32,
|
||||
ECMA_DATAVIEW_PROTOTYPE_SET_FLOAT32,
|
||||
#if ENABLED (JERRY_NUMBER_TYPE_FLOAT64)
|
||||
#if JERRY_NUMBER_TYPE_FLOAT64
|
||||
ECMA_DATAVIEW_PROTOTYPE_SET_FLOAT64,
|
||||
#endif /* ENABLED (JERRY_NUMBER_TYPE_FLOAT64) */
|
||||
#if ENABLED (JERRY_BUILTIN_BIGINT)
|
||||
#endif /* JERRY_NUMBER_TYPE_FLOAT64 */
|
||||
#if JERRY_BUILTIN_BIGINT
|
||||
ECMA_DATAVIEW_PROTOTYPE_SET_BIGINT64,
|
||||
ECMA_DATAVIEW_PROTOTYPE_SET_BIGUINT64,
|
||||
#endif /* ENABLED (JERRY_BUILTIN_BIGINT) */
|
||||
#endif /* JERRY_BUILTIN_BIGINT */
|
||||
};
|
||||
|
||||
#define BUILTIN_INC_HEADER_NAME "ecma-builtin-dataview-prototype.inc.h"
|
||||
@@ -163,17 +163,17 @@ ecma_builtin_dataview_prototype_dispatch_routine (uint8_t builtin_routine_id, /*
|
||||
return ecma_builtin_dataview_prototype_object_getters (this_arg, builtin_routine_id);
|
||||
}
|
||||
case ECMA_DATAVIEW_PROTOTYPE_GET_FLOAT32:
|
||||
#if ENABLED (JERRY_NUMBER_TYPE_FLOAT64)
|
||||
#if JERRY_NUMBER_TYPE_FLOAT64
|
||||
case ECMA_DATAVIEW_PROTOTYPE_GET_FLOAT64:
|
||||
#endif /* ENABLED (JERRY_NUMBER_TYPE_FLOAT64) */
|
||||
#endif /* JERRY_NUMBER_TYPE_FLOAT64 */
|
||||
case ECMA_DATAVIEW_PROTOTYPE_GET_INT16:
|
||||
case ECMA_DATAVIEW_PROTOTYPE_GET_INT32:
|
||||
case ECMA_DATAVIEW_PROTOTYPE_GET_UINT16:
|
||||
case ECMA_DATAVIEW_PROTOTYPE_GET_UINT32:
|
||||
#if ENABLED (JERRY_BUILTIN_BIGINT)
|
||||
#if JERRY_BUILTIN_BIGINT
|
||||
case ECMA_DATAVIEW_PROTOTYPE_GET_BIGINT64:
|
||||
case ECMA_DATAVIEW_PROTOTYPE_GET_BIGUINT64:
|
||||
#endif /* ENABLED (JERRY_BUILTIN_BIGINT) */
|
||||
#endif /* JERRY_BUILTIN_BIGINT */
|
||||
{
|
||||
ecma_value_t little_endian = arguments_number > 1 ? arguments_list_p[1] : ECMA_VALUE_FALSE;
|
||||
ecma_typedarray_type_t id = (ecma_typedarray_type_t) (builtin_routine_id - ECMA_DATAVIEW_PROTOTYPE_GET_INT8);
|
||||
@@ -181,17 +181,17 @@ ecma_builtin_dataview_prototype_dispatch_routine (uint8_t builtin_routine_id, /*
|
||||
return ecma_op_dataview_get_set_view_value (this_arg, byte_offset, little_endian, ECMA_VALUE_EMPTY, id);
|
||||
}
|
||||
case ECMA_DATAVIEW_PROTOTYPE_SET_FLOAT32:
|
||||
#if ENABLED (JERRY_NUMBER_TYPE_FLOAT64)
|
||||
#if JERRY_NUMBER_TYPE_FLOAT64
|
||||
case ECMA_DATAVIEW_PROTOTYPE_SET_FLOAT64:
|
||||
#endif /* ENABLED (JERRY_NUMBER_TYPE_FLOAT64) */
|
||||
#endif /* JERRY_NUMBER_TYPE_FLOAT64 */
|
||||
case ECMA_DATAVIEW_PROTOTYPE_SET_INT16:
|
||||
case ECMA_DATAVIEW_PROTOTYPE_SET_INT32:
|
||||
case ECMA_DATAVIEW_PROTOTYPE_SET_UINT16:
|
||||
case ECMA_DATAVIEW_PROTOTYPE_SET_UINT32:
|
||||
#if ENABLED (JERRY_BUILTIN_BIGINT)
|
||||
#if JERRY_BUILTIN_BIGINT
|
||||
case ECMA_DATAVIEW_PROTOTYPE_SET_BIGINT64:
|
||||
case ECMA_DATAVIEW_PROTOTYPE_SET_BIGUINT64:
|
||||
#endif /* ENABLED (JERRY_BUILTIN_BIGINT) */
|
||||
#endif /* JERRY_BUILTIN_BIGINT */
|
||||
{
|
||||
ecma_value_t value_to_set = arguments_number > 1 ? arguments_list_p[1] : ECMA_VALUE_UNDEFINED;
|
||||
ecma_value_t little_endian = arguments_number > 2 ? arguments_list_p[2] : ECMA_VALUE_FALSE;
|
||||
@@ -224,4 +224,4 @@ ecma_builtin_dataview_prototype_dispatch_routine (uint8_t builtin_routine_id, /*
|
||||
* @}
|
||||
*/
|
||||
|
||||
#endif /* ENABLED (JERRY_BUILTIN_DATAVIEW */
|
||||
#endif /* JERRY_BUILTIN_DATAVIEW */
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
#include "ecma-builtin-helpers-macro-defines.inc.h"
|
||||
|
||||
#if ENABLED (JERRY_BUILTIN_DATAVIEW)
|
||||
#if JERRY_BUILTIN_DATAVIEW
|
||||
|
||||
/* Object properties:
|
||||
* (property name, object pointer getter) */
|
||||
@@ -37,9 +37,9 @@ STRING_VALUE (LIT_GLOBAL_SYMBOL_TO_STRING_TAG,
|
||||
/* Routine properties:
|
||||
* (property name, C routine name, arguments number or NON_FIXED, value of the routine's length property) */
|
||||
ROUTINE (LIT_MAGIC_STRING_GET_FLOAT_32_UL, ECMA_DATAVIEW_PROTOTYPE_GET_FLOAT32, 2, 1)
|
||||
#if ENABLED (JERRY_NUMBER_TYPE_FLOAT64)
|
||||
#if JERRY_NUMBER_TYPE_FLOAT64
|
||||
ROUTINE (LIT_MAGIC_STRING_GET_FLOAT_64_UL, ECMA_DATAVIEW_PROTOTYPE_GET_FLOAT64, 2, 1)
|
||||
#endif /* ENABLED (JERRY_NUMBER_TYPE_FLOAT64) */
|
||||
#endif /* JERRY_NUMBER_TYPE_FLOAT64 */
|
||||
ROUTINE (LIT_MAGIC_STRING_GET_INT8_UL, ECMA_DATAVIEW_PROTOTYPE_GET_INT8, 1, 1)
|
||||
ROUTINE (LIT_MAGIC_STRING_GET_INT16_UL, ECMA_DATAVIEW_PROTOTYPE_GET_INT16, 2, 1)
|
||||
ROUTINE (LIT_MAGIC_STRING_GET_INT32_UL, ECMA_DATAVIEW_PROTOTYPE_GET_INT32, 2, 1)
|
||||
@@ -47,21 +47,21 @@ ROUTINE (LIT_MAGIC_STRING_GET_UINT8_UL, ECMA_DATAVIEW_PROTOTYPE_GET_UINT8, 2, 1)
|
||||
ROUTINE (LIT_MAGIC_STRING_GET_UINT16_UL, ECMA_DATAVIEW_PROTOTYPE_GET_UINT16, 2, 1)
|
||||
ROUTINE (LIT_MAGIC_STRING_GET_UINT32_UL, ECMA_DATAVIEW_PROTOTYPE_GET_UINT32, 2, 1)
|
||||
ROUTINE (LIT_MAGIC_STRING_SET_FLOAT_32_UL, ECMA_DATAVIEW_PROTOTYPE_SET_FLOAT32, 2, 2)
|
||||
#if ENABLED (JERRY_NUMBER_TYPE_FLOAT64)
|
||||
#if JERRY_NUMBER_TYPE_FLOAT64
|
||||
ROUTINE (LIT_MAGIC_STRING_SET_FLOAT_64_UL, ECMA_DATAVIEW_PROTOTYPE_SET_FLOAT64, 2, 2)
|
||||
#endif /* ENABLED (JERRY_NUMBER_TYPE_FLOAT64) */
|
||||
#endif /* JERRY_NUMBER_TYPE_FLOAT64 */
|
||||
ROUTINE (LIT_MAGIC_STRING_SET_INT8_UL, ECMA_DATAVIEW_PROTOTYPE_SET_INT8, 1, 2)
|
||||
ROUTINE (LIT_MAGIC_STRING_SET_INT16_UL, ECMA_DATAVIEW_PROTOTYPE_SET_INT16, 2, 2)
|
||||
ROUTINE (LIT_MAGIC_STRING_SET_INT32_UL, ECMA_DATAVIEW_PROTOTYPE_SET_INT32, 2, 2)
|
||||
ROUTINE (LIT_MAGIC_STRING_SET_UINT8_UL, ECMA_DATAVIEW_PROTOTYPE_SET_UINT8, 2, 2)
|
||||
ROUTINE (LIT_MAGIC_STRING_SET_UINT16_UL, ECMA_DATAVIEW_PROTOTYPE_SET_UINT16, 2, 2)
|
||||
ROUTINE (LIT_MAGIC_STRING_SET_UINT32_UL, ECMA_DATAVIEW_PROTOTYPE_SET_UINT32, 2, 2)
|
||||
#if ENABLED (JERRY_BUILTIN_BIGINT)
|
||||
#if JERRY_BUILTIN_BIGINT
|
||||
ROUTINE (LIT_MAGIC_STRING_GET_BIGINT64, ECMA_DATAVIEW_PROTOTYPE_GET_BIGINT64, 2, 1)
|
||||
ROUTINE (LIT_MAGIC_STRING_GET_BIGUINT64, ECMA_DATAVIEW_PROTOTYPE_GET_BIGUINT64, 2, 1)
|
||||
ROUTINE (LIT_MAGIC_STRING_SET_BIGINT64, ECMA_DATAVIEW_PROTOTYPE_SET_BIGINT64, 2, 2)
|
||||
ROUTINE (LIT_MAGIC_STRING_SET_BIGUINT64, ECMA_DATAVIEW_PROTOTYPE_SET_BIGUINT64, 2, 2)
|
||||
#endif /* ENABLED (JERRY_BUILTIN_BIGINT) */
|
||||
#endif /* JERRY_BUILTIN_BIGINT */
|
||||
|
||||
/* ECMA-262 v6, 24.2.4.1 */
|
||||
ACCESSOR_READ_ONLY (LIT_MAGIC_STRING_BUFFER,
|
||||
@@ -78,6 +78,6 @@ ACCESSOR_READ_ONLY (LIT_MAGIC_STRING_BYTE_OFFSET_UL,
|
||||
ECMA_DATAVIEW_PROTOTYPE_BYTE_OFFSET_GETTER,
|
||||
ECMA_PROPERTY_FLAG_CONFIGURABLE)
|
||||
|
||||
#endif /* ENABLED (JERRY_BUILTIN_DATAVIEW */
|
||||
#endif /* JERRY_BUILTIN_DATAVIEW */
|
||||
|
||||
#include "ecma-builtin-helpers-macro-undefs.inc.h"
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
#include "ecma-exceptions.h"
|
||||
#include "ecma-dataview-object.h"
|
||||
|
||||
#if ENABLED (JERRY_BUILTIN_DATAVIEW)
|
||||
#if JERRY_BUILTIN_DATAVIEW
|
||||
|
||||
#define ECMA_BUILTINS_INTERNAL
|
||||
#include "ecma-builtins-internal.h"
|
||||
@@ -68,4 +68,4 @@ ecma_builtin_dataview_dispatch_construct (const ecma_value_t *arguments_list_p,
|
||||
* @}
|
||||
*/
|
||||
|
||||
#endif /* ENABLED (JERRY_BUILTIN_DATAVIEW */
|
||||
#endif /* JERRY_BUILTIN_DATAVIEW */
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
#include "ecma-builtin-helpers-macro-defines.inc.h"
|
||||
|
||||
#if ENABLED (JERRY_BUILTIN_DATAVIEW)
|
||||
#if JERRY_BUILTIN_DATAVIEW
|
||||
|
||||
/* Number properties:
|
||||
* (property name, number value, writable, enumerable, configurable) */
|
||||
@@ -42,6 +42,6 @@ OBJECT_VALUE (LIT_MAGIC_STRING_PROTOTYPE,
|
||||
ECMA_BUILTIN_ID_DATAVIEW_PROTOTYPE,
|
||||
ECMA_PROPERTY_FIXED)
|
||||
|
||||
#endif /* ENABLED (JERRY_BUILTIN_DATAVIEW */
|
||||
#endif /* JERRY_BUILTIN_DATAVIEW */
|
||||
|
||||
#include "ecma-builtin-helpers-macro-undefs.inc.h"
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
#include "ecma-objects.h"
|
||||
#include "ecma-objects-general.h"
|
||||
|
||||
#if ENABLED (JERRY_BUILTIN_DATE)
|
||||
#if JERRY_BUILTIN_DATE
|
||||
|
||||
#define ECMA_BUILTINS_INTERNAL
|
||||
#include "ecma-builtins-internal.h"
|
||||
@@ -50,10 +50,10 @@ enum
|
||||
|
||||
ECMA_DATE_PROTOTYPE_GET_FULL_YEAR, /* ECMA-262 v5 15.9.5.10 */
|
||||
ECMA_DATE_PROTOTYPE_GET_UTC_FULL_YEAR, /* ECMA-262 v5 15.9.5.11 */
|
||||
#if ENABLED (JERRY_BUILTIN_ANNEXB)
|
||||
#if JERRY_BUILTIN_ANNEXB
|
||||
ECMA_DATE_PROTOTYPE_GET_YEAR, /* ECMA-262 v5, AnnexB.B.2.4 */
|
||||
ECMA_DATE_PROTOTYPE_GET_UTC_YEAR, /* has no UTC variant */
|
||||
#endif /* ENABLED (JERRY_BUILTIN_ANNEXB) */
|
||||
#endif /* JERRY_BUILTIN_ANNEXB */
|
||||
ECMA_DATE_PROTOTYPE_GET_MONTH, /* ECMA-262 v5 15.9.5.12 */
|
||||
ECMA_DATE_PROTOTYPE_GET_UTC_MONTH, /* ECMA-262 v5 15.9.5.13 */
|
||||
ECMA_DATE_PROTOTYPE_GET_DATE, /* ECMA-262 v5 15.9.5.14 */
|
||||
@@ -73,10 +73,10 @@ enum
|
||||
|
||||
ECMA_DATE_PROTOTYPE_SET_FULL_YEAR, /* ECMA-262 v5, 15.9.5.40 */
|
||||
ECMA_DATE_PROTOTYPE_SET_UTC_FULL_YEAR, /* ECMA-262 v5, 15.9.5.41 */
|
||||
#if ENABLED (JERRY_BUILTIN_ANNEXB)
|
||||
#if JERRY_BUILTIN_ANNEXB
|
||||
ECMA_DATE_PROTOTYPE_SET_YEAR, /* ECMA-262 v5, ECMA-262 v5, AnnexB.B.2.5 */
|
||||
ECMA_DATE_PROTOTYPE_SET_UTC_YEAR, /* has no UTC variant */
|
||||
#endif /* ENABLED (JERRY_BUILTIN_ANNEXB) */
|
||||
#endif /* JERRY_BUILTIN_ANNEXB */
|
||||
ECMA_DATE_PROTOTYPE_SET_MONTH, /* ECMA-262 v5, 15.9.5.38 */
|
||||
ECMA_DATE_PROTOTYPE_SET_UTC_MONTH, /* ECMA-262 v5, 15.9.5.39 */
|
||||
ECMA_DATE_PROTOTYPE_SET_DATE, /* ECMA-262 v5, 15.9.5.36 */
|
||||
@@ -92,9 +92,9 @@ enum
|
||||
|
||||
ECMA_DATE_PROTOTYPE_TO_STRING, /* ECMA-262 v5, 15.9.5.2 */
|
||||
ECMA_DATE_PROTOTYPE_TO_DATE_STRING, /* ECMA-262 v5, 15.9.5.3 */
|
||||
#if !ENABLED (JERRY_ESNEXT)
|
||||
#if !JERRY_ESNEXT
|
||||
ECMA_DATE_PROTOTYPE_TO_UTC_STRING, /* ECMA-262 v5, 15.9.5.42 */
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
ECMA_DATE_PROTOTYPE_TO_TIME_STRING, /* ECMA-262 v5, 15.9.5.4 */
|
||||
ECMA_DATE_PROTOTYPE_TO_ISO_STRING, /* ECMA-262 v5, 15.9.5.43 */
|
||||
|
||||
@@ -102,9 +102,9 @@ enum
|
||||
ECMA_DATE_PROTOTYPE_SET_TIME, /* ECMA-262 v5, 15.9.5.27 */
|
||||
ECMA_DATE_PROTOTYPE_TO_JSON, /* ECMA-262 v5, 15.9.5.44 */
|
||||
|
||||
#if ENABLED (JERRY_ESNEXT)
|
||||
#if JERRY_ESNEXT
|
||||
ECMA_DATE_PROTOTYPE_TO_PRIMITIVE, /* ECMA-262 v6 20.3.4.45 */
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
};
|
||||
|
||||
#define BUILTIN_INC_HEADER_NAME "ecma-builtin-date-prototype.inc.h"
|
||||
@@ -178,7 +178,7 @@ ecma_builtin_date_prototype_to_json (ecma_value_t this_arg) /**< this argument *
|
||||
return ret_value;
|
||||
} /* ecma_builtin_date_prototype_to_json */
|
||||
|
||||
#if ENABLED (JERRY_ESNEXT)
|
||||
#if JERRY_ESNEXT
|
||||
/**
|
||||
* The Date.prototype object's toPrimitive routine
|
||||
*
|
||||
@@ -216,7 +216,7 @@ ecma_builtin_date_prototype_to_primitive (ecma_value_t this_arg, /**< this argum
|
||||
|
||||
return ecma_raise_type_error (ECMA_ERR_MSG ("Invalid argument type in toPrimitive"));
|
||||
} /* ecma_builtin_date_prototype_to_primitive */
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
|
||||
/**
|
||||
* Dispatch get date functions
|
||||
@@ -238,18 +238,18 @@ ecma_builtin_date_prototype_dispatch_get (uint16_t builtin_routine_id, /**< buil
|
||||
{
|
||||
case ECMA_DATE_PROTOTYPE_GET_FULL_YEAR:
|
||||
case ECMA_DATE_PROTOTYPE_GET_UTC_FULL_YEAR:
|
||||
#if ENABLED (JERRY_BUILTIN_ANNEXB)
|
||||
#if JERRY_BUILTIN_ANNEXB
|
||||
case ECMA_DATE_PROTOTYPE_GET_YEAR:
|
||||
#endif /* ENABLED (JERRY_BUILTIN_ANNEXB) */
|
||||
#endif /* JERRY_BUILTIN_ANNEXB */
|
||||
{
|
||||
date_num = ecma_date_year_from_time (date_num);
|
||||
|
||||
#if ENABLED (JERRY_BUILTIN_ANNEXB)
|
||||
#if JERRY_BUILTIN_ANNEXB
|
||||
if (builtin_routine_id == ECMA_DATE_PROTOTYPE_GET_YEAR)
|
||||
{
|
||||
date_num -= 1900;
|
||||
}
|
||||
#endif /* ENABLED (JERRY_BUILTIN_ANNEXB) */
|
||||
#endif /* JERRY_BUILTIN_ANNEXB */
|
||||
|
||||
break;
|
||||
}
|
||||
@@ -307,7 +307,7 @@ ecma_builtin_date_prototype_dispatch_get (uint16_t builtin_routine_id, /**< buil
|
||||
return ecma_make_number_value (date_num);
|
||||
} /* ecma_builtin_date_prototype_dispatch_get */
|
||||
|
||||
#if ENABLED (JERRY_BUILTIN_ANNEXB)
|
||||
#if JERRY_BUILTIN_ANNEXB
|
||||
|
||||
/**
|
||||
* Returns true, if the built-in id sets a year.
|
||||
@@ -317,7 +317,7 @@ ecma_builtin_date_prototype_dispatch_get (uint16_t builtin_routine_id, /**< buil
|
||||
|| (builtin_routine_id) == ECMA_DATE_PROTOTYPE_SET_UTC_FULL_YEAR \
|
||||
|| (builtin_routine_id) == ECMA_DATE_PROTOTYPE_SET_YEAR)
|
||||
|
||||
#else /* !ENABLED (JERRY_BUILTIN_ANNEXB) */
|
||||
#else /* !JERRY_BUILTIN_ANNEXB */
|
||||
|
||||
/**
|
||||
* Returns true, if the built-in id sets a year.
|
||||
@@ -326,7 +326,7 @@ ecma_builtin_date_prototype_dispatch_get (uint16_t builtin_routine_id, /**< buil
|
||||
((builtin_routine_id) == ECMA_DATE_PROTOTYPE_SET_FULL_YEAR \
|
||||
|| (builtin_routine_id) == ECMA_DATE_PROTOTYPE_SET_UTC_FULL_YEAR)
|
||||
|
||||
#endif /* ENABLED (JERRY_BUILTIN_ANNEXB) */
|
||||
#endif /* JERRY_BUILTIN_ANNEXB */
|
||||
|
||||
/**
|
||||
* Dispatch set date functions
|
||||
@@ -351,9 +351,9 @@ ecma_builtin_date_prototype_dispatch_set (uint16_t builtin_routine_id, /**< buil
|
||||
|
||||
switch (builtin_routine_id)
|
||||
{
|
||||
#if ENABLED (JERRY_BUILTIN_ANNEXB)
|
||||
#if JERRY_BUILTIN_ANNEXB
|
||||
case ECMA_DATE_PROTOTYPE_SET_YEAR:
|
||||
#endif /* ENABLED (JERRY_BUILTIN_ANNEXB) */
|
||||
#endif /* JERRY_BUILTIN_ANNEXB */
|
||||
case ECMA_DATE_PROTOTYPE_SET_DATE:
|
||||
case ECMA_DATE_PROTOTYPE_SET_UTC_DATE:
|
||||
case ECMA_DATE_PROTOTYPE_SET_UTC_MILLISECONDS:
|
||||
@@ -442,7 +442,7 @@ ecma_builtin_date_prototype_dispatch_set (uint16_t builtin_routine_id, /**< buil
|
||||
}
|
||||
break;
|
||||
}
|
||||
#if ENABLED (JERRY_BUILTIN_ANNEXB)
|
||||
#if JERRY_BUILTIN_ANNEXB
|
||||
case ECMA_DATE_PROTOTYPE_SET_YEAR:
|
||||
{
|
||||
year = converted_number[0];
|
||||
@@ -452,7 +452,7 @@ ecma_builtin_date_prototype_dispatch_set (uint16_t builtin_routine_id, /**< buil
|
||||
}
|
||||
break;
|
||||
}
|
||||
#endif /* ENABLED (JERRY_BUILTIN_ANNEXB) */
|
||||
#endif /* JERRY_BUILTIN_ANNEXB */
|
||||
case ECMA_DATE_PROTOTYPE_SET_MONTH:
|
||||
case ECMA_DATE_PROTOTYPE_SET_UTC_MONTH:
|
||||
{
|
||||
@@ -475,7 +475,7 @@ ecma_builtin_date_prototype_dispatch_set (uint16_t builtin_routine_id, /**< buil
|
||||
|
||||
day_part = ecma_date_make_day (year, month, day);
|
||||
|
||||
#if ENABLED (JERRY_BUILTIN_ANNEXB)
|
||||
#if JERRY_BUILTIN_ANNEXB
|
||||
if (builtin_routine_id == ECMA_DATE_PROTOTYPE_SET_YEAR)
|
||||
{
|
||||
builtin_routine_id = ECMA_DATE_PROTOTYPE_SET_UTC_YEAR;
|
||||
@@ -486,7 +486,7 @@ ecma_builtin_date_prototype_dispatch_set (uint16_t builtin_routine_id, /**< buil
|
||||
time_part = converted_number[0];
|
||||
}
|
||||
}
|
||||
#endif /* ENABLED (JERRY_BUILTIN_ANNEXB) */
|
||||
#endif /* JERRY_BUILTIN_ANNEXB */
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -596,13 +596,13 @@ ecma_builtin_date_prototype_dispatch_routine (uint8_t builtin_routine_id, /**< b
|
||||
return ecma_builtin_date_prototype_to_json (this_arg);
|
||||
}
|
||||
|
||||
#if ENABLED (JERRY_ESNEXT)
|
||||
#if JERRY_ESNEXT
|
||||
if (JERRY_UNLIKELY (builtin_routine_id == ECMA_DATE_PROTOTYPE_TO_PRIMITIVE))
|
||||
{
|
||||
ecma_value_t argument = arguments_number > 0 ? arguments_list[0] : ECMA_VALUE_UNDEFINED;
|
||||
return ecma_builtin_date_prototype_to_primitive (this_arg, argument);
|
||||
}
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
|
||||
if (!ecma_is_value_object (this_arg)
|
||||
|| !ecma_object_class_is (ecma_get_object_from_value (this_arg), LIT_MAGIC_STRING_DATE_UL))
|
||||
@@ -679,12 +679,12 @@ ecma_builtin_date_prototype_dispatch_routine (uint8_t builtin_routine_id, /**< b
|
||||
{
|
||||
return ecma_date_value_to_date_string (*prim_value_p);
|
||||
}
|
||||
#if !ENABLED (JERRY_ESNEXT)
|
||||
#if !JERRY_ESNEXT
|
||||
case ECMA_DATE_PROTOTYPE_TO_UTC_STRING:
|
||||
{
|
||||
return ecma_date_value_to_utc_string (*prim_value_p);
|
||||
}
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
default:
|
||||
{
|
||||
JERRY_ASSERT (builtin_routine_id == ECMA_DATE_PROTOTYPE_TO_TIME_STRING);
|
||||
@@ -700,4 +700,4 @@ ecma_builtin_date_prototype_dispatch_routine (uint8_t builtin_routine_id, /**< b
|
||||
* @}
|
||||
*/
|
||||
|
||||
#endif /* ENABLED (JERRY_BUILTIN_DATE) */
|
||||
#endif /* JERRY_BUILTIN_DATE */
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
#include "ecma-builtin-helpers-macro-defines.inc.h"
|
||||
|
||||
#if ENABLED (JERRY_BUILTIN_DATE)
|
||||
#if JERRY_BUILTIN_DATE
|
||||
|
||||
OBJECT_VALUE (LIT_MAGIC_STRING_CONSTRUCTOR,
|
||||
ECMA_BUILTIN_ID_DATE,
|
||||
@@ -67,28 +67,28 @@ ROUTINE (LIT_MAGIC_STRING_SET_FULL_YEAR_UL, ECMA_DATE_PROTOTYPE_SET_FULL_YEAR, N
|
||||
ROUTINE (LIT_MAGIC_STRING_SET_UTC_FULL_YEAR_UL, ECMA_DATE_PROTOTYPE_SET_UTC_FULL_YEAR, NON_FIXED, 3)
|
||||
ROUTINE (LIT_MAGIC_STRING_TO_ISO_STRING_UL, ECMA_DATE_PROTOTYPE_TO_ISO_STRING, 0, 0)
|
||||
ROUTINE (LIT_MAGIC_STRING_TO_JSON_UL, ECMA_DATE_PROTOTYPE_TO_JSON, 1, 1)
|
||||
#if ENABLED (JERRY_ESNEXT)
|
||||
#if JERRY_ESNEXT
|
||||
ROUTINE_CONFIGURABLE_ONLY (LIT_GLOBAL_SYMBOL_TO_PRIMITIVE, ECMA_DATE_PROTOTYPE_TO_PRIMITIVE, 1, 1)
|
||||
INTRINSIC_PROPERTY (LIT_MAGIC_STRING_TO_UTC_STRING_UL, LIT_MAGIC_STRING_TO_UTC_STRING_UL,
|
||||
ECMA_PROPERTY_CONFIGURABLE_WRITABLE)
|
||||
#if ENABLED (JERRY_BUILTIN_ANNEXB)
|
||||
#if JERRY_BUILTIN_ANNEXB
|
||||
INTRINSIC_PROPERTY (LIT_MAGIC_STRING_TO_GMT_STRING_UL, LIT_MAGIC_STRING_TO_UTC_STRING_UL,
|
||||
ECMA_PROPERTY_CONFIGURABLE_WRITABLE)
|
||||
#endif /* ENABLED (JERRY_BUILTIN_ANNEXB) */
|
||||
#else /* !ENABLED (JERRY_ESNEXT) */
|
||||
#endif /* JERRY_BUILTIN_ANNEXB */
|
||||
#else /* !JERRY_ESNEXT */
|
||||
ROUTINE (LIT_MAGIC_STRING_TO_UTC_STRING_UL, ECMA_DATE_PROTOTYPE_TO_UTC_STRING, 0, 0)
|
||||
#if ENABLED (JERRY_BUILTIN_ANNEXB)
|
||||
#if JERRY_BUILTIN_ANNEXB
|
||||
ROUTINE (LIT_MAGIC_STRING_TO_GMT_STRING_UL, ECMA_DATE_PROTOTYPE_TO_UTC_STRING, 0, 0)
|
||||
#endif /* ENABLED (JERRY_BUILTIN_ANNEXB) */
|
||||
#endif /* !ENABLED (JERRY_ESNEXT) */
|
||||
#endif /* JERRY_BUILTIN_ANNEXB */
|
||||
#endif /* !JERRY_ESNEXT */
|
||||
|
||||
#if ENABLED (JERRY_BUILTIN_ANNEXB)
|
||||
#if JERRY_BUILTIN_ANNEXB
|
||||
|
||||
ROUTINE (LIT_MAGIC_STRING_GET_YEAR_UL, ECMA_DATE_PROTOTYPE_GET_YEAR, 0, 0)
|
||||
ROUTINE (LIT_MAGIC_STRING_SET_YEAR_UL, ECMA_DATE_PROTOTYPE_SET_YEAR, 1, 1)
|
||||
|
||||
#endif /* ENABLED (JERRY_BUILTIN_ANNEXB) */
|
||||
#endif /* JERRY_BUILTIN_ANNEXB */
|
||||
|
||||
#endif /* ENABLED (JERRY_BUILTIN_DATE) */
|
||||
#endif /* JERRY_BUILTIN_DATE */
|
||||
|
||||
#include "ecma-builtin-helpers-macro-undefs.inc.h"
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
#include "ecma-helpers.h"
|
||||
#include "lit-char-helpers.h"
|
||||
|
||||
#if ENABLED (JERRY_BUILTIN_DATE)
|
||||
#if JERRY_BUILTIN_DATE
|
||||
|
||||
#define ECMA_BUILTINS_INTERNAL
|
||||
#include "ecma-builtins-internal.h"
|
||||
@@ -629,11 +629,11 @@ ecma_builtin_date_utc (ecma_value_t this_arg, /**< this argument */
|
||||
{
|
||||
JERRY_UNUSED (this_arg);
|
||||
|
||||
#if ENABLED (JERRY_ESNEXT)
|
||||
#if JERRY_ESNEXT
|
||||
const uint32_t required_args_number = 1;
|
||||
#else /* !ENABLED (JERRY_ESNEXT) */
|
||||
#else /* !JERRY_ESNEXT */
|
||||
const uint32_t required_args_number = 2;
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
|
||||
if (args_number < required_args_number)
|
||||
{
|
||||
@@ -718,7 +718,7 @@ ecma_value_t
|
||||
ecma_builtin_date_dispatch_construct (const ecma_value_t *arguments_list_p, /**< arguments list */
|
||||
uint32_t arguments_list_len) /**< number of arguments */
|
||||
{
|
||||
#if ENABLED (JERRY_ESNEXT)
|
||||
#if JERRY_ESNEXT
|
||||
JERRY_ASSERT (JERRY_CONTEXT (current_new_target_p));
|
||||
|
||||
ecma_object_t *prototype_obj_p = ecma_op_get_prototype_from_constructor (JERRY_CONTEXT (current_new_target_p),
|
||||
@@ -727,17 +727,17 @@ ecma_builtin_date_dispatch_construct (const ecma_value_t *arguments_list_p, /**<
|
||||
{
|
||||
return ECMA_VALUE_ERROR;
|
||||
}
|
||||
#else /* !ENABLED (JERRY_ESNEXT) */
|
||||
#else /* !JERRY_ESNEXT */
|
||||
ecma_object_t *prototype_obj_p = ecma_builtin_get (ECMA_BUILTIN_ID_DATE_PROTOTYPE);
|
||||
#endif /* (ENABLED (JERRY_ESNEXT) */
|
||||
#endif /* (JERRY_ESNEXT */
|
||||
|
||||
ecma_object_t *obj_p = ecma_create_object (prototype_obj_p,
|
||||
sizeof (ecma_extended_object_t),
|
||||
ECMA_OBJECT_TYPE_CLASS);
|
||||
|
||||
#if ENABLED (JERRY_ESNEXT)
|
||||
#if JERRY_ESNEXT
|
||||
ecma_deref_object (prototype_obj_p);
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
|
||||
ecma_extended_object_t *ext_object_p = (ecma_extended_object_t *) obj_p;
|
||||
ext_object_p->u.class_prop.class_id = LIT_MAGIC_STRING_UNDEFINED;
|
||||
@@ -851,4 +851,4 @@ ecma_builtin_date_dispatch_construct (const ecma_value_t *arguments_list_p, /**<
|
||||
#undef BREAK_IF_FALSE
|
||||
#undef BREAK_IF_NAN
|
||||
|
||||
#endif /* ENABLED (JERRY_BUILTIN_DATE) */
|
||||
#endif /* JERRY_BUILTIN_DATE */
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
#include "ecma-builtin-helpers-macro-defines.inc.h"
|
||||
|
||||
#if ENABLED (JERRY_BUILTIN_DATE)
|
||||
#if JERRY_BUILTIN_DATE
|
||||
|
||||
/* ECMA-262 v5, 15.9.4.1 */
|
||||
OBJECT_VALUE (LIT_MAGIC_STRING_PROTOTYPE,
|
||||
@@ -34,12 +34,12 @@ ROUTINE (LIT_MAGIC_STRING_PARSE, ecma_builtin_date_parse, 1, 1)
|
||||
ROUTINE (LIT_MAGIC_STRING_UTC_U, ecma_builtin_date_utc, NON_FIXED, 7)
|
||||
ROUTINE (LIT_MAGIC_STRING_NOW, ecma_builtin_date_now, 0, 0)
|
||||
|
||||
#if ENABLED (JERRY_ESNEXT)
|
||||
#if JERRY_ESNEXT
|
||||
STRING_VALUE (LIT_MAGIC_STRING_NAME,
|
||||
LIT_MAGIC_STRING_DATE_UL,
|
||||
ECMA_PROPERTY_FLAG_CONFIGURABLE)
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
|
||||
#endif /* ENABLED (JERRY_BUILTIN_DATE) */
|
||||
#endif /* JERRY_BUILTIN_DATE */
|
||||
|
||||
#include "ecma-builtin-helpers-macro-undefs.inc.h"
|
||||
|
||||
@@ -64,9 +64,9 @@ ecma_value_t
|
||||
ecma_builtin_error_dispatch_construct (const ecma_value_t *arguments_list_p, /**< arguments list */
|
||||
uint32_t arguments_list_len) /**< number of arguments */
|
||||
{
|
||||
#if !ENABLED (JERRY_ESNEXT)
|
||||
#if !JERRY_ESNEXT
|
||||
return ecma_builtin_error_dispatch_call (arguments_list_p, arguments_list_len);
|
||||
#else /* ENABLED (JERRY_ESNEXT) */
|
||||
#else /* JERRY_ESNEXT */
|
||||
ecma_object_t *proto_p = ecma_op_get_prototype_from_constructor (JERRY_CONTEXT (current_new_target_p),
|
||||
ECMA_BUILTIN_ID_ERROR_PROTOTYPE);
|
||||
|
||||
@@ -86,7 +86,7 @@ ecma_builtin_error_dispatch_construct (const ecma_value_t *arguments_list_p, /**
|
||||
ecma_deref_object (proto_p);
|
||||
|
||||
return result;
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
} /* ecma_builtin_error_dispatch_construct */
|
||||
|
||||
/**
|
||||
|
||||
@@ -34,10 +34,10 @@ OBJECT_VALUE (LIT_MAGIC_STRING_PROTOTYPE,
|
||||
ECMA_BUILTIN_ID_ERROR_PROTOTYPE,
|
||||
ECMA_PROPERTY_FIXED)
|
||||
|
||||
#if ENABLED (JERRY_ESNEXT)
|
||||
#if JERRY_ESNEXT
|
||||
STRING_VALUE (LIT_MAGIC_STRING_NAME,
|
||||
LIT_MAGIC_STRING_ERROR_UL,
|
||||
ECMA_PROPERTY_FLAG_CONFIGURABLE)
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
|
||||
#include "ecma-builtin-helpers-macro-undefs.inc.h"
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
#include "ecma-string-object.h"
|
||||
#include "jrt.h"
|
||||
|
||||
#if ENABLED (JERRY_BUILTIN_ERRORS)
|
||||
#if JERRY_BUILTIN_ERRORS
|
||||
|
||||
#define ECMA_BUILTINS_INTERNAL
|
||||
#include "ecma-builtins-internal.h"
|
||||
@@ -33,4 +33,4 @@
|
||||
#define BUILTIN_UNDERSCORED_ID eval_error_prototype
|
||||
#include "ecma-builtin-internal-routines-template.inc.h"
|
||||
|
||||
#endif /* ENABLED (JERRY_BUILTIN_ERRORS) */
|
||||
#endif /* JERRY_BUILTIN_ERRORS */
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
#include "ecma-builtin-helpers-macro-defines.inc.h"
|
||||
|
||||
#if ENABLED (JERRY_BUILTIN_ERRORS)
|
||||
#if JERRY_BUILTIN_ERRORS
|
||||
|
||||
/* Object properties:
|
||||
* (property name, object pointer getter) */
|
||||
@@ -39,6 +39,6 @@ STRING_VALUE (LIT_MAGIC_STRING_MESSAGE,
|
||||
LIT_MAGIC_STRING__EMPTY,
|
||||
ECMA_PROPERTY_CONFIGURABLE_WRITABLE)
|
||||
|
||||
#endif /* ENABLED (JERRY_BUILTIN_ERRORS) */
|
||||
#endif /* JERRY_BUILTIN_ERRORS */
|
||||
|
||||
#include "ecma-builtin-helpers-macro-undefs.inc.h"
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
#include "jrt.h"
|
||||
#include "jcontext.h"
|
||||
|
||||
#if ENABLED (JERRY_BUILTIN_ERRORS)
|
||||
#if JERRY_BUILTIN_ERRORS
|
||||
|
||||
#define ECMA_BUILTINS_INTERNAL
|
||||
#include "ecma-builtins-internal.h"
|
||||
@@ -66,9 +66,9 @@ ecma_value_t
|
||||
ecma_builtin_eval_error_dispatch_construct (const ecma_value_t *arguments_list_p, /**< arguments list */
|
||||
uint32_t arguments_list_len) /**< number of arguments */
|
||||
{
|
||||
#if !ENABLED (JERRY_ESNEXT)
|
||||
#if !JERRY_ESNEXT
|
||||
return ecma_builtin_eval_error_dispatch_call (arguments_list_p, arguments_list_len);
|
||||
#else /* ENABLED (JERRY_ESNEXT) */
|
||||
#else /* JERRY_ESNEXT */
|
||||
ecma_object_t *proto_p = ecma_op_get_prototype_from_constructor (JERRY_CONTEXT (current_new_target_p),
|
||||
ECMA_BUILTIN_ID_EVAL_ERROR_PROTOTYPE);
|
||||
|
||||
@@ -88,7 +88,7 @@ ecma_builtin_eval_error_dispatch_construct (const ecma_value_t *arguments_list_p
|
||||
ecma_deref_object (proto_p);
|
||||
|
||||
return result;
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
} /* ecma_builtin_eval_error_dispatch_construct */
|
||||
|
||||
/**
|
||||
@@ -97,4 +97,4 @@ ecma_builtin_eval_error_dispatch_construct (const ecma_value_t *arguments_list_p
|
||||
* @}
|
||||
*/
|
||||
|
||||
#endif /* ENABLED (JERRY_BUILTIN_ERRORS) */
|
||||
#endif /* JERRY_BUILTIN_ERRORS */
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
#include "ecma-builtin-helpers-macro-defines.inc.h"
|
||||
|
||||
#if ENABLED (JERRY_BUILTIN_ERRORS)
|
||||
#if JERRY_BUILTIN_ERRORS
|
||||
|
||||
/* Number properties:
|
||||
* (property name, number value, writable, enumerable, configurable) */
|
||||
@@ -36,12 +36,12 @@ OBJECT_VALUE (LIT_MAGIC_STRING_PROTOTYPE,
|
||||
ECMA_BUILTIN_ID_EVAL_ERROR_PROTOTYPE,
|
||||
ECMA_PROPERTY_FIXED)
|
||||
|
||||
#if ENABLED (JERRY_ESNEXT)
|
||||
#if JERRY_ESNEXT
|
||||
STRING_VALUE (LIT_MAGIC_STRING_NAME,
|
||||
LIT_MAGIC_STRING_EVAL_ERROR_UL,
|
||||
ECMA_PROPERTY_FLAG_CONFIGURABLE)
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
|
||||
#endif /* ENABLED (JERRY_BUILTIN_ERRORS) */
|
||||
#endif /* JERRY_BUILTIN_ERRORS */
|
||||
|
||||
#include "ecma-builtin-helpers-macro-undefs.inc.h"
|
||||
|
||||
@@ -45,9 +45,9 @@ enum
|
||||
ECMA_FUNCTION_PROTOTYPE_CALL,
|
||||
ECMA_FUNCTION_PROTOTYPE_APPLY,
|
||||
ECMA_FUNCTION_PROTOTYPE_BIND,
|
||||
#if ENABLED (JERRY_ESNEXT)
|
||||
#if JERRY_ESNEXT
|
||||
ECMA_FUNCTION_PROTOTYPE_SYMBOL_HAS_INSTANCE,
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
};
|
||||
|
||||
#define BUILTIN_INC_HEADER_NAME "ecma-builtin-function-prototype.inc.h"
|
||||
@@ -210,10 +210,10 @@ ecma_builtin_function_prototype_object_bind (ecma_object_t *this_arg_obj_p , /**
|
||||
/* 4. 11. 18. */
|
||||
ecma_object_t *prototype_obj_p;
|
||||
|
||||
#if !ENABLED (JERRY_ESNEXT)
|
||||
#if !JERRY_ESNEXT
|
||||
prototype_obj_p = ecma_builtin_get (ECMA_BUILTIN_ID_FUNCTION_PROTOTYPE);
|
||||
#else /* ENABLED (JERRY_ESNEXT) */
|
||||
#if ENABLED (JERRY_BUILTIN_PROXY)
|
||||
#else /* JERRY_ESNEXT */
|
||||
#if JERRY_BUILTIN_PROXY
|
||||
if (ECMA_OBJECT_IS_PROXY (this_arg_obj_p))
|
||||
{
|
||||
ecma_value_t proto = ecma_proxy_object_get_prototype_of (this_arg_obj_p);
|
||||
@@ -226,7 +226,7 @@ ecma_builtin_function_prototype_object_bind (ecma_object_t *this_arg_obj_p , /**
|
||||
}
|
||||
else
|
||||
{
|
||||
#endif /* ENABLED (JERRY_BUILTIN_PROXY) */
|
||||
#endif /* JERRY_BUILTIN_PROXY */
|
||||
jmem_cpointer_t proto_cp = ecma_op_ordinary_object_get_prototype_of (this_arg_obj_p);
|
||||
if (proto_cp != JMEM_CP_NULL)
|
||||
{
|
||||
@@ -237,10 +237,10 @@ ecma_builtin_function_prototype_object_bind (ecma_object_t *this_arg_obj_p , /**
|
||||
{
|
||||
prototype_obj_p = NULL;
|
||||
}
|
||||
#if ENABLED (JERRY_BUILTIN_PROXY)
|
||||
#if JERRY_BUILTIN_PROXY
|
||||
}
|
||||
#endif /* ENABLED (JERRY_BUILTIN_PROXY) */
|
||||
#endif /* !ENABLED (JERRY_ESNEXT) */
|
||||
#endif /* JERRY_BUILTIN_PROXY */
|
||||
#endif /* !JERRY_ESNEXT */
|
||||
|
||||
ecma_object_t *function_p;
|
||||
ecma_bound_function_t *bound_func_p;
|
||||
@@ -295,7 +295,7 @@ ecma_builtin_function_prototype_object_bind (ecma_object_t *this_arg_obj_p , /**
|
||||
bound_func_p->header.u.bound_function.args_len_or_this = args_len_or_this;
|
||||
}
|
||||
|
||||
#if ENABLED (JERRY_ESNEXT)
|
||||
#if JERRY_ESNEXT
|
||||
if (prototype_obj_p != NULL)
|
||||
{
|
||||
ecma_deref_object (prototype_obj_p);
|
||||
@@ -309,13 +309,13 @@ ecma_builtin_function_prototype_object_bind (ecma_object_t *this_arg_obj_p , /**
|
||||
len_string,
|
||||
&prop_desc);
|
||||
|
||||
#if ENABLED (JERRY_BUILTIN_PROXY)
|
||||
#if JERRY_BUILTIN_PROXY
|
||||
if (ECMA_IS_VALUE_ERROR (status))
|
||||
{
|
||||
ecma_deref_object (function_p);
|
||||
return status;
|
||||
}
|
||||
#endif /* ENABLED (JERRY_BUILTIN_PROXY) */
|
||||
#endif /* JERRY_BUILTIN_PROXY */
|
||||
|
||||
if (ecma_is_value_true (status))
|
||||
{
|
||||
@@ -369,7 +369,7 @@ ecma_builtin_function_prototype_object_bind (ecma_object_t *this_arg_obj_p , /**
|
||||
NULL);
|
||||
|
||||
name_prop_value_p->value = bound_function_name;
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
|
||||
/*
|
||||
* [[Class]] property is not stored explicitly for objects of ECMA_OBJECT_TYPE_FUNCTION type.
|
||||
@@ -424,12 +424,12 @@ ecma_builtin_function_prototype_dispatch_routine (uint8_t builtin_routine_id, /*
|
||||
{
|
||||
if (!ecma_op_is_callable (this_arg))
|
||||
{
|
||||
#if ENABLED (JERRY_ESNEXT)
|
||||
#if JERRY_ESNEXT
|
||||
if (JERRY_UNLIKELY (builtin_routine_id == ECMA_FUNCTION_PROTOTYPE_SYMBOL_HAS_INSTANCE))
|
||||
{
|
||||
return ECMA_VALUE_FALSE;
|
||||
}
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
|
||||
return ecma_raise_type_error (ECMA_ERR_MSG ("Argument 'this' is not a function"));
|
||||
}
|
||||
@@ -456,12 +456,12 @@ ecma_builtin_function_prototype_dispatch_routine (uint8_t builtin_routine_id, /*
|
||||
{
|
||||
return ecma_builtin_function_prototype_object_bind (func_obj_p, arguments_list_p, arguments_number);
|
||||
}
|
||||
#if ENABLED (JERRY_ESNEXT)
|
||||
#if JERRY_ESNEXT
|
||||
case ECMA_FUNCTION_PROTOTYPE_SYMBOL_HAS_INSTANCE:
|
||||
{
|
||||
return ecma_op_object_has_instance (func_obj_p, arguments_list_p[0]);
|
||||
}
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
default:
|
||||
{
|
||||
JERRY_UNREACHABLE ();
|
||||
|
||||
@@ -34,11 +34,11 @@ NUMBER_VALUE (LIT_MAGIC_STRING_LENGTH,
|
||||
0,
|
||||
ECMA_PROPERTY_FLAG_DEFAULT_LENGTH)
|
||||
|
||||
#if ENABLED (JERRY_ESNEXT)
|
||||
#if JERRY_ESNEXT
|
||||
STRING_VALUE (LIT_MAGIC_STRING_NAME,
|
||||
LIT_MAGIC_STRING__EMPTY,
|
||||
ECMA_PROPERTY_FLAG_CONFIGURABLE)
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
|
||||
/* Routine properties:
|
||||
* (property name, C routine name, arguments number or NON_FIXED, value of the routine's length property) */
|
||||
@@ -47,7 +47,7 @@ ROUTINE (LIT_MAGIC_STRING_APPLY, ECMA_FUNCTION_PROTOTYPE_APPLY, 2, 2)
|
||||
ROUTINE (LIT_MAGIC_STRING_CALL, ECMA_FUNCTION_PROTOTYPE_CALL, NON_FIXED, 1)
|
||||
ROUTINE (LIT_MAGIC_STRING_BIND, ECMA_FUNCTION_PROTOTYPE_BIND, NON_FIXED, 1)
|
||||
|
||||
#if ENABLED (JERRY_ESNEXT)
|
||||
#if JERRY_ESNEXT
|
||||
/**
|
||||
* ECMA-262 v6.0 19.2.3.6 @@hasInstance
|
||||
* the property attributes are: { [[Writable]]: false, [[Enumerable]]: false, [[Configurable]]: false }.
|
||||
@@ -61,6 +61,6 @@ ACCESSOR_BUILTIN_FUNCTION (LIT_MAGIC_STRING_CALLER,
|
||||
ECMA_BUILTIN_ID_TYPE_ERROR_THROWER,
|
||||
ECMA_BUILTIN_ID_TYPE_ERROR_THROWER,
|
||||
ECMA_PROPERTY_FLAG_CONFIGURABLE)
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
|
||||
#include "ecma-builtin-helpers-macro-undefs.inc.h"
|
||||
|
||||
@@ -34,10 +34,10 @@ NUMBER_VALUE (LIT_MAGIC_STRING_LENGTH,
|
||||
1,
|
||||
ECMA_PROPERTY_FLAG_DEFAULT_LENGTH)
|
||||
|
||||
#if ENABLED (JERRY_ESNEXT)
|
||||
#if JERRY_ESNEXT
|
||||
STRING_VALUE (LIT_MAGIC_STRING_NAME,
|
||||
LIT_MAGIC_STRING_FUNCTION_UL,
|
||||
ECMA_PROPERTY_FLAG_CONFIGURABLE)
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
|
||||
#include "ecma-builtin-helpers-macro-undefs.inc.h"
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
|
||||
#include "ecma-globals.h"
|
||||
|
||||
#if ENABLED (JERRY_ESNEXT)
|
||||
#if JERRY_ESNEXT
|
||||
|
||||
#define ECMA_BUILTINS_INTERNAL
|
||||
#include "ecma-builtins-internal.h"
|
||||
@@ -69,4 +69,4 @@ ecma_builtin_generator_function_dispatch_construct (const ecma_value_t *argument
|
||||
* @}
|
||||
*/
|
||||
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
#include "ecma-builtin-helpers-macro-defines.inc.h"
|
||||
|
||||
#if ENABLED (JERRY_ESNEXT)
|
||||
#if JERRY_ESNEXT
|
||||
|
||||
/* ECMA-262 v6, 25.2.2 */
|
||||
STRING_VALUE (LIT_MAGIC_STRING_NAME,
|
||||
@@ -36,6 +36,6 @@ OBJECT_VALUE (LIT_MAGIC_STRING_PROTOTYPE,
|
||||
ECMA_BUILTIN_ID_GENERATOR,
|
||||
ECMA_PROPERTY_FIXED)
|
||||
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
|
||||
#include "ecma-builtin-helpers-macro-undefs.inc.h"
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
#include "opcodes.h"
|
||||
#include "vm-defines.h"
|
||||
|
||||
#if ENABLED (JERRY_ESNEXT)
|
||||
#if JERRY_ESNEXT
|
||||
|
||||
#define ECMA_BUILTINS_INTERNAL
|
||||
#include "ecma-builtins-internal.h"
|
||||
@@ -258,4 +258,4 @@ ecma_builtin_generator_prototype_dispatch_routine (uint8_t builtin_routine_id, /
|
||||
* @}
|
||||
*/
|
||||
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
#include "ecma-builtin-helpers-macro-defines.inc.h"
|
||||
|
||||
#if ENABLED (JERRY_ESNEXT)
|
||||
#if JERRY_ESNEXT
|
||||
|
||||
/* Object properties:
|
||||
* (property name, object pointer getter) */
|
||||
@@ -40,6 +40,6 @@ ROUTINE (LIT_MAGIC_STRING_NEXT, ECMA_GENERATOR_PROTOTYPE_ROUTINE_NEXT, 1, 1)
|
||||
ROUTINE (LIT_MAGIC_STRING_RETURN, ECMA_GENERATOR_PROTOTYPE_ROUTINE_RETURN, 1, 1)
|
||||
ROUTINE (LIT_MAGIC_STRING_THROW, ECMA_GENERATOR_PROTOTYPE_ROUTINE_THROW, 1, 1)
|
||||
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
|
||||
#include "ecma-builtin-helpers-macro-undefs.inc.h"
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
|
||||
#include "ecma-globals.h"
|
||||
|
||||
#if ENABLED (JERRY_ESNEXT)
|
||||
#if JERRY_ESNEXT
|
||||
|
||||
#define ECMA_BUILTINS_INTERNAL
|
||||
#include "ecma-builtins-internal.h"
|
||||
@@ -40,4 +40,4 @@
|
||||
* @}
|
||||
*/
|
||||
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
#include "ecma-builtin-helpers-macro-defines.inc.h"
|
||||
|
||||
#if ENABLED (JERRY_ESNEXT)
|
||||
#if JERRY_ESNEXT
|
||||
|
||||
/* ECMA-262 v6, 25.3.2.3.1 */
|
||||
OBJECT_VALUE (LIT_MAGIC_STRING_CONSTRUCTOR,
|
||||
@@ -36,6 +36,6 @@ STRING_VALUE (LIT_GLOBAL_SYMBOL_TO_STRING_TAG,
|
||||
LIT_MAGIC_STRING_GENERATOR_FUNCTION_UL,
|
||||
ECMA_PROPERTY_FLAG_CONFIGURABLE)
|
||||
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
|
||||
#include "ecma-builtin-helpers-macro-undefs.inc.h"
|
||||
|
||||
@@ -99,12 +99,12 @@ ecma_builtin_global_object_eval (ecma_value_t x) /**< routine's first argument *
|
||||
parse_opts |= ECMA_PARSE_STRICT_MODE;
|
||||
}
|
||||
|
||||
#if ENABLED (JERRY_ESNEXT)
|
||||
#if JERRY_ESNEXT
|
||||
if (vm_is_direct_eval_form_call ())
|
||||
{
|
||||
parse_opts |= ECMA_GET_LOCAL_PARSE_OPTS ();
|
||||
}
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
|
||||
/* steps 2 to 8 */
|
||||
return ecma_op_eval (ecma_get_string_from_value (x), parse_opts);
|
||||
@@ -413,7 +413,7 @@ ecma_builtin_global_object_encode_uri_helper (lit_utf8_byte_t *input_start_p, /*
|
||||
return ecma_make_string_value (ecma_stringbuilder_finalize (&builder));
|
||||
} /* ecma_builtin_global_object_encode_uri_helper */
|
||||
|
||||
#if ENABLED (JERRY_BUILTIN_ANNEXB)
|
||||
#if JERRY_BUILTIN_ANNEXB
|
||||
|
||||
/**
|
||||
* Maximum value of a byte.
|
||||
@@ -583,7 +583,7 @@ ecma_builtin_global_object_unescape (lit_utf8_byte_t *input_start_p, /**< routin
|
||||
return ecma_make_string_value (ecma_stringbuilder_finalize (&builder));
|
||||
} /* ecma_builtin_global_object_unescape */
|
||||
|
||||
#endif /* ENABLED (JERRY_BUILTIN_ANNEXB) */
|
||||
#endif /* JERRY_BUILTIN_ANNEXB */
|
||||
|
||||
/**
|
||||
* Dispatcher of the built-in's routines
|
||||
@@ -673,7 +673,7 @@ ecma_builtin_global_dispatch_routine (uint8_t builtin_routine_id, /**< built-in
|
||||
|
||||
switch (builtin_routine_id)
|
||||
{
|
||||
#if ENABLED (JERRY_BUILTIN_ANNEXB)
|
||||
#if JERRY_BUILTIN_ANNEXB
|
||||
case ECMA_GLOBAL_ESCAPE:
|
||||
{
|
||||
ret_value = ecma_builtin_global_object_escape (input_start_p, input_size);
|
||||
@@ -684,7 +684,7 @@ ecma_builtin_global_dispatch_routine (uint8_t builtin_routine_id, /**< built-in
|
||||
ret_value = ecma_builtin_global_object_unescape (input_start_p, input_size);
|
||||
break;
|
||||
}
|
||||
#endif /* ENABLED (JERRY_BUILTIN_ANNEXB) */
|
||||
#endif /* JERRY_BUILTIN_ANNEXB */
|
||||
case ECMA_GLOBAL_DECODE_URI:
|
||||
case ECMA_GLOBAL_DECODE_URI_COMPONENT:
|
||||
{
|
||||
|
||||
@@ -54,53 +54,53 @@ OBJECT_VALUE (LIT_MAGIC_STRING_FUNCTION_UL,
|
||||
ECMA_PROPERTY_CONFIGURABLE_WRITABLE)
|
||||
|
||||
/* ECMA-262 v5, 15.1.4.3 */
|
||||
#if ENABLED (JERRY_BUILTIN_ARRAY)
|
||||
#if JERRY_BUILTIN_ARRAY
|
||||
OBJECT_VALUE (LIT_MAGIC_STRING_ARRAY_UL,
|
||||
ECMA_BUILTIN_ID_ARRAY,
|
||||
ECMA_PROPERTY_CONFIGURABLE_WRITABLE)
|
||||
#endif /* ENABLED (JERRY_BUILTIN_ARRAY) */
|
||||
#endif /* JERRY_BUILTIN_ARRAY */
|
||||
|
||||
#if ENABLED (JERRY_BUILTIN_STRING)
|
||||
#if JERRY_BUILTIN_STRING
|
||||
/* ECMA-262 v5, 15.1.4.4 */
|
||||
OBJECT_VALUE (LIT_MAGIC_STRING_STRING_UL,
|
||||
ECMA_BUILTIN_ID_STRING,
|
||||
ECMA_PROPERTY_CONFIGURABLE_WRITABLE)
|
||||
#endif /* ENABLED (JERRY_BUILTIN_STRING) */
|
||||
#endif /* JERRY_BUILTIN_STRING */
|
||||
|
||||
#if ENABLED (JERRY_BUILTIN_BOOLEAN)
|
||||
#if JERRY_BUILTIN_BOOLEAN
|
||||
/* ECMA-262 v5, 15.1.4.5 */
|
||||
OBJECT_VALUE (LIT_MAGIC_STRING_BOOLEAN_UL,
|
||||
ECMA_BUILTIN_ID_BOOLEAN,
|
||||
ECMA_PROPERTY_CONFIGURABLE_WRITABLE)
|
||||
#endif /* ENABLED (JERRY_BUILTIN_BOOLEAN) */
|
||||
#endif /* JERRY_BUILTIN_BOOLEAN */
|
||||
|
||||
#if ENABLED (JERRY_BUILTIN_NUMBER)
|
||||
#if JERRY_BUILTIN_NUMBER
|
||||
/* ECMA-262 v5, 15.1.4.6 */
|
||||
OBJECT_VALUE (LIT_MAGIC_STRING_NUMBER_UL,
|
||||
ECMA_BUILTIN_ID_NUMBER,
|
||||
ECMA_PROPERTY_CONFIGURABLE_WRITABLE)
|
||||
#endif /* ENABLED (JERRY_BUILTIN_NUMBER) */
|
||||
#endif /* JERRY_BUILTIN_NUMBER */
|
||||
|
||||
#if ENABLED (JERRY_BUILTIN_DATE)
|
||||
#if JERRY_BUILTIN_DATE
|
||||
/* ECMA-262 v5, 15.1.4.7 */
|
||||
OBJECT_VALUE (LIT_MAGIC_STRING_DATE_UL,
|
||||
ECMA_BUILTIN_ID_DATE,
|
||||
ECMA_PROPERTY_CONFIGURABLE_WRITABLE)
|
||||
#endif /* ENABLED (JERRY_BUILTIN_DATE) */
|
||||
#endif /* JERRY_BUILTIN_DATE */
|
||||
|
||||
#if ENABLED (JERRY_BUILTIN_REGEXP)
|
||||
#if JERRY_BUILTIN_REGEXP
|
||||
/* ECMA-262 v5, 15.1.4.8 */
|
||||
OBJECT_VALUE (LIT_MAGIC_STRING_REGEXP_UL,
|
||||
ECMA_BUILTIN_ID_REGEXP,
|
||||
ECMA_PROPERTY_CONFIGURABLE_WRITABLE)
|
||||
#endif /* ENABLED (JERRY_BUILTIN_REGEXP) */
|
||||
#endif /* JERRY_BUILTIN_REGEXP */
|
||||
|
||||
/* ECMA-262 v5, 15.1.4.9 */
|
||||
OBJECT_VALUE (LIT_MAGIC_STRING_ERROR_UL,
|
||||
ECMA_BUILTIN_ID_ERROR,
|
||||
ECMA_PROPERTY_CONFIGURABLE_WRITABLE)
|
||||
|
||||
#if ENABLED (JERRY_BUILTIN_ERRORS)
|
||||
#if JERRY_BUILTIN_ERRORS
|
||||
|
||||
/* ECMA-262 v5, 15.1.4.10 */
|
||||
OBJECT_VALUE (LIT_MAGIC_STRING_EVAL_ERROR_UL,
|
||||
@@ -131,29 +131,29 @@ OBJECT_VALUE (LIT_MAGIC_STRING_TYPE_ERROR_UL,
|
||||
OBJECT_VALUE (LIT_MAGIC_STRING_URI_ERROR_UL,
|
||||
ECMA_BUILTIN_ID_URI_ERROR,
|
||||
ECMA_PROPERTY_CONFIGURABLE_WRITABLE)
|
||||
#endif /* ENABLED (JERRY_BUILTIN_ERRORS) */
|
||||
#endif /* JERRY_BUILTIN_ERRORS */
|
||||
|
||||
#if ENABLED (JERRY_BUILTIN_MATH)
|
||||
#if JERRY_BUILTIN_MATH
|
||||
/* ECMA-262 v5, 15.1.5.1 */
|
||||
OBJECT_VALUE (LIT_MAGIC_STRING_MATH_UL,
|
||||
ECMA_BUILTIN_ID_MATH,
|
||||
ECMA_PROPERTY_CONFIGURABLE_WRITABLE)
|
||||
#endif /* ENABLED (JERRY_BUILTIN_MATH) */
|
||||
#if ENABLED (JERRY_BUILTIN_REFLECT)
|
||||
#endif /* JERRY_BUILTIN_MATH */
|
||||
#if JERRY_BUILTIN_REFLECT
|
||||
/* ECMA-262 v6, 26.1 */
|
||||
OBJECT_VALUE (LIT_MAGIC_STRING_REFLECT_UL,
|
||||
ECMA_BUILTIN_ID_REFLECT,
|
||||
ECMA_PROPERTY_CONFIGURABLE_WRITABLE)
|
||||
#endif /* ENABLED (JERRY_BUILTIN_REFLECT) */
|
||||
#endif /* JERRY_BUILTIN_REFLECT */
|
||||
|
||||
#if ENABLED (JERRY_BUILTIN_JSON)
|
||||
#if JERRY_BUILTIN_JSON
|
||||
/* ECMA-262 v5, 15.1.5.2 */
|
||||
OBJECT_VALUE (LIT_MAGIC_STRING_JSON_U,
|
||||
ECMA_BUILTIN_ID_JSON,
|
||||
ECMA_PROPERTY_CONFIGURABLE_WRITABLE)
|
||||
#endif /* ENABLED (JERRY_BUILTIN_JSON) */
|
||||
#endif /* JERRY_BUILTIN_JSON */
|
||||
|
||||
#if ENABLED (JERRY_BUILTIN_TYPEDARRAY)
|
||||
#if JERRY_BUILTIN_TYPEDARRAY
|
||||
OBJECT_VALUE (LIT_MAGIC_STRING_ARRAY_BUFFER_UL,
|
||||
ECMA_BUILTIN_ID_ARRAYBUFFER,
|
||||
ECMA_PROPERTY_CONFIGURABLE_WRITABLE)
|
||||
@@ -186,13 +186,13 @@ OBJECT_VALUE (LIT_MAGIC_STRING_FLOAT32_ARRAY_UL,
|
||||
ECMA_BUILTIN_ID_FLOAT32ARRAY,
|
||||
ECMA_PROPERTY_CONFIGURABLE_WRITABLE)
|
||||
|
||||
#if ENABLED (JERRY_NUMBER_TYPE_FLOAT64)
|
||||
#if JERRY_NUMBER_TYPE_FLOAT64
|
||||
OBJECT_VALUE (LIT_MAGIC_STRING_FLOAT64_ARRAY_UL,
|
||||
ECMA_BUILTIN_ID_FLOAT64ARRAY,
|
||||
ECMA_PROPERTY_CONFIGURABLE_WRITABLE)
|
||||
#endif /* ENABLED (JERRY_NUMBER_TYPE_FLOAT64) */
|
||||
#endif /* JERRY_NUMBER_TYPE_FLOAT64 */
|
||||
|
||||
#if ENABLED (JERRY_BUILTIN_BIGINT)
|
||||
#if JERRY_BUILTIN_BIGINT
|
||||
OBJECT_VALUE (LIT_MAGIC_STRING_BIGINT64_ARRAY_UL,
|
||||
ECMA_BUILTIN_ID_BIGINT64ARRAY,
|
||||
ECMA_PROPERTY_CONFIGURABLE_WRITABLE)
|
||||
@@ -200,49 +200,49 @@ OBJECT_VALUE (LIT_MAGIC_STRING_BIGINT64_ARRAY_UL,
|
||||
OBJECT_VALUE (LIT_MAGIC_STRING_BIGUINT64_ARRAY_UL,
|
||||
ECMA_BUILTIN_ID_BIGUINT64ARRAY,
|
||||
ECMA_PROPERTY_CONFIGURABLE_WRITABLE)
|
||||
#endif /* ENABLED (JERRY_BUILTIN_BIGINT) */
|
||||
#endif /* JERRY_BUILTIN_BIGINT */
|
||||
|
||||
OBJECT_VALUE (LIT_MAGIC_STRING_UINT8_CLAMPED_ARRAY_UL,
|
||||
ECMA_BUILTIN_ID_UINT8CLAMPEDARRAY,
|
||||
ECMA_PROPERTY_CONFIGURABLE_WRITABLE)
|
||||
|
||||
#endif /* ENABLED (JERRY_BUILTIN_TYPEDARRAY) */
|
||||
#endif /* JERRY_BUILTIN_TYPEDARRAY */
|
||||
|
||||
#if ENABLED (JERRY_BUILTIN_PROMISE)
|
||||
#if JERRY_BUILTIN_PROMISE
|
||||
OBJECT_VALUE (LIT_MAGIC_STRING_PROMISE_UL,
|
||||
ECMA_BUILTIN_ID_PROMISE,
|
||||
ECMA_PROPERTY_CONFIGURABLE_WRITABLE)
|
||||
#endif /* ENABLED (JERRY_BUILTIN_PROMISE) */
|
||||
#endif /* JERRY_BUILTIN_PROMISE */
|
||||
|
||||
#if ENABLED (JERRY_BUILTIN_MAP)
|
||||
#if JERRY_BUILTIN_MAP
|
||||
/* ECMA-262 v6, 23.1.1.1 */
|
||||
OBJECT_VALUE (LIT_MAGIC_STRING_MAP_UL,
|
||||
ECMA_BUILTIN_ID_MAP,
|
||||
ECMA_PROPERTY_CONFIGURABLE_WRITABLE)
|
||||
#endif /* ENABLED (JERRY_BUILTIN_MAP) */
|
||||
#endif /* JERRY_BUILTIN_MAP */
|
||||
|
||||
#if ENABLED (JERRY_BUILTIN_SET)
|
||||
#if JERRY_BUILTIN_SET
|
||||
/* ECMA-262 v6, 23.1.1.1 */
|
||||
OBJECT_VALUE (LIT_MAGIC_STRING_SET_UL,
|
||||
ECMA_BUILTIN_ID_SET,
|
||||
ECMA_PROPERTY_CONFIGURABLE_WRITABLE)
|
||||
#endif /* ENABLED (JERRY_BUILTIN_SET) */
|
||||
#endif /* JERRY_BUILTIN_SET */
|
||||
|
||||
#if ENABLED (JERRY_BUILTIN_WEAKMAP)
|
||||
#if JERRY_BUILTIN_WEAKMAP
|
||||
/* ECMA-262 v6, 23.1.1.1 */
|
||||
OBJECT_VALUE (LIT_MAGIC_STRING_WEAKMAP_UL,
|
||||
ECMA_BUILTIN_ID_WEAKMAP,
|
||||
ECMA_PROPERTY_CONFIGURABLE_WRITABLE)
|
||||
#endif /* ENABLED (JERRY_BUILTIN_SET) */
|
||||
#endif /* JERRY_BUILTIN_SET */
|
||||
|
||||
#if ENABLED (JERRY_BUILTIN_WEAKSET)
|
||||
#if JERRY_BUILTIN_WEAKSET
|
||||
/* ECMA-262 v6, 23.1.1.1 */
|
||||
OBJECT_VALUE (LIT_MAGIC_STRING_WEAKSET_UL,
|
||||
ECMA_BUILTIN_ID_WEAKSET,
|
||||
ECMA_PROPERTY_CONFIGURABLE_WRITABLE)
|
||||
#endif /* ENABLED (JERRY_BUILTIN_SET) */
|
||||
#endif /* JERRY_BUILTIN_SET */
|
||||
|
||||
#if ENABLED (JERRY_ESNEXT)
|
||||
#if JERRY_ESNEXT
|
||||
/* ECMA-262 v6, 19.4.1.1 */
|
||||
OBJECT_VALUE (LIT_MAGIC_STRING_SYMBOL_UL,
|
||||
ECMA_BUILTIN_ID_SYMBOL,
|
||||
@@ -252,28 +252,28 @@ OBJECT_VALUE (LIT_MAGIC_STRING_SYMBOL_UL,
|
||||
SIMPLE_VALUE (LIT_MAGIC_STRING_GLOBAL_THIS_UL,
|
||||
ECMA_VALUE_GLOBAL_THIS,
|
||||
ECMA_PROPERTY_CONFIGURABLE_WRITABLE)
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
|
||||
#if ENABLED (JERRY_BUILTIN_DATAVIEW)
|
||||
#if JERRY_BUILTIN_DATAVIEW
|
||||
/* ECMA-262 v6, 23.1.1.1 */
|
||||
OBJECT_VALUE (LIT_MAGIC_STRING_DATAVIEW_UL,
|
||||
ECMA_BUILTIN_ID_DATAVIEW,
|
||||
ECMA_PROPERTY_CONFIGURABLE_WRITABLE)
|
||||
#endif /* ENABLED (JERRY_BUILTIN_DATAVIEW */
|
||||
#endif /* JERRY_BUILTIN_DATAVIEW */
|
||||
|
||||
#if ENABLED (JERRY_BUILTIN_PROXY)
|
||||
#if JERRY_BUILTIN_PROXY
|
||||
/* ECMA-262 v6, 26.2.1 */
|
||||
OBJECT_VALUE (LIT_MAGIC_STRING_PROXY_UL,
|
||||
ECMA_BUILTIN_ID_PROXY,
|
||||
ECMA_PROPERTY_CONFIGURABLE_WRITABLE)
|
||||
#endif /* ENABLED (JERRY_BUILTIN_PROXY) */
|
||||
#endif /* JERRY_BUILTIN_PROXY */
|
||||
|
||||
#if ENABLED (JERRY_BUILTIN_BIGINT)
|
||||
#if JERRY_BUILTIN_BIGINT
|
||||
/* ECMA-262 v11, 20.2.1 */
|
||||
OBJECT_VALUE (LIT_MAGIC_STRING_BIGINT_UL,
|
||||
ECMA_BUILTIN_ID_BIGINT,
|
||||
ECMA_PROPERTY_CONFIGURABLE_WRITABLE)
|
||||
#endif /* ENABLED (JERRY_BUILTIN_BIGINT) */
|
||||
#endif /* JERRY_BUILTIN_BIGINT */
|
||||
|
||||
/* Routine properties:
|
||||
* (property name, C routine name, arguments number or NON_FIXED, value of the routine's length property) */
|
||||
@@ -285,17 +285,17 @@ ROUTINE (LIT_MAGIC_STRING_DECODE_URI, ECMA_GLOBAL_DECODE_URI, 1, 1)
|
||||
ROUTINE (LIT_MAGIC_STRING_DECODE_URI_COMPONENT, ECMA_GLOBAL_DECODE_URI_COMPONENT, 1, 1)
|
||||
ROUTINE (LIT_MAGIC_STRING_ENCODE_URI, ECMA_GLOBAL_ENCODE_URI, 1, 1)
|
||||
ROUTINE (LIT_MAGIC_STRING_ENCODE_URI_COMPONENT, ECMA_GLOBAL_ENCODE_URI_COMPONENT, 1, 1)
|
||||
#if ENABLED (JERRY_ESNEXT)
|
||||
#if JERRY_ESNEXT
|
||||
INTRINSIC_PROPERTY (LIT_MAGIC_STRING_PARSE_FLOAT, LIT_MAGIC_STRING_PARSE_FLOAT, ECMA_PROPERTY_CONFIGURABLE_WRITABLE)
|
||||
INTRINSIC_PROPERTY (LIT_MAGIC_STRING_PARSE_INT, LIT_MAGIC_STRING_PARSE_INT, ECMA_PROPERTY_CONFIGURABLE_WRITABLE)
|
||||
|
||||
#else /* !ENABLED (JERRY_ESNEXT) */
|
||||
#else /* !JERRY_ESNEXT */
|
||||
ROUTINE (LIT_MAGIC_STRING_PARSE_FLOAT, ECMA_GLOBAL_PARSE_FLOAT, 1, 1)
|
||||
ROUTINE (LIT_MAGIC_STRING_PARSE_INT, ECMA_GLOBAL_PARSE_INT, 2, 2)
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
#if ENABLED (JERRY_BUILTIN_ANNEXB)
|
||||
#endif /* JERRY_ESNEXT */
|
||||
#if JERRY_BUILTIN_ANNEXB
|
||||
ROUTINE (LIT_MAGIC_STRING_ESCAPE, ECMA_GLOBAL_ESCAPE, 1, 1)
|
||||
ROUTINE (LIT_MAGIC_STRING_UNESCAPE, ECMA_GLOBAL_UNESCAPE, 1, 1)
|
||||
#endif /* ENABLED (JERRY_BUILTIN_ANNEXB) */
|
||||
#endif /* JERRY_BUILTIN_ANNEXB */
|
||||
|
||||
#include "ecma-builtin-helpers-macro-undefs.inc.h"
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
|
||||
#include "ecma-globals.h"
|
||||
|
||||
#if ENABLED (JERRY_ESNEXT)
|
||||
#if JERRY_ESNEXT
|
||||
|
||||
#include "ecma-builtin-handlers.h"
|
||||
#include "ecma-promise-object.h"
|
||||
@@ -58,4 +58,4 @@ ecma_builtin_handler_get_length (ecma_native_handler_id_t id) /**< handler id */
|
||||
return ecma_native_handler_lengths[id - 1];
|
||||
} /* ecma_builtin_handler_get_length */
|
||||
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
#include "ecma-globals.h"
|
||||
|
||||
#if ENABLED (JERRY_ESNEXT)
|
||||
#if JERRY_ESNEXT
|
||||
|
||||
#include "ecma-helpers.h"
|
||||
#include "ecma-builtins.h"
|
||||
@@ -47,6 +47,6 @@ ecma_builtin_handler_get (ecma_native_handler_id_t id);
|
||||
uint8_t
|
||||
ecma_builtin_handler_get_length (ecma_native_handler_id_t id);
|
||||
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
|
||||
#endif /* !ECMA_BUILTIN_HANDLERS_H */
|
||||
|
||||
@@ -19,8 +19,8 @@ ECMA_NATIVE_HANDLER (ECMA_NATIVE_HANDLER_PROMISE_THEN_FINALLY, ecma_promise_then
|
||||
ECMA_NATIVE_HANDLER (ECMA_NATIVE_HANDLER_PROMISE_CATCH_FINALLY, ecma_promise_catch_finally_cb, 1)
|
||||
ECMA_NATIVE_HANDLER (ECMA_NATIVE_HANDLER_PROMISE_ALL_HELPER, ecma_promise_all_handler_cb, 1)
|
||||
ECMA_NATIVE_HANDLER (ECMA_NATIVE_HANDLER_PROMISE_CAPABILITY_EXECUTOR, ecma_op_get_capabilities_executor_cb, 2)
|
||||
#if ENABLED (JERRY_BUILTIN_PROXY)
|
||||
#if JERRY_BUILTIN_PROXY
|
||||
ECMA_NATIVE_HANDLER (ECMA_NATIVE_HANDLER_PROXY_REVOKE, ecma_proxy_revoke_cb, 0)
|
||||
#endif /* ENABLED (JERRY_BUILTIN_PROXY) */
|
||||
#endif /* JERRY_BUILTIN_PROXY */
|
||||
ECMA_NATIVE_HANDLER (ECMA_NATIVE_HANDLER_VALUE_THUNK, ecma_value_thunk_helper_cb, 0)
|
||||
ECMA_NATIVE_HANDLER (ECMA_NATIVE_HANDLER_VALUE_THROWER, ecma_value_thunk_thrower_cb, 0)
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
#include "ecma-objects.h"
|
||||
#include "lit-char-helpers.h"
|
||||
|
||||
#if ENABLED (JERRY_BUILTIN_DATE)
|
||||
#if JERRY_BUILTIN_DATE
|
||||
|
||||
/** \addtogroup ecma ECMA
|
||||
* @{
|
||||
@@ -860,4 +860,4 @@ ecma_date_value_to_time_string (ecma_number_t datetime_number) /**<datetime */
|
||||
* @}
|
||||
*/
|
||||
|
||||
#endif /* ENABLED (JERRY_BUILTIN_DATE) */
|
||||
#endif /* JERRY_BUILTIN_DATE */
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
#include "ecma-builtin-helpers.h"
|
||||
#include "lit-char-helpers.h"
|
||||
|
||||
#if ENABLED (JERRY_BUILTIN_JSON)
|
||||
#if JERRY_BUILTIN_JSON
|
||||
|
||||
/** \addtogroup ecma ECMA
|
||||
* @{
|
||||
@@ -54,7 +54,7 @@ ecma_json_has_object_in_stack (ecma_json_occurence_stack_item_t *stack_p, /**< s
|
||||
return false;
|
||||
} /* ecma_json_has_object_in_stack */
|
||||
|
||||
#endif /* ENABLED (JERRY_BUILTIN_JSON) */
|
||||
#endif /* JERRY_BUILTIN_JSON */
|
||||
|
||||
/**
|
||||
* @}
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
#define STRING_VALUE(name, magic_string_id, prop_attributes)
|
||||
#endif /* !STRING_VALUE */
|
||||
|
||||
#if ENABLED (JERRY_ESNEXT)
|
||||
#if JERRY_ESNEXT
|
||||
#ifndef SYMBOL_VALUE
|
||||
#define SYMBOL_VALUE(symbol, desc_magic_string_id)
|
||||
#endif /* !SYMBOL_VALUE */
|
||||
@@ -37,7 +37,7 @@
|
||||
#ifndef ACCESSOR_BUILTIN_FUNCTION_OBJECT
|
||||
#define ACCESSOR_BUILTIN_FUNCTION_OBJECT(name, getter_builtin_id, setter_builtin_id, prop_attributes)
|
||||
#endif /* !ACCESSOR_BUILTIN_FUNCTION_OBJECT */
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
|
||||
#ifndef OBJECT_VALUE
|
||||
#define OBJECT_VALUE(name, obj_builtin_id, prop_attributes)
|
||||
|
||||
@@ -16,11 +16,11 @@
|
||||
#undef SIMPLE_VALUE
|
||||
#undef NUMBER_VALUE
|
||||
#undef STRING_VALUE
|
||||
#if ENABLED (JERRY_ESNEXT)
|
||||
#if JERRY_ESNEXT
|
||||
#undef SYMBOL_VALUE
|
||||
#undef INTRINSIC_PROPERTY
|
||||
#undef ACCESSOR_BUILTIN_FUNCTION_OBJECT
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
#undef OBJECT_VALUE
|
||||
#undef ROUTINE
|
||||
#undef ROUTINE_CONFIGURABLE_ONLY
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
* @{
|
||||
*/
|
||||
|
||||
#if ENABLED (JERRY_ESNEXT)
|
||||
#if JERRY_ESNEXT
|
||||
/**
|
||||
* Helper function for Object.prototype.toString routine when
|
||||
* the @@toStringTag property is present
|
||||
@@ -96,7 +96,7 @@ ecma_builtin_helper_object_to_string_tag_helper (ecma_value_t tag_value) /**< st
|
||||
|
||||
return ecma_make_string_value (ret_string_p);
|
||||
} /* ecma_builtin_helper_object_to_string_tag_helper */
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
|
||||
/**
|
||||
* Common implementation of the Object.prototype.toString routine
|
||||
@@ -140,7 +140,7 @@ ecma_builtin_helper_object_to_string (const ecma_value_t this_arg) /**< this arg
|
||||
|
||||
builtin_tag = ecma_object_get_class_name (obj_p);
|
||||
|
||||
#if ENABLED (JERRY_ESNEXT)
|
||||
#if JERRY_ESNEXT
|
||||
ecma_value_t is_array = ecma_is_value_array (obj_this);
|
||||
|
||||
if (ECMA_IS_VALUE_ERROR (is_array))
|
||||
@@ -181,7 +181,7 @@ ecma_builtin_helper_object_to_string (const ecma_value_t this_arg) /**< this arg
|
||||
}
|
||||
|
||||
ecma_free_value (tag);
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
|
||||
ecma_deref_object (obj_p);
|
||||
}
|
||||
@@ -260,7 +260,7 @@ ecma_builtin_helper_array_index_normalize (ecma_value_t arg, /**< index */
|
||||
ecma_length_t length, /**< array's length */
|
||||
ecma_length_t *number_p) /**< [out] ecma_length_t */
|
||||
{
|
||||
#if ENABLED (JERRY_ESNEXT)
|
||||
#if JERRY_ESNEXT
|
||||
ecma_number_t to_int;
|
||||
|
||||
if (ECMA_IS_VALUE_ERROR (ecma_op_to_integer (arg, &to_int)))
|
||||
@@ -272,9 +272,9 @@ ecma_builtin_helper_array_index_normalize (ecma_value_t arg, /**< index */
|
||||
: (ecma_length_t) JERRY_MIN (to_int, (ecma_number_t) length));
|
||||
|
||||
return ECMA_VALUE_EMPTY;
|
||||
#else /* !ENABLED (JERRY_ESNEXT) */
|
||||
#else /* !JERRY_ESNEXT */
|
||||
return ecma_builtin_helper_uint32_index_normalize (arg, length, number_p);
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
} /* ecma_builtin_helper_array_index_normalize */
|
||||
|
||||
/**
|
||||
@@ -336,7 +336,7 @@ ecma_builtin_helper_array_concat_value (ecma_object_t *array_obj_p, /**< array *
|
||||
ecma_value_t value) /**< value to concat */
|
||||
{
|
||||
/* 5.b */
|
||||
#if ENABLED (JERRY_ESNEXT)
|
||||
#if JERRY_ESNEXT
|
||||
ecma_value_t is_spreadable = ecma_op_is_concat_spreadable (value);
|
||||
|
||||
if (ECMA_IS_VALUE_ERROR (is_spreadable))
|
||||
@@ -347,17 +347,17 @@ ecma_builtin_helper_array_concat_value (ecma_object_t *array_obj_p, /**< array *
|
||||
bool spread_object = is_spreadable == ECMA_VALUE_TRUE;
|
||||
/* ES11: 22.1.3.1.5.c.iv.3.b */
|
||||
const uint32_t prop_flags = ECMA_PROPERTY_CONFIGURABLE_ENUMERABLE_WRITABLE | ECMA_IS_THROW;
|
||||
#else /* !ENABLED (JERRY_ESNEXT) */
|
||||
#else /* !JERRY_ESNEXT */
|
||||
/* ES5.1: 15.4.4.4.5.b.iii.3.b */
|
||||
const uint32_t prop_flags = ECMA_PROPERTY_CONFIGURABLE_ENUMERABLE_WRITABLE;
|
||||
bool spread_object = ecma_is_value_true (ecma_is_value_array (value));
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
|
||||
if (spread_object)
|
||||
{
|
||||
ecma_object_t *obj_p = ecma_get_object_from_value (value);
|
||||
|
||||
#if ENABLED (JERRY_ESNEXT)
|
||||
#if JERRY_ESNEXT
|
||||
ecma_length_t arg_len;
|
||||
ecma_value_t error = ecma_op_object_get_length (obj_p, &arg_len);
|
||||
|
||||
@@ -371,10 +371,10 @@ ecma_builtin_helper_array_concat_value (ecma_object_t *array_obj_p, /**< array *
|
||||
{
|
||||
return ecma_raise_type_error (ECMA_ERR_MSG ("Invalid array length"));
|
||||
}
|
||||
#else /* !ENABLED (JERRY_ESNEXT) */
|
||||
#else /* !JERRY_ESNEXT */
|
||||
/* 5.b.ii */
|
||||
uint32_t arg_len = ecma_array_get_length (obj_p);
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
/* 5.b.iii */
|
||||
for (ecma_length_t array_index = 0; array_index < arg_len; array_index++)
|
||||
{
|
||||
@@ -398,14 +398,14 @@ ecma_builtin_helper_array_concat_value (ecma_object_t *array_obj_p, /**< array *
|
||||
get_value,
|
||||
prop_flags);
|
||||
ecma_free_value (get_value);
|
||||
#if ENABLED (JERRY_ESNEXT)
|
||||
#if JERRY_ESNEXT
|
||||
if (ECMA_IS_VALUE_ERROR (put_comp))
|
||||
{
|
||||
return put_comp;
|
||||
}
|
||||
#else /* !ENABLED (JERRY_ESNEXT) */
|
||||
#else /* !JERRY_ESNEXT */
|
||||
JERRY_ASSERT (ecma_is_value_true (put_comp));
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
}
|
||||
|
||||
*length_p += arg_len;
|
||||
@@ -419,14 +419,14 @@ ecma_builtin_helper_array_concat_value (ecma_object_t *array_obj_p, /**< array *
|
||||
value,
|
||||
prop_flags);
|
||||
|
||||
#if ENABLED (JERRY_ESNEXT)
|
||||
#if JERRY_ESNEXT
|
||||
if (ECMA_IS_VALUE_ERROR (put_comp))
|
||||
{
|
||||
return put_comp;
|
||||
}
|
||||
#else /* !ENABLED (JERRY_ESNEXT) */
|
||||
#else /* !JERRY_ESNEXT */
|
||||
JERRY_ASSERT (ecma_is_value_true (put_comp));
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
|
||||
return ECMA_VALUE_EMPTY;
|
||||
} /* ecma_builtin_helper_array_concat_value */
|
||||
@@ -583,7 +583,7 @@ ecma_builtin_helper_string_prototype_object_index_of (ecma_string_t *original_st
|
||||
/* 5 (indexOf) -- 6 (lastIndexOf) */
|
||||
const lit_utf8_size_t original_len = ecma_string_get_length (original_str_p);
|
||||
|
||||
#if ENABLED (JERRY_ESNEXT)
|
||||
#if JERRY_ESNEXT
|
||||
/* 4, 6 (startsWith, includes, endsWith) */
|
||||
if (mode >= ECMA_STRING_STARTS_WITH)
|
||||
{
|
||||
@@ -600,7 +600,7 @@ ecma_builtin_helper_string_prototype_object_index_of (ecma_string_t *original_st
|
||||
return ecma_raise_type_error (ECMA_ERR_MSG ("Search string can't be of type: RegExp"));
|
||||
}
|
||||
}
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
|
||||
/* 7, 8 */
|
||||
ecma_string_t *search_str_p = ecma_op_to_string (arg1);
|
||||
@@ -614,18 +614,18 @@ ecma_builtin_helper_string_prototype_object_index_of (ecma_string_t *original_st
|
||||
|
||||
/* 4 (indexOf, lastIndexOf), 9 (startsWith, includes), 10 (endsWith) */
|
||||
ecma_number_t pos_num;
|
||||
#if ENABLED (JERRY_ESNEXT)
|
||||
#if JERRY_ESNEXT
|
||||
if (mode > ECMA_STRING_LAST_INDEX_OF)
|
||||
{
|
||||
ret_value = ecma_op_to_integer (arg2, &pos_num);
|
||||
}
|
||||
else
|
||||
{
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
ret_value = ecma_op_to_number (arg2, &pos_num);
|
||||
#if ENABLED (JERRY_ESNEXT)
|
||||
#if JERRY_ESNEXT
|
||||
}
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
|
||||
/* 10 (startsWith, includes), 11 (endsWith) */
|
||||
if (ECMA_IS_VALUE_ERROR (ret_value))
|
||||
@@ -645,7 +645,7 @@ ecma_builtin_helper_string_prototype_object_index_of (ecma_string_t *original_st
|
||||
|
||||
switch (mode)
|
||||
{
|
||||
#if ENABLED (JERRY_ESNEXT)
|
||||
#if JERRY_ESNEXT
|
||||
case ECMA_STRING_STARTS_WITH:
|
||||
{
|
||||
if (start > original_len)
|
||||
@@ -692,7 +692,7 @@ ecma_builtin_helper_string_prototype_object_index_of (ecma_string_t *original_st
|
||||
ret_value = ecma_make_boolean_value (index == (uint32_t) start_ends_with);
|
||||
break;
|
||||
}
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
|
||||
case ECMA_STRING_INDEX_OF:
|
||||
{
|
||||
@@ -895,7 +895,7 @@ ecma_builtin_replace_substitute (ecma_replace_context_t *ctx_p) /**< replace con
|
||||
}
|
||||
case LIT_CHAR_AMPERSAND:
|
||||
{
|
||||
#if ENABLED (JERRY_ESNEXT)
|
||||
#if JERRY_ESNEXT
|
||||
if (JERRY_UNLIKELY (ctx_p->matched_p == NULL))
|
||||
{
|
||||
JERRY_ASSERT (ctx_p->capture_count == 0);
|
||||
@@ -907,7 +907,7 @@ ecma_builtin_replace_substitute (ecma_replace_context_t *ctx_p) /**< replace con
|
||||
ecma_stringbuilder_append (&(ctx_p->builder), ecma_get_string_from_value (match_value));
|
||||
break;
|
||||
}
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
|
||||
JERRY_ASSERT (ctx_p->matched_p != NULL);
|
||||
ecma_stringbuilder_append_raw (&(ctx_p->builder), ctx_p->matched_p, ctx_p->matched_size);
|
||||
@@ -920,7 +920,7 @@ ecma_builtin_replace_substitute (ecma_replace_context_t *ctx_p) /**< replace con
|
||||
}
|
||||
case LIT_CHAR_SINGLE_QUOTE:
|
||||
{
|
||||
#if ENABLED (JERRY_ESNEXT)
|
||||
#if JERRY_ESNEXT
|
||||
if (JERRY_UNLIKELY (ctx_p->matched_p == NULL))
|
||||
{
|
||||
JERRY_ASSERT (ctx_p->capture_count == 0);
|
||||
@@ -938,7 +938,7 @@ ecma_builtin_replace_substitute (ecma_replace_context_t *ctx_p) /**< replace con
|
||||
(lit_utf8_size_t) (ctx_p->string_p + ctx_p->string_size - begin_p));
|
||||
break;
|
||||
}
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
|
||||
JERRY_ASSERT (ctx_p->matched_p != NULL);
|
||||
ecma_stringbuilder_append_raw (&(ctx_p->builder),
|
||||
@@ -953,12 +953,12 @@ ecma_builtin_replace_substitute (ecma_replace_context_t *ctx_p) /**< replace con
|
||||
if (lit_char_is_decimal_digit (c))
|
||||
{
|
||||
uint32_t capture_count = ctx_p->capture_count;
|
||||
#if ENABLED (JERRY_ESNEXT)
|
||||
#if JERRY_ESNEXT
|
||||
if (capture_count == 0 && ctx_p->u.collection_p != NULL)
|
||||
{
|
||||
capture_count = ctx_p->u.collection_p->item_count;
|
||||
}
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
|
||||
uint8_t idx = (uint8_t) (c - LIT_CHAR_0);
|
||||
if (curr_p < replace_end_p && lit_char_is_decimal_digit (*(curr_p)))
|
||||
@@ -975,7 +975,7 @@ ecma_builtin_replace_substitute (ecma_replace_context_t *ctx_p) /**< replace con
|
||||
{
|
||||
if (ctx_p->capture_count > 0)
|
||||
{
|
||||
#if ENABLED (JERRY_BUILTIN_REGEXP)
|
||||
#if JERRY_BUILTIN_REGEXP
|
||||
JERRY_ASSERT (ctx_p->u.captures_p != NULL);
|
||||
const ecma_regexp_capture_t *const capture_p = ctx_p->u.captures_p + idx;
|
||||
|
||||
@@ -987,9 +987,9 @@ ecma_builtin_replace_substitute (ecma_replace_context_t *ctx_p) /**< replace con
|
||||
}
|
||||
|
||||
break;
|
||||
#endif /* ENABLED (JERRY_BUILTIN_REGEXP) */
|
||||
#endif /* JERRY_BUILTIN_REGEXP */
|
||||
}
|
||||
#if ENABLED (JERRY_ESNEXT)
|
||||
#if JERRY_ESNEXT
|
||||
else if (ctx_p->u.collection_p != NULL)
|
||||
{
|
||||
const ecma_value_t capture_value = ctx_p->u.collection_p->buffer_p[idx];
|
||||
@@ -1000,7 +1000,7 @@ ecma_builtin_replace_substitute (ecma_replace_context_t *ctx_p) /**< replace con
|
||||
|
||||
break;
|
||||
}
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -83,9 +83,9 @@ typedef struct
|
||||
*/
|
||||
union
|
||||
{
|
||||
#if ENABLED (JERRY_BUILTIN_REGEXP)
|
||||
#if JERRY_BUILTIN_REGEXP
|
||||
const ecma_regexp_capture_t *captures_p; /**< array of regexp capturing groups */
|
||||
#endif /* ENABLED (JERRY_BUILTIN_REGEXP) */
|
||||
#endif /* JERRY_BUILTIN_REGEXP */
|
||||
const ecma_collection_t *collection_p; /**< collection of captured substrings */
|
||||
} u;
|
||||
|
||||
@@ -96,12 +96,12 @@ typedef struct
|
||||
void
|
||||
ecma_builtin_replace_substitute (ecma_replace_context_t *ctx_p);
|
||||
|
||||
#if ENABLED (JERRY_ESNEXT)
|
||||
#if JERRY_ESNEXT
|
||||
bool
|
||||
ecma_builtin_is_regexp_exec (ecma_extended_object_t *obj_p);
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
|
||||
#if ENABLED (JERRY_BUILTIN_DATE)
|
||||
#if JERRY_BUILTIN_DATE
|
||||
|
||||
/**
|
||||
* Time range defines for helper functions.
|
||||
@@ -174,9 +174,9 @@ ecma_value_t ecma_date_value_to_iso_string (ecma_number_t datetime_number);
|
||||
ecma_value_t ecma_date_value_to_date_string (ecma_number_t datetime_number);
|
||||
ecma_value_t ecma_date_value_to_time_string (ecma_number_t datetime_number);
|
||||
|
||||
#endif /* ENABLED (JERRY_BUILTIN_DATE) */
|
||||
#endif /* JERRY_BUILTIN_DATE */
|
||||
|
||||
#if ENABLED (JERRY_BUILTIN_JSON)
|
||||
#if JERRY_BUILTIN_JSON
|
||||
/* ecma-builtin-helper-json.c */
|
||||
|
||||
/**
|
||||
@@ -220,7 +220,7 @@ bool ecma_json_has_object_in_stack (ecma_json_occurence_stack_item_t *stack_p, e
|
||||
ecma_value_t
|
||||
ecma_builtin_helper_json_create_non_formatted_json (lit_utf8_byte_t left_bracket, lit_utf8_byte_t right_bracket,
|
||||
ecma_collection_t *partial_p);
|
||||
#endif /* ENABLED (JERRY_BUILTIN_JSON) */
|
||||
#endif /* JERRY_BUILTIN_JSON */
|
||||
|
||||
/* ecma-builtin-helper-error.c */
|
||||
|
||||
|
||||
@@ -189,7 +189,7 @@ const ecma_builtin_property_descriptor_t PROPERTY_DESCRIPTOR_LIST_NAME[] =
|
||||
prop_attributes, \
|
||||
magic_string_id \
|
||||
},
|
||||
#if ENABLED (JERRY_ESNEXT)
|
||||
#if JERRY_ESNEXT
|
||||
#define SYMBOL_VALUE(name, symbol) \
|
||||
{ \
|
||||
name, \
|
||||
@@ -211,7 +211,7 @@ const ecma_builtin_property_descriptor_t PROPERTY_DESCRIPTOR_LIST_NAME[] =
|
||||
prop_attributes, \
|
||||
ECMA_ACCESSOR_READ_WRITE (getter_builtin_id, setter_builtin_id) \
|
||||
},
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
#include BUILTIN_INC_HEADER_NAME
|
||||
{
|
||||
LIT_MAGIC_STRING__COUNT,
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
#include "ecma-helpers.h"
|
||||
#include "lit-char-helpers.h"
|
||||
|
||||
#if ENABLED (JERRY_ESNEXT)
|
||||
#if JERRY_ESNEXT
|
||||
|
||||
#define ECMA_BUILTINS_INTERNAL
|
||||
#include "ecma-builtins-internal.h"
|
||||
@@ -302,4 +302,4 @@ ecma_builtin_intrinsic_dispatch_routine (uint8_t builtin_routine_id, /**< built-
|
||||
* @}
|
||||
*/
|
||||
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
#include "ecma-builtin-helpers-macro-defines.inc.h"
|
||||
|
||||
#if ENABLED (JERRY_ESNEXT)
|
||||
#if JERRY_ESNEXT
|
||||
|
||||
/* Routine properties:
|
||||
* (property name, C routine name, arguments number or NON_FIXED, value of the routine's length property) */
|
||||
@@ -33,5 +33,5 @@ ROUTINE (LIT_MAGIC_STRING_TO_STRING_UL, ECMA_INTRINSIC_ARRAY_TO_STRING, 0, 0)
|
||||
ROUTINE (LIT_MAGIC_STRING_TO_UTC_STRING_UL, ECMA_INTRINSIC_DATE_TO_UTC_STRING, 0, 0)
|
||||
ROUTINE (LIT_MAGIC_STRING_PARSE_FLOAT, ECMA_INTRINSIC_PARSE_FLOAT, 1, 1)
|
||||
ROUTINE (LIT_MAGIC_STRING_PARSE_INT, ECMA_INTRINSIC_PARSE_INT, 2, 2)
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
#include "ecma-builtin-helpers-macro-undefs.inc.h"
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
#include "ecma-builtins.h"
|
||||
#include "ecma-iterator-object.h"
|
||||
|
||||
#if ENABLED (JERRY_ESNEXT)
|
||||
#if JERRY_ESNEXT
|
||||
|
||||
#define ECMA_BUILTINS_INTERNAL
|
||||
#include "ecma-builtins-internal.h"
|
||||
@@ -60,4 +60,4 @@ ecma_builtin_iterator_prototype_object_iterator (ecma_value_t this_val) /**< thi
|
||||
* @}
|
||||
*/
|
||||
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
|
||||
@@ -19,12 +19,12 @@
|
||||
|
||||
#include "ecma-builtin-helpers-macro-defines.inc.h"
|
||||
|
||||
#if ENABLED (JERRY_ESNEXT)
|
||||
#if JERRY_ESNEXT
|
||||
|
||||
/* Routine properties:
|
||||
* (property name, C routine name, arguments number or NON_FIXED, value of the routine's length property) */
|
||||
ROUTINE (LIT_GLOBAL_SYMBOL_ITERATOR, ecma_builtin_iterator_prototype_object_iterator, 0, 0)
|
||||
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
|
||||
#include "ecma-builtin-helpers-macro-undefs.inc.h"
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
#include "lit-char-helpers.h"
|
||||
#include "lit-globals.h"
|
||||
|
||||
#if ENABLED (JERRY_BUILTIN_JSON)
|
||||
#if JERRY_BUILTIN_JSON
|
||||
|
||||
#define ECMA_BUILTINS_INTERNAL
|
||||
#include "ecma-builtins-internal.h"
|
||||
@@ -636,13 +636,13 @@ ecma_builtin_json_internalize_property (ecma_object_t *reviver_p, /**< reviver f
|
||||
/* 3.a */
|
||||
ecma_value_t is_array = ecma_is_value_array (value);
|
||||
|
||||
#if ENABLED (JERRY_ESNEXT)
|
||||
#if JERRY_ESNEXT
|
||||
if (ECMA_IS_VALUE_ERROR (is_array))
|
||||
{
|
||||
ecma_free_value (value);
|
||||
return is_array;
|
||||
}
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
|
||||
ecma_object_t *object_p = ecma_get_object_from_value (value);
|
||||
|
||||
@@ -654,13 +654,13 @@ ecma_builtin_json_internalize_property (ecma_object_t *reviver_p, /**< reviver f
|
||||
ecma_value_t to_len = ecma_op_object_get_length (object_p, &length);
|
||||
|
||||
/* 3.c.iii */
|
||||
#if ENABLED (JERRY_BUILTIN_PROXY)
|
||||
#if JERRY_BUILTIN_PROXY
|
||||
if (ECMA_IS_VALUE_ERROR (to_len))
|
||||
{
|
||||
ecma_deref_object (object_p);
|
||||
return to_len;
|
||||
}
|
||||
#endif /* ENABLED (JERRY_BUILTIN_PROXY) */
|
||||
#endif /* JERRY_BUILTIN_PROXY */
|
||||
JERRY_ASSERT (ecma_is_value_empty (to_len));
|
||||
|
||||
/* 3.c.iv */
|
||||
@@ -685,15 +685,15 @@ ecma_builtin_json_internalize_property (ecma_object_t *reviver_p, /**< reviver f
|
||||
{
|
||||
ecma_collection_t *props_p = ecma_op_object_get_enumerable_property_names (object_p,
|
||||
ECMA_ENUMERABLE_PROPERTY_KEYS);
|
||||
#if ENABLED (JERRY_ESNEXT)
|
||||
#if JERRY_ESNEXT
|
||||
if (JERRY_UNLIKELY (props_p == NULL))
|
||||
{
|
||||
ecma_deref_object (object_p);
|
||||
return ECMA_VALUE_ERROR;
|
||||
}
|
||||
#else /* !ENABLED (JERRY_ESNEXT) */
|
||||
#else /* !JERRY_ESNEXT */
|
||||
JERRY_ASSERT (props_p != NULL);
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
|
||||
ecma_value_t *buffer_p = props_p->buffer_p;
|
||||
|
||||
@@ -759,12 +759,12 @@ ecma_value_t ecma_builtin_json_internalize_process_property (ecma_object_t *revi
|
||||
/* ES11: 2.b.iii.2.a / 2.c.ii.2.a */
|
||||
ecma_value_t delete_val = ecma_op_object_delete (object_p, prop_name, false);
|
||||
|
||||
#if ENABLED (JERRY_ESNEXT)
|
||||
#if JERRY_ESNEXT
|
||||
if (ECMA_IS_VALUE_ERROR (delete_val))
|
||||
{
|
||||
return delete_val;
|
||||
}
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
|
||||
JERRY_ASSERT (ecma_is_value_boolean (delete_val));
|
||||
}
|
||||
@@ -777,12 +777,12 @@ ecma_value_t ecma_builtin_json_internalize_process_property (ecma_object_t *revi
|
||||
ECMA_PROPERTY_CONFIGURABLE_ENUMERABLE_WRITABLE);
|
||||
ecma_free_value (new_element);
|
||||
|
||||
#if ENABLED (JERRY_ESNEXT)
|
||||
#if JERRY_ESNEXT
|
||||
if (ECMA_IS_VALUE_ERROR (def_value))
|
||||
{
|
||||
return def_value;
|
||||
}
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
|
||||
JERRY_ASSERT (ecma_is_value_boolean (def_value));
|
||||
}
|
||||
@@ -891,7 +891,7 @@ ecma_builtin_json_quote (ecma_stringbuilder_t *builder_p, /**< builder for the r
|
||||
|
||||
bool should_escape = false;
|
||||
|
||||
#if ENABLED (JERRY_ESNEXT)
|
||||
#if JERRY_ESNEXT
|
||||
if (lit_is_code_point_utf16_high_surrogate (c))
|
||||
{
|
||||
if (str_p < str_end_p)
|
||||
@@ -913,7 +913,7 @@ ecma_builtin_json_quote (ecma_stringbuilder_t *builder_p, /**< builder for the r
|
||||
{
|
||||
should_escape = true;
|
||||
}
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
|
||||
if (c == LIT_CHAR_BACKSLASH || c == LIT_CHAR_DOUBLE_QUOTE)
|
||||
{
|
||||
@@ -1027,12 +1027,12 @@ ecma_builtin_json_serialize_object (ecma_json_stringify_context_t *context_p, /*
|
||||
{
|
||||
property_keys_p = ecma_op_object_get_enumerable_property_names (obj_p, ECMA_ENUMERABLE_PROPERTY_KEYS);
|
||||
|
||||
#if ENABLED (JERRY_BUILTIN_PROXY)
|
||||
#if JERRY_BUILTIN_PROXY
|
||||
if (property_keys_p == NULL)
|
||||
{
|
||||
return ECMA_VALUE_ERROR;
|
||||
}
|
||||
#endif /* ENABLED (JERRY_BUILTIN_PROXY) */
|
||||
#endif /* JERRY_BUILTIN_PROXY */
|
||||
}
|
||||
|
||||
/* 8. */
|
||||
@@ -1157,12 +1157,12 @@ ecma_builtin_json_serialize_array (ecma_json_stringify_context_t *context_p, /**
|
||||
ecma_length_t array_length;
|
||||
ecma_value_t length_value = ecma_op_object_get_length (obj_p, &array_length);
|
||||
|
||||
#if ENABLED (JERRY_BUILTIN_PROXY)
|
||||
#if JERRY_BUILTIN_PROXY
|
||||
if (ECMA_IS_VALUE_ERROR (length_value))
|
||||
{
|
||||
return length_value;
|
||||
}
|
||||
#endif /* ENABLED (JERRY_BUILTIN_PROXY) */
|
||||
#endif /* JERRY_BUILTIN_PROXY */
|
||||
JERRY_ASSERT (ecma_is_value_empty (length_value));
|
||||
|
||||
ecma_stringbuilder_append_byte (&context_p->result_builder, LIT_CHAR_LEFT_SQUARE);
|
||||
@@ -1350,7 +1350,7 @@ ecma_builtin_json_serialize_property (ecma_json_stringify_context_t *context_p,
|
||||
value = ext_object_p->u.class_prop.u.value;
|
||||
ecma_deref_object (obj_p);
|
||||
}
|
||||
#if ENABLED (JERRY_BUILTIN_BIGINT)
|
||||
#if JERRY_BUILTIN_BIGINT
|
||||
/* 5.d */
|
||||
else if (class_name == LIT_MAGIC_STRING_BIGINT_UL)
|
||||
{
|
||||
@@ -1358,7 +1358,7 @@ ecma_builtin_json_serialize_property (ecma_json_stringify_context_t *context_p,
|
||||
value = ecma_copy_value (ext_object_p->u.class_prop.u.value);
|
||||
ecma_deref_object (obj_p);
|
||||
}
|
||||
#endif /* ENABLED (JERRY_BUILTIN_BIGINT) */
|
||||
#endif /* JERRY_BUILTIN_BIGINT */
|
||||
}
|
||||
|
||||
/* 6. - 8. */
|
||||
@@ -1415,26 +1415,26 @@ ecma_builtin_json_serialize_property (ecma_json_stringify_context_t *context_p,
|
||||
return ECMA_VALUE_EMPTY;
|
||||
}
|
||||
|
||||
#if ENABLED (JERRY_BUILTIN_BIGINT)
|
||||
#if JERRY_BUILTIN_BIGINT
|
||||
if (ecma_is_value_bigint (value))
|
||||
{
|
||||
ecma_free_value (value);
|
||||
return ecma_raise_type_error (ECMA_ERR_MSG ("BigInt cannot be serialized"));
|
||||
}
|
||||
#endif /* ENABLED (JERRY_BUILTIN_BIGINT) */
|
||||
#endif /* JERRY_BUILTIN_BIGINT */
|
||||
|
||||
/* 11. */
|
||||
if (ecma_is_value_object (value) && !ecma_op_is_callable (value))
|
||||
{
|
||||
ecma_value_t is_array = ecma_is_value_array (value);
|
||||
|
||||
#if ENABLED (JERRY_BUILTIN_BIGINT)
|
||||
#if JERRY_BUILTIN_BIGINT
|
||||
if (ECMA_IS_VALUE_ERROR (is_array))
|
||||
{
|
||||
ecma_free_value (value);
|
||||
return is_array;
|
||||
}
|
||||
#endif /* ENABLED (JERRY_BUILTIN_BIGINT) */
|
||||
#endif /* JERRY_BUILTIN_BIGINT */
|
||||
|
||||
ecma_object_t *obj_p = ecma_get_object_from_value (value);
|
||||
|
||||
@@ -1561,24 +1561,24 @@ ecma_builtin_json_stringify (ecma_value_t this_arg, /**< 'this' argument */
|
||||
{
|
||||
ecma_value_t is_array = ecma_is_value_array (arg2);
|
||||
|
||||
#if ENABLED (JERRY_ESNEXT)
|
||||
#if JERRY_ESNEXT
|
||||
if (ECMA_IS_VALUE_ERROR (is_array))
|
||||
{
|
||||
return is_array;
|
||||
}
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
|
||||
if (ecma_is_value_true (is_array))
|
||||
{
|
||||
ecma_length_t array_length;
|
||||
ecma_value_t to_len = ecma_op_object_get_length (obj_p, &array_length);
|
||||
|
||||
#if ENABLED (JERRY_BUILTIN_PROXY)
|
||||
#if JERRY_BUILTIN_PROXY
|
||||
if (ECMA_IS_VALUE_ERROR (to_len))
|
||||
{
|
||||
return to_len;
|
||||
}
|
||||
#endif /* ENABLED (JERRY_BUILTIN_PROXY) */
|
||||
#endif /* JERRY_BUILTIN_PROXY */
|
||||
JERRY_ASSERT (ecma_is_value_empty (to_len));
|
||||
|
||||
context.property_list_p = ecma_new_collection ();
|
||||
@@ -1780,4 +1780,4 @@ ecma_builtin_json_stringify (ecma_value_t this_arg, /**< 'this' argument */
|
||||
* @}
|
||||
*/
|
||||
|
||||
#endif /* ENABLED (JERRY_BUILTIN_JSON) */
|
||||
#endif /* JERRY_BUILTIN_JSON */
|
||||
|
||||
@@ -19,20 +19,20 @@
|
||||
|
||||
#include "ecma-builtin-helpers-macro-defines.inc.h"
|
||||
|
||||
#if ENABLED (JERRY_BUILTIN_JSON)
|
||||
#if JERRY_BUILTIN_JSON
|
||||
|
||||
#if ENABLED (JERRY_ESNEXT)
|
||||
#if JERRY_ESNEXT
|
||||
/* ECMA-262 v6, 24.3.3 */
|
||||
STRING_VALUE (LIT_GLOBAL_SYMBOL_TO_STRING_TAG,
|
||||
LIT_MAGIC_STRING_JSON_U,
|
||||
ECMA_PROPERTY_FLAG_CONFIGURABLE)
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
|
||||
/* Routine properties:
|
||||
* (property name, C routine name, arguments number or NON_FIXED, value of the routine's length property) */
|
||||
ROUTINE (LIT_MAGIC_STRING_PARSE, ecma_builtin_json_parse, 2, 2)
|
||||
ROUTINE (LIT_MAGIC_STRING_STRINGIFY, ecma_builtin_json_stringify, 3, 3)
|
||||
|
||||
#endif /* ENABLED (JERRY_BUILTIN_JSON) */
|
||||
#endif /* JERRY_BUILTIN_JSON */
|
||||
|
||||
#include "ecma-builtin-helpers-macro-undefs.inc.h"
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
#include "ecma-builtins.h"
|
||||
#include "ecma-container-object.h"
|
||||
|
||||
#if ENABLED (JERRY_BUILTIN_MAP)
|
||||
#if JERRY_BUILTIN_MAP
|
||||
|
||||
#define ECMA_BUILTINS_INTERNAL
|
||||
#include "ecma-builtins-internal.h"
|
||||
@@ -60,4 +60,4 @@ ecma_builtin_map_iterator_prototype_object_next (ecma_value_t this_val) /**< thi
|
||||
* @}
|
||||
*/
|
||||
|
||||
#endif /* ENABLED (JERRY_BUILTIN_MAP) */
|
||||
#endif /* JERRY_BUILTIN_MAP */
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user