Flutter Engine
The Flutter Engine
simulator_x64.cc
Go to the documentation of this file.
1// Copyright (c) 2022, 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#include <setjmp.h> // NOLINT
6#include <stdlib.h>
7
8#include "vm/globals.h"
9#if defined(TARGET_ARCH_X64)
10
11// Only build the simulator if not compiling for real X64 hardware.
12#if defined(USING_SIMULATOR)
13
14#include "vm/simulator.h"
15
16#include "vm/heap/safepoint.h"
17#include "vm/isolate.h"
18
19namespace dart {
20
21// Get the active Simulator for the current isolate.
22Simulator* Simulator::Current() {
23 Isolate* isolate = Isolate::Current();
24 Simulator* simulator = isolate->simulator();
25 if (simulator == nullptr) {
26 NoSafepointScope no_safepoint;
27 simulator = new Simulator();
28 isolate->set_simulator(simulator);
29 }
30 return simulator;
31}
32
33void Simulator::Init() {}
34
36
38 Isolate* isolate = Isolate::Current();
39 if (isolate != nullptr) {
40 isolate->set_simulator(nullptr);
41 }
42}
43
44int64_t Simulator::Call(int64_t entry,
45 int64_t parameter0,
46 int64_t parameter1,
47 int64_t parameter2,
48 int64_t parameter3,
49 bool fp_return,
50 bool fp_args) {
52}
53
54void Simulator::JumpToFrame(uword pc, uword sp, uword fp, Thread* thread) {
56}
57
59 CallKind call_kind,
60 int argument_count) {
61 return 0;
62}
63
65 return 0;
66}
67
68} // namespace dart
69
70#endif // !defined(USING_SIMULATOR)
71
72#endif // defined TARGET_ARCH_X64
static Isolate * Current()
Definition: isolate.h:986
static uword RedirectExternalReference(uword function, CallKind call_kind, int argument_count)
void JumpToFrame(uword pc, uword sp, uword fp, Thread *thread)
static Simulator * Current()
static void Init()
int64_t Call(int32_t entry, int32_t parameter0, int32_t parameter1, int32_t parameter2, int32_t parameter3, bool fp_return=false, bool fp_args=false)
static uword FunctionForRedirect(uword redirect)
#define UNIMPLEMENTED
Dart_NativeFunction function
Definition: fuchsia.cc:51
int argument_count
Definition: fuchsia.cc:52
Definition: dart_vm.cc:33
uintptr_t uword
Definition: globals.h:501
const uint32_t fp