| Index: runtime/vm/parser.h
|
| diff --git a/runtime/vm/parser.h b/runtime/vm/parser.h
|
| index c7f766efe829abc6ed46fa580f9fdca96c627e1c..983715fc9e03d4708cc1abba5b6b1b0a2ba76d51 100644
|
| --- a/runtime/vm/parser.h
|
| +++ b/runtime/vm/parser.h
|
| @@ -261,6 +261,23 @@ class ParsedFunction : public ZoneAllocated {
|
| DISALLOW_COPY_AND_ASSIGN(ParsedFunction);
|
| };
|
|
|
| +class EnterParserScope : public StackResource {
|
| + public:
|
| + explicit EnterParserScope(Thread* thread);
|
| + virtual ~EnterParserScope();
|
| +
|
| + private:
|
| + bool old_;
|
| +};
|
| +
|
| +class LeaveParserScope : public StackResource {
|
| + public:
|
| + explicit LeaveParserScope(Thread* thread);
|
| + virtual ~LeaveParserScope();
|
| +
|
| + private:
|
| + bool old_;
|
| +};
|
|
|
| class Parser : public ValueObject {
|
| public:
|
| @@ -949,6 +966,8 @@ class Parser : public ValueObject {
|
| Thread* thread_; // Cached current thread.
|
| Isolate* isolate_; // Cached current isolate.
|
|
|
| + EnterParserScope enter_parser_scope_;
|
| +
|
| // It is Heap::kNew for mutator thread and Heap::kOld for other threads (e.g.
|
| // background compiler).
|
| Heap::Space allocation_space_;
|
|
|