Implement tagged template literals (#3456)

Missing features: snapshot support

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
This commit is contained in:
Robert Fancsik
2019-12-19 19:10:45 +01:00
committed by GitHub
parent 7bfbc701d8
commit 9596a7e1d6
28 changed files with 1229 additions and 314 deletions
+17 -2
View File
@@ -82,12 +82,27 @@ parser_malloc_local (parser_context_t *context_p, /**< context */
/**
* Free memory allocated by parser_malloc_local.
*/
void parser_free_local (void *ptr, /**< pointer to free */
size_t size) /**< size of the memory */
void
parser_free_local (void *ptr, /**< pointer to free */
size_t size) /**< size of the memory */
{
jmem_heap_free_block (ptr, size);
} /* parser_free_local */
/**
* Free the dynamically allocated buffer stored in the context
*/
void
parser_free_allocated_buffer (parser_context_t *context_p) /**< context */
{
if (context_p->u.allocated_buffer_p != NULL)
{
parser_free_local (context_p->u.allocated_buffer_p,
context_p->allocated_buffer_size);
context_p->u.allocated_buffer_p = NULL;
}
} /* parser_free_allocated_buffer */
/**********************************************************************/
/* Parser data management functions */
/**********************************************************************/