Bug 666396 - Implemement yield*. r=jorendorff, r=Waldo

This commit is contained in:
Andy Wingo
2013-09-19 15:26:26 +02:00
parent e2d091cbe4
commit e72bfb550b
30 changed files with 826 additions and 69 deletions

View File

@@ -1803,12 +1803,12 @@ NativeMethod(JSContext *cx, unsigned argc, Value *vp)
}
#define JSPROP_ROPERM (JSPROP_READONLY | JSPROP_PERMANENT)
#define JS_METHOD(name, T, impl, len, perms) JS_FN(name, (NativeMethod<T,impl>), len, perms)
#define JS_METHOD(name, T, impl, len, attrs) JS_FN(name, (NativeMethod<T,impl>), len, attrs)
static const JSFunctionSpec star_generator_methods[] = {
JS_FN("iterator", iterator_iterator, 0, 0),
JS_METHOD("next", StarGeneratorObject, star_generator_next, 1, JSPROP_ROPERM),
JS_METHOD("throw", StarGeneratorObject, star_generator_throw, 1, JSPROP_ROPERM),
JS_METHOD("next", StarGeneratorObject, star_generator_next, 1, 0),
JS_METHOD("throw", StarGeneratorObject, star_generator_throw, 1, 0),
JS_FS_END
};