Implement the basic Promise (#1695)

Implement the Promise Constructor and routine: 'then'

JerryScript-DCO-1.0-Signed-off-by: Zidong Jiang zidong.jiang@intel.com
This commit is contained in:
Zidong Jiang
2017-04-12 22:10:08 +08:00
committed by GitHub
parent 01fe5ab190
commit eb8dd4602b
23 changed files with 1579 additions and 40 deletions
@@ -462,6 +462,24 @@ BUILTIN (ECMA_BUILTIN_ID_UINT8CLAMPEDARRAY,
#endif /* !CONFIG_DISABLE_ES2015_TYPEDARRAY_BUILTIN */
#ifndef CONFIG_DISABLE_ES2015_PROMISE_BUILTIN
BUILTIN (ECMA_BUILTIN_ID_PROMISE_PROTOTYPE,
ECMA_OBJECT_TYPE_GENERAL,
ECMA_BUILTIN_ID_OBJECT_PROTOTYPE,
true,
true,
promise_prototype)
BUILTIN (ECMA_BUILTIN_ID_PROMISE,
ECMA_OBJECT_TYPE_FUNCTION,
ECMA_BUILTIN_ID_FUNCTION_PROTOTYPE,
true,
true,
promise)
#endif /* !CONFIG_DISABLE_ES2015_PROMISE_BUILTIN */
/* The Global object (15.1) */
BUILTIN (ECMA_BUILTIN_ID_GLOBAL,
ECMA_OBJECT_TYPE_GENERAL,