dart-sdk/runtime/bin/loader.h
Vyacheslav Egorov bda70c8489 [vm] Remove support for dart-ext: imports
Per breaking change #45451 we are removing support for dart-ext:
style native extensions from the Dart VM.

This CL removes the associated VM code, tests and samples. It also ports
a single test which used dart-ext: import to use FFI instead.

TEST=ci

Bug: https://github.com/dart-lang/sdk/issues/45451
Change-Id: Iae984bce32baf29a950b5de1323939006a217b94
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/212050
Commit-Queue: Slava Egorov <vegorov@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2021-09-02 14:14:35 +00:00

46 lines
1.4 KiB
C++

// Copyright (c) 2016, 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_BIN_LOADER_H_
#define RUNTIME_BIN_LOADER_H_
#include "bin/isolate_data.h"
#include "bin/thread.h"
#include "include/dart_api.h"
#include "include/dart_native_api.h"
#include "platform/assert.h"
#include "platform/globals.h"
namespace dart {
namespace bin {
class Loader {
public:
static Dart_Handle InitForSnapshot(const char* snapshot_uri,
IsolateData* isolate_data);
// A static tag handler that hides all usage of a loader for an isolate.
static Dart_Handle LibraryTagHandler(Dart_LibraryTag tag,
Dart_Handle library,
Dart_Handle url);
static Dart_Handle DeferredLoadHandler(intptr_t loading_unit_id);
static void InitOnce();
private:
static Dart_Handle Init(const char* packages_file,
const char* working_directory,
const char* root_script_uri);
static Dart_Handle LoadImportExtension(const char* url_string,
Dart_Handle library);
DISALLOW_ALLOCATION();
DISALLOW_IMPLICIT_CONSTRUCTORS(Loader);
};
} // namespace bin
} // namespace dart
#endif // RUNTIME_BIN_LOADER_H_