Chromium Code Reviews| Index: src/builtins.cc |
| diff --git a/src/builtins.cc b/src/builtins.cc |
| index 5139ab74024e3446f95ce854e3a59bb5b5cf825c..38aa3dbdeb138e1e19338841527297d7f2a830de 100644 |
| --- a/src/builtins.cc |
| +++ b/src/builtins.cc |
| @@ -2498,6 +2498,17 @@ void Builtins::Generate_GeneratorPrototypeThrow(CodeStubAssembler* assembler) { |
| "[Generator].prototype.throw"); |
| } |
| +void Builtins::Generate_AsyncFunctionNext(CodeStubAssembler* assembler) { |
| + Generate_GeneratorPrototypeResume(assembler, JSGeneratorObject::kNext, |
| + "AsyncFunctionNext"); |
| +} |
| + |
| +// ES6 section 25.3.1.4 Generator.prototype.throw ( exception ) |
|
neis
2016/05/12 16:34:22
wrong comment
caitp (gmail)
2016/05/12 16:38:39
Acknowledged.
|
| +void Builtins::Generate_AsyncFunctionThrow(CodeStubAssembler* assembler) { |
| + Generate_GeneratorPrototypeResume(assembler, JSGeneratorObject::kThrow, |
| + "AsyncFunctionThrow"); |
| +} |
| + |
|
neis
2016/05/12 16:34:22
Can we get rid of these functions and just use Gen
caitp (gmail)
2016/05/12 16:38:39
We mark these as native, which prevents them from
|
| // ----------------------------------------------------------------------------- |
| // ES6 section 26.1 The Reflect Object |
| @@ -4223,6 +4234,13 @@ BUILTIN(GeneratorFunctionConstructor) { |
| return *result; |
| } |
| +BUILTIN(AsyncFunctionConstructor) { |
| + HandleScope scope(isolate); |
| + Handle<JSFunction> result; |
| + ASSIGN_RETURN_FAILURE_ON_EXCEPTION( |
| + isolate, result, CreateDynamicFunction(isolate, args, "async function")); |
| + return *result; |
| +} |
| // ES6 section 19.4.1.1 Symbol ( [ description ] ) for the [[Call]] case. |
| BUILTIN(SymbolConstructor) { |