Flutter Engine
The Flutter Engine
third_party
dart-lang
sdk
runtime
vm
longjump.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_LONGJUMP_H_
6
#define RUNTIME_VM_LONGJUMP_H_
7
8
#include <setjmp.h>
9
10
#include "
vm/allocation.h
"
11
#include "
vm/thread_state.h
"
12
13
namespace
dart
{
14
15
class
Error;
16
17
class
LongJumpScope
:
public
StackResource
{
18
public
:
19
explicit
LongJumpScope
(
ThreadState
*
thread
=
ThreadState::Current
())
20
:
StackResource
(
thread
), top_(nullptr), base_(
thread
->long_jump_base()) {
21
thread
->
set_long_jump_base
(
this
);
22
}
23
24
~LongJumpScope
() {
25
ASSERT
(
thread
() ==
ThreadState::Current
());
26
thread
()->
set_long_jump_base
(base_);
27
}
28
29
jmp_buf*
Set
();
30
DART_NORETURN
void
Jump
(
int
value
,
const
Error
&
error
);
31
DART_NORETURN
void
Jump
(
int
value
);
32
33
private
:
34
jmp_buf environment_;
35
StackResource
* top_;
36
LongJumpScope
* base_;
37
38
DISALLOW_COPY_AND_ASSIGN(
LongJumpScope
);
39
};
40
41
}
// namespace dart
42
43
#endif
// RUNTIME_VM_LONGJUMP_H_
dart::Error
Definition:
object.h:8049
dart::LongJumpScope
Definition:
longjump.h:17
dart::LongJumpScope::Jump
DART_NORETURN void Jump(int value, const Error &error)
Definition:
longjump.cc:22
dart::LongJumpScope::LongJumpScope
LongJumpScope(ThreadState *thread=ThreadState::Current())
Definition:
longjump.h:19
dart::LongJumpScope::Set
jmp_buf * Set()
Definition:
longjump.cc:16
dart::LongJumpScope::~LongJumpScope
~LongJumpScope()
Definition:
longjump.h:24
dart::StackResource
Definition:
allocation.h:23
dart::StackResource::thread
ThreadState * thread() const
Definition:
allocation.h:33
dart::ThreadState
Definition:
thread_state.h:24
dart::ThreadState::set_long_jump_base
void set_long_jump_base(LongJumpScope *value)
Definition:
thread_state.h:48
dart::ThreadState::Current
static ThreadState * Current()
Definition:
thread_state.h:27
ASSERT
#define ASSERT(E)
Definition:
entrypoints_verification_test.cc:25
error
const uint8_t uint32_t uint32_t GError ** error
Definition:
fl_pixel_buffer_texture_test.cc:40
value
uint8_t value
Definition:
fl_standard_message_codec.cc:36
dart
Definition:
dart_vm.cc:33
allocation.h
thread_state.h
Generated on Sun Jun 23 2024 21:55:43 for Flutter Engine by
1.9.4