Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(635)

Side by Side Diff: runtime/bin/extensions.h

Issue 1896203002: Search for a native extension for the host architecture (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « runtime/bin/dartutils.cc ('k') | runtime/bin/extensions.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 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. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #ifndef BIN_EXTENSIONS_H_ 5 #ifndef BIN_EXTENSIONS_H_
6 #define BIN_EXTENSIONS_H_ 6 #define BIN_EXTENSIONS_H_
7 7
8 #include "include/dart_api.h" 8 #include "include/dart_api.h"
9 #include "platform/globals.h" 9 #include "platform/globals.h"
10 10
11 namespace dart { 11 namespace dart {
12 namespace bin { 12 namespace bin {
13 13
14 class Extensions { 14 class Extensions {
15 public: 15 public:
16 // TODO(whesse): Make extension load from a relative path relative to 16 // TODO(whesse): Make extension load from a relative path relative to
17 // the library it is in. Currently loads from current working directory. 17 // the library it is in. Currently loads from current working directory.
18 static Dart_Handle LoadExtension(const char* extension_directory, 18 static Dart_Handle LoadExtension(const char* extension_directory,
19 const char* extension_filename,
20 const char* extension_name, 19 const char* extension_name,
21 Dart_Handle parent_library); 20 Dart_Handle parent_library);
22 21
23 // Platform-specific implementations. 22 // Platform-specific implementations.
24 static void* LoadExtensionLibrary(const char* library_file); 23 static void* LoadExtensionLibrary(const char* library_file);
25 static void* ResolveSymbol(void* lib_handle, const char* symbol); 24 static void* ResolveSymbol(void* lib_handle, const char* symbol);
26 25
27 private: 26 private:
28 static Dart_Handle GetError(); 27 static Dart_Handle GetError();
29 28
30 // The returned string is scope allocated. 29 // The returned string is scope allocated.
31 static const char* Concatenate(const char** strings); 30 static const char* Concatenate(const char** strings);
32 31
33 DISALLOW_ALLOCATION(); 32 DISALLOW_ALLOCATION();
34 DISALLOW_IMPLICIT_CONSTRUCTORS(Extensions); 33 DISALLOW_IMPLICIT_CONSTRUCTORS(Extensions);
35 }; 34 };
36 35
37 } // namespace bin 36 } // namespace bin
38 } // namespace dart 37 } // namespace dart
39 38
40 #endif // BIN_EXTENSIONS_H_ 39 #endif // BIN_EXTENSIONS_H_
OLDNEW
« no previous file with comments | « runtime/bin/dartutils.cc ('k') | runtime/bin/extensions.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698