Parser improvements.

The number of delete opcodes is reduced to two from six. The
range of numbers which can be included in the byte code is
doubled from (-127,127) to (-256,256).

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
This commit is contained in:
Zoltan Herczeg
2016-06-09 05:52:17 -07:00
parent 3c83af9f23
commit eed84a7dd9
8 changed files with 79 additions and 64 deletions
+1 -1
View File
@@ -1553,7 +1553,7 @@ lexer_construct_number_object (parser_context_t *context_p, /**< context */
if (int_num == num)
{
if (int_num < CBC_PUSH_NUMBER_1_RANGE_END
if (int_num <= CBC_PUSH_NUMBER_BYTE_RANGE_END
&& (int_num != 0 || !is_negative_number))
{
context_p->lit_object.index = (uint16_t) int_num;