Compact Byte Code parser and executor for Jerry.

JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
JerryScript-DCO-1.0-Signed-off-by: Tamas Gergely tgergely.u-szeged@partner.samsung.com
JerryScript-DCO-1.0-Signed-off-by: Zsolt Borbély zsborbely.u-szeged@partner.samsung.com
JerryScript-DCO-1.0-Signed-off-by: Roland Takacs rtakacs.u-szeged@partner.samsung.com
JerryScript-DCO-1.0-Signed-off-by: István Kádár ikadar@inf.u-szeged.hu
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
This commit is contained in:
Zoltan Herczeg
2016-02-05 00:10:10 -08:00
parent db6caf3c48
commit 4d2dd22ced
92 changed files with 17184 additions and 20276 deletions
+6 -2
View File
@@ -22,7 +22,7 @@
#include "rcs-iterator.h"
#include "rcs-records.h"
#ifdef JERRY_ENABLE_SNAPSHOT
#ifdef JERRY_ENABLE_SNAPSHOT_SAVE
/**
* Dump a record to specified snapshot buffer.
@@ -250,6 +250,10 @@ lit_dump_literals_for_snapshot (uint8_t *buffer_p, /**< output snapshot buffer *
return true;
} /* lit_dump_literals_for_snapshot */
#endif /* JERRY_ENABLE_SNAPSHOT_SAVE */
#ifdef JERRY_ENABLE_SNAPSHOT_EXEC
/**
* Load literals from snapshot.
*
@@ -408,4 +412,4 @@ lit_load_literals_from_snapshot (const uint8_t *lit_table_p, /**< buffer with li
return false;
} /* rcs_load_literals_from_snapshot */
#endif /* JERRY_ENABLE_SNAPSHOT */
#endif /* JERRY_ENABLE_SNAPSHOT_EXEC */
+4 -2
View File
@@ -25,7 +25,7 @@ typedef struct
uint32_t literal_offset;
} lit_mem_to_snapshot_id_map_entry_t;
#ifdef JERRY_ENABLE_SNAPSHOT
#ifdef JERRY_ENABLE_SNAPSHOT_SAVE
extern bool
lit_dump_literals_for_snapshot (uint8_t *,
size_t,
@@ -33,12 +33,14 @@ lit_dump_literals_for_snapshot (uint8_t *,
lit_mem_to_snapshot_id_map_entry_t **,
uint32_t *,
uint32_t *);
#endif /* JERRY_ENABLE_SNAPSHOT_SAVE */
#ifdef JERRY_ENABLE_SNAPSHOT_EXEC
extern bool
lit_load_literals_from_snapshot (const uint8_t *,
uint32_t,
lit_mem_to_snapshot_id_map_entry_t **,
uint32_t *);
#endif /* JERRY_ENABLE_SNAPSHOT */
#endif /* JERRY_ENABLE_SNAPSHOT_EXEC */
#endif /* !RCS_SNAPSHOT_H */
+6 -6
View File
@@ -1,4 +1,4 @@
/* Copyright 2015 Samsung Electronics Co., Ltd.
/* Copyright 2015-2016 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -277,12 +277,12 @@ lit_utf8_iterator_seek_bos (lit_utf8_iterator_t *iter_p) /**< iterator to reset
} /* lit_utf8_iterator_seek_bos */
/**
* Save iterator's position to restore it later
* Get iterator's position
*
* @return current position of the iterator
*/
lit_utf8_iterator_pos_t
lit_utf8_iterator_get_pos (const lit_utf8_iterator_t *iter_p)
lit_utf8_iterator_get_pos (const lit_utf8_iterator_t *iter_p) /**< iterator */
{
return iter_p->buf_pos;
} /* lit_utf8_iterator_get_pos */
@@ -586,7 +586,7 @@ lit_read_code_unit_from_utf8 (const lit_utf8_byte_t *buf_p, /**< buffer with cha
*/
lit_utf8_size_t
lit_read_prev_code_unit_from_utf8 (const lit_utf8_byte_t *buf_p, /**< buffer with characters */
ecma_char_t *code_point) /**< @out: code point */
ecma_char_t *code_point) /**< @out: code point */
{
JERRY_ASSERT (buf_p);
@@ -635,7 +635,7 @@ lit_utf8_read_prev (lit_utf8_byte_t **buf_p) /**< in-out:buffer with characters
* @return next code unit
*/
ecma_char_t
lit_utf8_peek_next (lit_utf8_byte_t *buf_p) /**< in-out:buffer with characters */
lit_utf8_peek_next (const lit_utf8_byte_t *buf_p) /**< in-out:buffer with characters */
{
JERRY_ASSERT (buf_p);
ecma_char_t ch;
@@ -651,7 +651,7 @@ lit_utf8_peek_next (lit_utf8_byte_t *buf_p) /**< in-out:buffer with characters *
* @return previous code unit
*/
ecma_char_t
lit_utf8_peek_prev (lit_utf8_byte_t *buf_p) /**< in-out:buffer with characters */
lit_utf8_peek_prev (const lit_utf8_byte_t *buf_p) /**< in-out:buffer with characters */
{
JERRY_ASSERT (buf_p);
ecma_char_t ch;
+3 -3
View File
@@ -1,4 +1,4 @@
/* Copyright 2015 Samsung Electronics Co., Ltd.
/* Copyright 2015-2016 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -183,8 +183,8 @@ lit_utf8_size_t lit_read_prev_code_unit_from_utf8 (const lit_utf8_byte_t *,
ecma_char_t lit_utf8_read_next (lit_utf8_byte_t **);
ecma_char_t lit_utf8_read_prev (lit_utf8_byte_t **);
ecma_char_t lit_utf8_peek_next (lit_utf8_byte_t *);
ecma_char_t lit_utf8_peek_prev (lit_utf8_byte_t *);
ecma_char_t lit_utf8_peek_next (const lit_utf8_byte_t *);
ecma_char_t lit_utf8_peek_prev (const lit_utf8_byte_t *);
void lit_utf8_incr (lit_utf8_byte_t **);
void lit_utf8_decr (lit_utf8_byte_t **);