Chromium Code Reviews| Index: src/parsing/parser.h |
| diff --git a/src/parsing/parser.h b/src/parsing/parser.h |
| index 20c79371822276d08a8b1691a4855a9fb090ad59..206ea944057d7f8b316eb888773b6fbcfad11c85 100644 |
| --- a/src/parsing/parser.h |
| +++ b/src/parsing/parser.h |
| @@ -543,6 +543,8 @@ class V8_EXPORT_PRIVATE Parser : public NON_EXPORTED_BASE(ParserBase<Parser>) { |
| Block* BuildParameterInitializationBlock( |
| const ParserFormalParameters& parameters, bool* ok); |
| Block* BuildRejectPromiseOnException(Block* block); |
|
neis
2017/02/08 10:28:41
I find it a bit confusing to have both foo(T) and
gsathya
2017/02/09 00:55:45
There are no longer two functions with the same na
|
| + Block* BuildRejectPromiseOnExceptionForParameters(Block* block); |
| + Block* BuildRejectPromiseOnException(Block* block, bool do_return_promise); |
|
neis
2017/02/08 10:28:41
Please keep the argument name in sync with the one
gsathya
2017/02/09 00:55:45
Done.
|
| ZoneList<Statement*>* ParseFunction( |
| const AstRawString* function_name, int pos, FunctionKind kind, |
| @@ -628,9 +630,10 @@ class V8_EXPORT_PRIVATE Parser : public NON_EXPORTED_BASE(ParserBase<Parser>) { |
| Expression* BuildInitialYield(int pos, FunctionKind kind); |
| Assignment* BuildCreateJSGeneratorObject(int pos, FunctionKind kind); |
| - Expression* BuildResolvePromise(Expression* value, int pos); |
| - Expression* BuildRejectPromise(Expression* value, int pos); |
| + Expression* BuildResolvePromise(); |
| + Expression* BuildRejectPromise(); |
| Variable* PromiseVariable(); |
| + Variable* AsyncReturnVariable(); |
| // Generic AST generator for throwing errors from compiled code. |
| Expression* NewThrowError(Runtime::FunctionId function_id, |
| @@ -1042,7 +1045,7 @@ class V8_EXPORT_PRIVATE Parser : public NON_EXPORTED_BASE(ParserBase<Parser>) { |
| auto* init_block = BuildParameterInitializationBlock(parameters, ok); |
| if (!*ok) return; |
| if (is_async) { |
| - init_block = BuildRejectPromiseOnException(init_block); |
| + init_block = BuildRejectPromiseOnExceptionForParameters(init_block); |
| } |
| if (init_block != nullptr) body->Add(init_block, zone()); |
| } |