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

Side by Side Diff: sdk/lib/_internal/compiler/implementation/apiimpl.dart

Issue 12254010: Make Uri.isAbsolute and Uri.hasAuthority getters. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | sdk/lib/_internal/compiler/implementation/library_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) 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 library leg_apiimpl; 5 library leg_apiimpl;
6 6
7 import 'dart:uri'; 7 import 'dart:uri';
8 import 'dart:async'; 8 import 'dart:async';
9 9
10 import '../compiler.dart' as api; 10 import '../compiler.dart' as api;
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 if (resolvedUri.scheme == 'dart') { 127 if (resolvedUri.scheme == 'dart') {
128 return translateDartUri(importingLibrary, resolvedUri, node); 128 return translateDartUri(importingLibrary, resolvedUri, node);
129 } 129 }
130 return resolvedUri; 130 return resolvedUri;
131 } 131 }
132 132
133 /** 133 /**
134 * Reads the script designated by [readableUri]. 134 * Reads the script designated by [readableUri].
135 */ 135 */
136 leg.Script readScript(Uri readableUri, [tree.Node node]) { 136 leg.Script readScript(Uri readableUri, [tree.Node node]) {
137 if (!readableUri.isAbsolute()) { 137 if (!readableUri.isAbsolute) {
138 internalError('Relative uri $readableUri provided to readScript(Uri)', 138 internalError('Relative uri $readableUri provided to readScript(Uri)',
139 node: node); 139 node: node);
140 } 140 }
141 return fileReadingTask.measure(() { 141 return fileReadingTask.measure(() {
142 Uri resourceUri = translateUri(readableUri, node); 142 Uri resourceUri = translateUri(readableUri, node);
143 String text = ""; 143 String text = "";
144 try { 144 try {
145 // TODO(ahe): We expect the future to be complete and call value 145 // TODO(ahe): We expect the future to be complete and call value
146 // directly. In effect, we don't support truly asynchronous API. 146 // directly. In effect, we don't support truly asynchronous API.
147 text = deprecatedFutureValue(provider(resourceUri)); 147 text = deprecatedFutureValue(provider(resourceUri));
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 handler(translateUri(span.uri, null), span.begin, span.end, 257 handler(translateUri(span.uri, null), span.begin, span.end,
258 message, kind); 258 message, kind);
259 } 259 }
260 } 260 }
261 261
262 bool get isMockCompilation { 262 bool get isMockCompilation {
263 return mockableLibraryUsed 263 return mockableLibraryUsed
264 && (options.indexOf('--allow-mock-compilation') != -1); 264 && (options.indexOf('--allow-mock-compilation') != -1);
265 } 265 }
266 } 266 }
OLDNEW
« no previous file with comments | « no previous file | sdk/lib/_internal/compiler/implementation/library_loader.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698