Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
third_party
dart-lang
sdk
runtime
vm
thread_stack_resource.h
Go to the documentation of this file.
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 <type_traits>
9
#include <utility>
10
11
#include "
vm/allocation.h
"
12
#include "
vm/globals.h
"
13
14
namespace
dart
{
15
16
class
Isolate;
17
class
IsolateGroup;
18
class
ThreadState;
19
class
Thread;
20
21
class
ThreadStackResource
:
public
StackResource
{
22
public
:
23
explicit
ThreadStackResource
(
Thread
*
T
)
24
:
StackResource
(reinterpret_cast<
ThreadState
*>(
T
)) {}
25
26
~ThreadStackResource
();
27
28
Thread
*
thread
()
const
{
29
return
reinterpret_cast<
Thread
*
>
(
StackResource::thread
());
30
}
31
Isolate
*
isolate
()
const
;
32
IsolateGroup
*
isolate_group
()
const
;
33
};
34
35
template
<
typename
T
,
typename
... Args>
36
class
AsThreadStackResource
:
public
ThreadStackResource
{
37
public
:
38
static_assert
(!std::is_base_of<StackResource, T>::value);
39
explicit
AsThreadStackResource
(
Thread
*
thread
, Args&&...
args
)
40
:
ThreadStackResource
(
thread
),
41
member_(
thread
,
std
::forward<Args>(
args
)...) {}
42
~AsThreadStackResource
() {}
43
44
private
:
45
T
member_;
46
};
47
48
}
// namespace dart
49
50
#endif
// RUNTIME_VM_THREAD_STACK_RESOURCE_H_
dart::AsThreadStackResource
Definition
thread_stack_resource.h:36
dart::AsThreadStackResource::~AsThreadStackResource
~AsThreadStackResource()
Definition
thread_stack_resource.h:42
dart::AsThreadStackResource::AsThreadStackResource
AsThreadStackResource(Thread *thread, Args &&... args)
Definition
thread_stack_resource.h:39
dart::IsolateGroup
Definition
isolate.h:267
dart::Isolate
Definition
isolate.h:909
dart::StackResource
Definition
allocation.h:23
dart::StackResource::thread
ThreadState * thread() const
Definition
allocation.h:33
dart::ThreadStackResource
Definition
thread_stack_resource.h:21
dart::ThreadStackResource::~ThreadStackResource
~ThreadStackResource()
Definition
thread_stack_resource.cc:14
dart::ThreadStackResource::thread
Thread * thread() const
Definition
thread_stack_resource.h:28
dart::ThreadStackResource::ThreadStackResource
ThreadStackResource(Thread *T)
Definition
thread_stack_resource.h:23
dart::ThreadStackResource::isolate_group
IsolateGroup * isolate_group() const
Definition
thread_stack_resource.cc:26
dart::ThreadStackResource::isolate
Isolate * isolate() const
Definition
thread_stack_resource.cc:22
dart::ThreadState
Definition
thread_state.h:24
dart::Thread
Definition
thread.h:342
args
G_BEGIN_DECLS G_MODULE_EXPORT FlValue * args
Definition
fl_event_channel.h:89
dart
Definition
dart_vm.cc:33
std
Definition
ref_ptr.h:256
T
#define T
Definition
precompiler.cc:65
allocation.h
globals.h
Generated on Fri Apr 26 2024 06:15:20 for Flutter Engine by
1.9.8