1// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
2// for details. All rights reserved. Use of this source code is governed by a
3// BSD-style license that can be found in the LICENSE file.
4
5#ifndef RUNTIME_VM_THREAD_STACK_RESOURCE_H_
6#define RUNTIME_VM_THREAD_STACK_RESOURCE_H_
7
8#include "vm/allocation.h"
9#include "vm/globals.h"
10
11namespace dart {
12
13class Isolate;
14class IsolateGroup;
15class ThreadState;
16class Thread;
17
18class ThreadStackResource : public StackResource {
19 public:
20 explicit ThreadStackResource(Thread* T)
21 : StackResource(reinterpret_cast<ThreadState*>(T)) {}
22
23 ~ThreadStackResource();
24
25 Thread* thread() const {
26 return reinterpret_cast<Thread*>(StackResource::thread());
27 }
28 Isolate* isolate() const;
29 IsolateGroup* isolate_group() const;
30};
31
32} // namespace dart
33
34#endif // RUNTIME_VM_THREAD_STACK_RESOURCE_H_
35