Add support for new.target (#3469)

Notable changes:
* Extracted the pure JS/builtin and external C method invocations
  into two new methods (`ecma_op_function_call_{simple, external}`).
* Updated parser/scanner to handle "new.target" correctly.
* Added JS test case.

JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.u-szeged@partner.samsung.com
This commit is contained in:
Péter Gál
2020-01-14 13:34:19 +01:00
committed by Robert Fancsik
parent be8ae3aae8
commit 0fd1ed6f27
22 changed files with 841 additions and 124 deletions
+2
View File
@@ -680,6 +680,8 @@
VM_OC_EXT_RETURN | VM_OC_GET_STACK) \
CBC_OPCODE (CBC_EXT_RETURN_PROMISE, CBC_NO_FLAG, -1, \
VM_OC_RETURN_PROMISE | VM_OC_GET_STACK) \
CBC_OPCODE (CBC_EXT_PUSH_NEW_TARGET, CBC_NO_FLAG, 1, \
VM_OC_PUSH_NEW_TARGET | VM_OC_PUT_STACK) \
\
/* Last opcode (not a real opcode). */ \
CBC_OPCODE (CBC_EXT_END, CBC_NO_FLAG, 0, \