Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
third_party
dart-lang
sdk
runtime
vm
compiler
ffi
frame_rebase.h
Go to the documentation of this file.
1
// Copyright (c) 2020, 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_COMPILER_FFI_FRAME_REBASE_H_
6
#define RUNTIME_VM_COMPILER_FFI_FRAME_REBASE_H_
7
8
#if defined(DART_PRECOMPILED_RUNTIME)
9
#error "AOT runtime should not use compiler sources (including header files)"
10
#endif
// defined(DART_PRECOMPILED_RUNTIME)
11
12
#include "
vm/compiler/backend/locations.h
"
13
#include "
vm/compiler/ffi/native_location.h
"
14
#include "
vm/compiler/ffi/native_type.h
"
15
#include "
vm/compiler/runtime_api.h
"
16
#include "
vm/thread.h
"
17
18
namespace
dart
{
19
20
namespace
compiler
{
21
22
namespace
ffi {
23
24
// Describes a change of stack frame where the stack or base register or stack
25
// offset may change. This class allows easily rebasing stack locations across
26
// frame manipulations.
27
//
28
// If the stack offset register matches 'old_base', it is changed to 'new_base'
29
// and 'stack_delta_in_bytes' (# of bytes) is applied.
30
//
31
// This class can be used to rebase both Locations and NativeLocations.
32
class
FrameRebase
:
public
ValueObject
{
33
public
:
34
FrameRebase
(
Zone
* zone,
35
const
Register
old_base,
36
const
Register
new_base,
37
intptr_t stack_delta_in_bytes)
38
: zone_(zone),
39
old_base_(old_base),
40
new_base_(new_base),
41
stack_delta_in_bytes_(stack_delta_in_bytes) {}
42
43
const
NativeLocation
&
Rebase
(
const
NativeLocation
& loc)
const
;
44
45
Location
Rebase
(
const
Location
loc)
const
;
46
47
private
:
48
Zone
* zone_;
49
const
Register
old_base_;
50
const
Register
new_base_;
51
const
intptr_t stack_delta_in_bytes_;
52
};
53
54
}
// namespace ffi
55
56
}
// namespace compiler
57
58
}
// namespace dart
59
60
#endif
// RUNTIME_VM_COMPILER_FFI_FRAME_REBASE_H_
dart::Location
Definition
locations.h:198
dart::ValueObject
Definition
allocation.h:21
dart::Zone
Definition
unit_test_custom_zone.h:19
dart::compiler::ffi::FrameRebase
Definition
frame_rebase.h:32
dart::compiler::ffi::FrameRebase::FrameRebase
FrameRebase(Zone *zone, const Register old_base, const Register new_base, intptr_t stack_delta_in_bytes)
Definition
frame_rebase.h:34
dart::compiler::ffi::FrameRebase::Rebase
const NativeLocation & Rebase(const NativeLocation &loc) const
Definition
frame_rebase.cc:13
dart::compiler::ffi::NativeLocation
Definition
native_location.h:63
locations.h
compiler
Definition
compiler.py:1
dart
Definition
dart_vm.cc:33
dart::Register
Register
Definition
constants_arm.h:81
native_location.h
native_type.h
runtime_api.h
thread.h
Generated on Fri Apr 26 2024 06:14:58 for Flutter Engine by
1.9.8