| Index: src/parsing/func-name-inferrer.h
|
| diff --git a/src/parsing/func-name-inferrer.h b/src/parsing/func-name-inferrer.h
|
| index ba38ffeb241c348ab8e285a842b08e5f12590615..6d5ca539bedfc22ee30b34ae66a7ae7a8188cdcb 100644
|
| --- a/src/parsing/func-name-inferrer.h
|
| +++ b/src/parsing/func-name-inferrer.h
|
| @@ -16,6 +16,8 @@ class AstString;
|
| class AstValueFactory;
|
| class FunctionLiteral;
|
|
|
| +enum class InferName { Yes, No };
|
| +
|
| // FuncNameInferrer is a stateful class that is used to perform name
|
| // inference for anonymous functions during static analysis of source code.
|
| // Inference is performed in cases when an anonymous function is assigned
|
| @@ -71,6 +73,20 @@ class FuncNameInferrer : public ZoneObject {
|
| }
|
| }
|
|
|
| + int LastNameIndex() const { return this->names_stack_.length() - 1; }
|
| + const AstRawString* LastName() const { return this->names_stack_.last(); }
|
| +
|
| + void RemoveNameAtIndex(int index) {
|
| + DCHECK(index >= 0);
|
| + DCHECK(index < names_stack_.length());
|
| + names_stack_.Remove(index);
|
| + }
|
| +
|
| + void RemoveLastName() {
|
| + DCHECK(names_stack_.length() > 0);
|
| + RemoveNameAtIndex(names_stack_.length() - 1);
|
| + }
|
| +
|
| // Infers a function name and leaves names collection state.
|
| void Infer() {
|
| DCHECK(IsOpen());
|
|
|