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

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

Issue 10967068: Stop importing js_helper.dart explicitly in the core library. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Undid changes not necessary for main compiler change. Created 8 years, 3 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
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 8
9 #import('../compiler.dart', prefix: 'api'); 9 #import('../compiler.dart', prefix: 'api');
10 #import('leg.dart', prefix: 'leg'); 10 #import('leg.dart', prefix: 'leg');
(...skipping 30 matching lines...) Expand all
41 String lookupLibraryPath(String dartLibraryName) { 41 String lookupLibraryPath(String dartLibraryName) {
42 LibraryInfo info = LIBRARIES[dartLibraryName]; 42 LibraryInfo info = LIBRARIES[dartLibraryName];
43 if (info === null) return null; 43 if (info === null) return null;
44 if (!info.isDart2jsLibrary) return null; 44 if (!info.isDart2jsLibrary) return null;
45 String path = info.dart2jsPath; 45 String path = info.dart2jsPath;
46 if (path === null) { 46 if (path === null) {
47 path = info.path; 47 path = info.path;
48 } 48 }
49 return "lib/$path"; 49 return "lib/$path";
50 } 50 }
51
51 String lookupPatchPath(String dartLibraryName) { 52 String lookupPatchPath(String dartLibraryName) {
52 LibraryInfo info = LIBRARIES[dartLibraryName]; 53 LibraryInfo info = LIBRARIES[dartLibraryName];
53 if (info === null) return null; 54 if (info === null) return null;
54 if (!info.isDart2jsLibrary) return null; 55 if (!info.isDart2jsLibrary) return null;
55 String path = info.dart2jsPatchPath; 56 String path = info.dart2jsPatchPath;
56 if (path === null) return null; 57 if (path === null) return null;
57 return "lib/$path"; 58 return "lib/$path";
58 } 59 }
59 60
60 elements.LibraryElement scanBuiltinLibrary(String path) { 61 elements.LibraryElement scanBuiltinLibrary(String path) {
61 Uri uri = libraryRoot.resolve(lookupLibraryPath(path)); 62 Uri uri = libraryRoot.resolve(lookupLibraryPath(path));
62 Uri canonicalUri; 63 Uri canonicalUri = null;
63 if (path.startsWith("_")) { 64 if (!path.startsWith("_")) {
64 canonicalUri = uri;
65 } else {
66 canonicalUri = new Uri.fromComponents(scheme: "dart", path: path); 65 canonicalUri = new Uri.fromComponents(scheme: "dart", path: path);
67 } 66 }
68 elements.LibraryElement library = 67 elements.LibraryElement library =
69 scanner.loadLibrary(uri, null, canonicalUri); 68 scanner.loadLibrary(uri, null, canonicalUri);
70 return library; 69 return library;
71 } 70 }
72 71
73 void log(message) { 72 void log(message) {
74 handler(null, null, null, message, api.Diagnostic.VERBOSE_INFO); 73 handler(null, null, null, message, api.Diagnostic.VERBOSE_INFO);
75 } 74 }
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 handler(translateUri(span.uri, null), span.begin, span.end, 144 handler(translateUri(span.uri, null), span.begin, span.end,
146 message, kind); 145 message, kind);
147 } 146 }
148 } 147 }
149 148
150 bool get isMockCompilation { 149 bool get isMockCompilation {
151 return mockableLibraryUsed 150 return mockableLibraryUsed
152 && (options.indexOf('--allow-mock-compilation') !== -1); 151 && (options.indexOf('--allow-mock-compilation') !== -1);
153 } 152 }
154 } 153 }
OLDNEW
« no previous file with comments | « no previous file | lib/compiler/implementation/compiler.dart » ('j') | lib/compiler/implementation/compiler.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698