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

Side by Side Diff: pkg/front_end/test/src/incremental/mock_sdk.dart

Issue 2879063002: Skip native clauses when parsing directives. (Closed)
Patch Set: Created 3 years, 7 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 | « pkg/front_end/lib/src/incremental/file_state.dart ('k') | no next file » | 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) 2017, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2017, 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 import 'package:front_end/memory_file_system.dart'; 5 import 'package:front_end/memory_file_system.dart';
6 6
7 /// Create SDK libraries which are used by Fasta to perform kernel generation. 7 /// Create SDK libraries which are used by Fasta to perform kernel generation.
8 /// Return the mapping from the simple names of these library to the URIs 8 /// Return the mapping from the simple names of these library to the URIs
9 /// in the given [fileSystem]. The root of the SDK is `file:///sdk`. 9 /// in the given [fileSystem]. The root of the SDK is `file:///sdk`.
10 Map<String, Uri> createSdkFiles(MemoryFileSystem fileSystem) { 10 Map<String, Uri> createSdkFiles(MemoryFileSystem fileSystem) {
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 Function _asyncErrorWrapperHelper(continuation) {} 77 Function _asyncErrorWrapperHelper(continuation) {}
78 Future _awaitHelper( 78 Future _awaitHelper(
79 object, Function thenCallback, Function errorCallback, var awaiter) {} 79 object, Function thenCallback, Function errorCallback, var awaiter) {}
80 '''); 80 ''');
81 81
82 addSdkLibrary('collection', 'library dart.collection;'); 82 addSdkLibrary('collection', 'library dart.collection;');
83 addSdkLibrary('convert', 'library dart.convert;'); 83 addSdkLibrary('convert', 'library dart.convert;');
84 addSdkLibrary('developer', 'library dart.developer;'); 84 addSdkLibrary('developer', 'library dart.developer;');
85 addSdkLibrary('io', 'library dart.io;'); 85 addSdkLibrary('io', 'library dart.io;');
86 addSdkLibrary('isolate', 'library dart.isolate;'); 86 addSdkLibrary('isolate', 'library dart.isolate;');
87 addSdkLibrary('math', 'library dart.math;'); 87 addSdkLibrary(
88 'math',
89 '''
90 library dart.math;
91 double sin(num radians) => _sin(radians.toDouble());
92 double _sin(double x) native "Math_sin";
93 ''');
88 addSdkLibrary('mirrors', 'library dart.mirrors;'); 94 addSdkLibrary('mirrors', 'library dart.mirrors;');
89 addSdkLibrary('nativewrappers', 'library dart.nativewrappers;'); 95 addSdkLibrary('nativewrappers', 'library dart.nativewrappers;');
90 addSdkLibrary('profiler', 'library dart.profiler;'); 96 addSdkLibrary('profiler', 'library dart.profiler;');
91 addSdkLibrary('typed_data', 'library dart.typed_data;'); 97 addSdkLibrary('typed_data', 'library dart.typed_data;');
92 addSdkLibrary('vmservice_io', 'library dart.vmservice_io;'); 98 addSdkLibrary('vmservice_io', 'library dart.vmservice_io;');
93 addSdkLibrary('_builtin', 'library dart._builtin;'); 99 addSdkLibrary('_builtin', 'library dart._builtin;');
94 addSdkLibrary('_internal', 'library dart._internal; class Symbol {}'); 100 addSdkLibrary(
101 '_internal',
102 '''
103 library dart._internal;
104 class Symbol {}
105 class ExternalName {
106 final String name;
107 const ExternalName(this.name);
108 }
109 ''');
95 addSdkLibrary('_vmservice', 'library dart._vmservice;'); 110 addSdkLibrary('_vmservice', 'library dart._vmservice;');
96 111
97 return dartLibraries; 112 return dartLibraries;
98 } 113 }
OLDNEW
« no previous file with comments | « pkg/front_end/lib/src/incremental/file_state.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698