Eliminate the allocation of spread object (#3333)

ECMA_VALUE_SPREAD_ELEMENT can be used to represent that the next argument needs to be spreaded, therefore no allocation is needed.

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
This commit is contained in:
Robert Fancsik
2019-11-19 18:16:43 +01:00
committed by Dániel Bátyai
parent 70566a52fb
commit 830011c033
10 changed files with 49 additions and 207 deletions
+2 -2
View File
@@ -634,8 +634,8 @@
VM_OC_CONSTRUCTOR_RET | VM_OC_GET_STACK) \
CBC_OPCODE (CBC_EXT_ERROR, CBC_NO_FLAG, 0, \
VM_OC_ERROR) \
CBC_OPCODE (CBC_EXT_CREATE_SPREAD_OBJECT, CBC_NO_FLAG, 0, \
VM_OC_CREATE_SPREAD_OBJECT | VM_OC_GET_STACK | VM_OC_PUT_STACK) \
CBC_OPCODE (CBC_EXT_PUSH_SPREAD_ELEMENT, CBC_NO_FLAG, 1, \
VM_OC_PUSH_SPREAD_ELEMENT) \
CBC_OPCODE (CBC_EXT_SPREAD_ARRAY_APPEND, CBC_HAS_POP_STACK_BYTE_ARG, 0, \
VM_OC_APPEND_ARRAY) \
CBC_OPCODE (CBC_EXT_GET_ITERATOR, CBC_NO_FLAG, 1, \