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

Side by Side Diff: runtime/bin/platform_patch.dart

Issue 2230383003: Implement @patch annotation for patch class members (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: wip Created 4 years, 4 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/io_service_patch.dart ('k') | runtime/bin/process_patch.dart » ('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 @patch class _Platform { 5 @patch class _Platform {
6 /* @patch */ static int _numberOfProcessors() 6 @patch static int _numberOfProcessors()
7 native "Platform_NumberOfProcessors"; 7 native "Platform_NumberOfProcessors";
8 /* @patch */ static String _pathSeparator() 8 @patch static String _pathSeparator()
9 native "Platform_PathSeparator"; 9 native "Platform_PathSeparator";
10 /* @patch */ static String _operatingSystem() 10 @patch static String _operatingSystem()
11 native "Platform_OperatingSystem"; 11 native "Platform_OperatingSystem";
12 /* @patch */ static _localHostname() 12 @patch static _localHostname()
13 native "Platform_LocalHostname"; 13 native "Platform_LocalHostname";
14 /* @patch */ static _executable() 14 @patch static _executable()
15 native "Platform_ExecutableName"; 15 native "Platform_ExecutableName";
16 /* @patch */ static _resolvedExecutable() 16 @patch static _resolvedExecutable()
17 native "Platform_ResolvedExecutableName"; 17 native "Platform_ResolvedExecutableName";
18 /* @patch */ static _environment() 18 @patch static _environment()
19 native "Platform_Environment"; 19 native "Platform_Environment";
20 /* @patch */ static List<String> _executableArguments() 20 @patch static List<String> _executableArguments()
21 native "Platform_ExecutableArguments"; 21 native "Platform_ExecutableArguments";
22 /* @patch */ static String _version() 22 @patch static String _version()
23 native "Platform_GetVersion"; 23 native "Platform_GetVersion";
24 24
25 /* @patch */ static String _packageRoot() 25 @patch static String _packageRoot()
26 => VMLibraryHooks.packageRootString; 26 => VMLibraryHooks.packageRootString;
27 /* @patch */ static String _packageConfig() 27 @patch static String _packageConfig()
28 => VMLibraryHooks.packageConfigString; 28 => VMLibraryHooks.packageConfigString;
29 29
30 // This script singleton is written to by the embedder if applicable. 30 // This script singleton is written to by the embedder if applicable.
31 /* @patch */ static void set _nativeScript(String path) { 31 @patch static void set _nativeScript(String path) {
32 if (path.startsWith('http:') || 32 if (path.startsWith('http:') ||
33 path.startsWith('https:') || 33 path.startsWith('https:') ||
34 path.startsWith('package:') || 34 path.startsWith('package:') ||
35 path.startsWith('dart:') || 35 path.startsWith('dart:') ||
36 path.startsWith('data:') || 36 path.startsWith('data:') ||
37 path.startsWith('file:')) { 37 path.startsWith('file:')) {
38 script = Uri.parse(path); 38 script = Uri.parse(path);
39 } else { 39 } else {
40 script = Uri.base.resolveUri(new Uri.file(path)); 40 script = Uri.base.resolveUri(new Uri.file(path));
41 } 41 }
42 VMLibraryHooks.platformScript = script; 42 VMLibraryHooks.platformScript = script;
43 } 43 }
44 } 44 }
OLDNEW
« no previous file with comments | « runtime/bin/io_service_patch.dart ('k') | runtime/bin/process_patch.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698