Files
sdk/runtime/vm/module_snapshot.h
Ryan Macnak 94347fdf01 [vm] Don't use ApiError to represent errors during startup.
With the removal of the VM isolate and less bootstrapping being repeated in the AOT runtime, ApiError cannot be instantiated until after snapshot loading succeeds.

TEST=ci
Change-Id: I5be295e87e6d6351ada40d2837825b1f93672ac7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/501262
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2026-05-12 08:41:20 -07:00

30 lines
904 B
C++

// Copyright (c) 2025, 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.
#ifndef RUNTIME_VM_MODULE_SNAPSHOT_H_
#define RUNTIME_VM_MODULE_SNAPSHOT_H_
#if !defined(DART_PRECOMPILED_RUNTIME)
#include "platform/assert.h"
#include "vm/allocation.h"
#include "vm/globals.h"
#include "vm/snapshot.h"
#include "vm/thread.h"
namespace dart {
namespace module_snapshot {
// On success, returns nullptr. On failure, returns an error message that the
// caller must free.
char* ReadModuleSnapshot(Thread* thread,
const Snapshot* snapshot,
const uint8_t* instructions_buffer);
} // namespace module_snapshot
} // namespace dart
#endif // !defined(DART_PRECOMPILED_RUNTIME)
#endif // RUNTIME_VM_MODULE_SNAPSHOT_H_