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

Side by Side Diff: pkg/compiler/lib/src/kernel/dart2js_target.dart

Issue 2992073002: FE: let targets override whether imports to internal platform libraries (dart:_foo) are allowed. (Closed)
Patch Set: Created 3 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 | « no previous file | pkg/front_end/lib/src/fasta/loader.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) 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 library compiler.src.kernel.dart2js_target; 5 library compiler.src.kernel.dart2js_target;
6 6
7 import 'package:kernel/kernel.dart'; 7 import 'package:kernel/kernel.dart';
8 import 'package:kernel/core_types.dart'; 8 import 'package:kernel/core_types.dart';
9 import 'package:kernel/class_hierarchy.dart'; 9 import 'package:kernel/class_hierarchy.dart';
10 import 'package:kernel/target/targets.dart'; 10 import 'package:kernel/target/targets.dart';
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 'dart:web_gl', 45 'dart:web_gl',
46 'dart:web_sql', 46 'dart:web_sql',
47 ]; 47 ];
48 48
49 @override 49 @override
50 bool mayDefineRestrictedType(Uri uri) => 50 bool mayDefineRestrictedType(Uri uri) =>
51 uri.scheme == 'dart' && 51 uri.scheme == 'dart' &&
52 (uri.path == 'core' || uri.path == '_interceptors'); 52 (uri.path == 'core' || uri.path == '_interceptors');
53 53
54 @override 54 @override
55 bool allowPlatformPrivateLibraryAccess(Uri importer, Uri imported) =>
56 super.allowPlatformPrivateLibraryAccess(importer, imported) ||
57 maybeEnableNative(importer);
58
59 @override
55 bool enableNative(Uri uri) => maybeEnableNative(uri); 60 bool enableNative(Uri uri) => maybeEnableNative(uri);
56 61
57 @override 62 @override
58 bool get nativeExtensionExpectsString => false; 63 bool get nativeExtensionExpectsString => false;
59 64
60 @override 65 @override
61 void performModularTransformationsOnLibraries( 66 void performModularTransformationsOnLibraries(
62 CoreTypes coreTypes, ClassHierarchy hierarchy, List<Library> libraries, 67 CoreTypes coreTypes, ClassHierarchy hierarchy, List<Library> libraries,
63 {void logger(String msg)}) {} 68 {void logger(String msg)}) {}
64 69
(...skipping 18 matching lines...) Expand all
83 bool isLocalVariable: false, 88 bool isLocalVariable: false,
84 bool isDynamic: false, 89 bool isDynamic: false,
85 bool isSuper: false, 90 bool isSuper: false,
86 bool isStatic: false, 91 bool isStatic: false,
87 bool isConstructor: false, 92 bool isConstructor: false,
88 bool isTopLevel: false}) { 93 bool isTopLevel: false}) {
89 // TODO(sigmund): implement; 94 // TODO(sigmund): implement;
90 return new InvalidExpression(); 95 return new InvalidExpression();
91 } 96 }
92 } 97 }
OLDNEW
« no previous file with comments | « no previous file | pkg/front_end/lib/src/fasta/loader.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698