d46a696957
This reverts commit 03777dba31.
Reason for revert: Failures in couple of bots
Original change's description:
> Reland : [VM/Runtime] Cleanup package config initialization code
>
> - Use _Init function for initialization of package config
> - Remove DartUtils::SetWorkingDirectory, SingleArgDart_Invoke,
>
> DartUtils::SetupPackageConfig
> - Rename Loader::InitForSnapshot to Loader::Init
> - Remove _setPackagesConfig, _setWorkingDirectory from builtin library
> - Rename _setPackagesMap to _setPackagesConfig
> Change-Id: I1e4a25e79706d7764247c9fbfcc8e8ce3231343c
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151633
> Reviewed-by: Alexander Aprelev <aam@google.com>
> Commit-Queue: Siva Annamalai <asiva@google.com>
TBR=aam@google.com,asiva@google.com
Change-Id: Ibea8c35fe310ac7708f00bb9ffd58715b6924cb5
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151869
Reviewed-by: Siva Annamalai <asiva@google.com>
Auto-Submit: Siva Annamalai <asiva@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
48 lines
1.4 KiB
C++
48 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);
|
|
|
|
static Dart_Handle ReloadNativeExtensions();
|
|
|
|
// 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 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_
|