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
@@ -247,7 +247,7 @@ typedef enum
VM_OC_PUSH_CONSTRUCTOR_SUPER, /**< push 'super' inside a class constructor */
VM_OC_PUSH_CONSTRUCTOR_THIS, /**< push 'this' inside a class constructor */
VM_OC_CONSTRUCTOR_RET, /**< explicit return from a class constructor */
VM_OC_CREATE_SPREAD_OBJECT, /**< create spread object */
VM_OC_PUSH_SPREAD_ELEMENT, /**< push spread element */
VM_OC_GET_ITERATOR, /**< GetIterator abstract operation */
VM_OC_ITERATOR_STEP, /**< IteratorStep abstract operation */
VM_OC_DEFAULT_INITIALIZER, /**< default initializer inside a pattern */
@@ -296,7 +296,7 @@ typedef enum
VM_OC_PUSH_CONSTRUCTOR_SUPER = VM_OC_NONE, /**< push 'super' inside a class constructor */
VM_OC_PUSH_CONSTRUCTOR_THIS = VM_OC_NONE, /**< push 'this' inside a class constructor */
VM_OC_CONSTRUCTOR_RET = VM_OC_NONE, /**< explicit return from a class constructor */
VM_OC_CREATE_SPREAD_OBJECT = VM_OC_NONE, /**< create spread object */
VM_OC_PUSH_SPREAD_ELEMENT = VM_OC_NONE, /**< push spread element */
VM_OC_GET_ITERATOR = VM_OC_NONE, /**< GetIterator abstract operation */
VM_OC_ITERATOR_STEP = VM_OC_NONE, /**< IteratorStep abstract operation */
VM_OC_DEFAULT_INITIALIZER = VM_OC_NONE, /**< default initializer inside a pattern */