mirror of
https://github.com/dart-lang/sdk
synced 2024-11-02 14:32:24 +00:00
453fce9e77
TEST=ci Change-Id: I319c932a6f4b6e18d7e53b66d69702bf017e4b93 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/313060 Commit-Queue: Ryan Macnak <rmacnak@google.com> Reviewed-by: Alexander Aprelev <aam@google.com>
72 lines
1.8 KiB
C++
72 lines
1.8 KiB
C++
// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file
|
|
// for details. All rights reserved. Use of this source code is governed by a
|
|
// BSD-style license that can be found in the LICENSE file.
|
|
|
|
#include <setjmp.h> // NOLINT
|
|
#include <stdlib.h>
|
|
|
|
#include "vm/globals.h"
|
|
#if defined(TARGET_ARCH_X64)
|
|
|
|
// Only build the simulator if not compiling for real X64 hardware.
|
|
#if defined(USING_SIMULATOR)
|
|
|
|
#include "vm/simulator.h"
|
|
|
|
#include "vm/heap/safepoint.h"
|
|
#include "vm/isolate.h"
|
|
|
|
namespace dart {
|
|
|
|
// Get the active Simulator for the current isolate.
|
|
Simulator* Simulator::Current() {
|
|
Isolate* isolate = Isolate::Current();
|
|
Simulator* simulator = isolate->simulator();
|
|
if (simulator == nullptr) {
|
|
NoSafepointScope no_safepoint;
|
|
simulator = new Simulator();
|
|
isolate->set_simulator(simulator);
|
|
}
|
|
return simulator;
|
|
}
|
|
|
|
void Simulator::Init() {}
|
|
|
|
Simulator::Simulator() {}
|
|
|
|
Simulator::~Simulator() {
|
|
Isolate* isolate = Isolate::Current();
|
|
if (isolate != nullptr) {
|
|
isolate->set_simulator(nullptr);
|
|
}
|
|
}
|
|
|
|
int64_t Simulator::Call(int64_t entry,
|
|
int64_t parameter0,
|
|
int64_t parameter1,
|
|
int64_t parameter2,
|
|
int64_t parameter3,
|
|
bool fp_return,
|
|
bool fp_args) {
|
|
UNIMPLEMENTED();
|
|
}
|
|
|
|
void Simulator::JumpToFrame(uword pc, uword sp, uword fp, Thread* thread) {
|
|
UNIMPLEMENTED();
|
|
}
|
|
|
|
uword Simulator::RedirectExternalReference(uword function,
|
|
CallKind call_kind,
|
|
int argument_count) {
|
|
return 0;
|
|
}
|
|
|
|
uword Simulator::FunctionForRedirect(uword redirect) {
|
|
return 0;
|
|
}
|
|
|
|
} // namespace dart
|
|
|
|
#endif // !defined(USING_SIMULATOR)
|
|
|
|
#endif // defined TARGET_ARCH_X64
|