Support parsing async modifiers for functions. (#3460)
Only parsing is implemented, so the async functions currently behave like normal function except they return with a resolved Promise object when the function is terminated correctly. JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
This commit is contained in:
+7
-1
@@ -2098,6 +2098,12 @@ vm_loop (vm_frame_ctx_t *frame_ctx_p) /**< frame context */
|
||||
|
||||
goto error;
|
||||
}
|
||||
case VM_OC_RETURN_PROMISE:
|
||||
{
|
||||
result = opfunc_return_promise (left_value);
|
||||
left_value = ECMA_VALUE_UNDEFINED;
|
||||
goto error;
|
||||
}
|
||||
case VM_OC_STRING_CONCAT:
|
||||
{
|
||||
ecma_string_t *left_str_p = ecma_op_to_string (left_value);
|
||||
@@ -2131,7 +2137,7 @@ vm_loop (vm_frame_ctx_t *frame_ctx_p) /**< frame context */
|
||||
*stack_top_p++ = ecma_copy_value (collection_p->buffer_p[tagged_idx]);
|
||||
continue;
|
||||
}
|
||||
#endif /* ENABLED (JERRY_ES2015) */
|
||||
#endif /* ENABLED (JERRY_ES2015) */
|
||||
case VM_OC_PUSH_ELISON:
|
||||
{
|
||||
*stack_top_p++ = ECMA_VALUE_ARRAY_HOLE;
|
||||
|
||||
Reference in New Issue
Block a user