Flutter Engine
The Flutter Engine
loader.h
Go to the documentation of this file.
1// Copyright (c) 2016, 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_BIN_LOADER_H_
6#define RUNTIME_BIN_LOADER_H_
7
8#include "bin/isolate_data.h"
9#include "bin/thread.h"
10#include "include/dart_api.h"
12#include "platform/assert.h"
13#include "platform/globals.h"
14
15namespace dart {
16namespace bin {
17
18class Loader {
19 public:
20 static Dart_Handle InitForSnapshot(const char* snapshot_uri,
21 IsolateData* isolate_data);
22
23 // A static tag handler that hides all usage of a loader for an isolate.
25 Dart_Handle library,
26 Dart_Handle url);
27 static Dart_Handle DeferredLoadHandler(intptr_t loading_unit_id);
28
29 static void InitOnce();
30
31 private:
32 static Dart_Handle Init(const char* packages_file,
33 const char* working_directory,
34 const char* root_script_uri);
35
36 static Dart_Handle LoadImportExtension(const char* url_string,
37 Dart_Handle library);
38
39 DISALLOW_ALLOCATION();
40 DISALLOW_IMPLICIT_CONSTRUCTORS(Loader);
41};
42
43} // namespace bin
44} // namespace dart
45
46#endif // RUNTIME_BIN_LOADER_H_
static Dart_Handle InitForSnapshot(const char *snapshot_uri, IsolateData *isolate_data)
Definition: loader.cc:28
static Dart_Handle DeferredLoadHandler(intptr_t loading_unit_id)
Definition: loader.cc:144
static Dart_Handle LibraryTagHandler(Dart_LibraryTag tag, Dart_Handle library, Dart_Handle url)
Definition: loader.cc:69
static void InitOnce()
Definition: loader.cc:182
struct _Dart_Handle * Dart_Handle
Definition: dart_api.h:258
Dart_LibraryTag
Definition: dart_api.h:3419
Definition: dart_vm.cc:33