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

Side by Side Diff: lib/compiler/implementation/dart_backend/backend.dart

Issue 10917254: Move registering of interceptors to the JsBackend. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Add back check for resolved selectors. Created 8 years, 2 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 | « lib/compiler/implementation/compiler.dart ('k') | lib/compiler/implementation/enqueue.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 class ElementAst { 5 class ElementAst {
6 final Node ast; 6 final Node ast;
7 final TreeElements treeElements; 7 final TreeElements treeElements;
8 8
9 ElementAst(this.ast, this.treeElements); 9 ElementAst(this.ast, this.treeElements);
10 10
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 } 182 }
183 return true; 183 return true;
184 } 184 }
185 185
186 DartBackend(Compiler compiler, List<String> strips) 186 DartBackend(Compiler compiler, List<String> strips)
187 : tasks = <CompilerTask>[], 187 : tasks = <CompilerTask>[],
188 forceStripTypes = strips.indexOf('types') != -1, 188 forceStripTypes = strips.indexOf('types') != -1,
189 stripAsserts = strips.indexOf('asserts') != -1, 189 stripAsserts = strips.indexOf('asserts') != -1,
190 super(compiler); 190 super(compiler);
191 191
192 Element getInterceptor(Selector selector) => null;
193
192 void enqueueHelpers(Enqueuer world) { 194 void enqueueHelpers(Enqueuer world) {
193 // Right now resolver doesn't always resolve interfaces needed 195 // Right now resolver doesn't always resolve interfaces needed
194 // for literals, so force them. TODO(antonm): fix in the resolver. 196 // for literals, so force them. TODO(antonm): fix in the resolver.
195 final LITERAL_TYPE_NAMES = const [ 197 final LITERAL_TYPE_NAMES = const [
196 'Map', 'List', 'num', 'int', 'double', 'bool' 198 'Map', 'List', 'num', 'int', 'double', 'bool'
197 ]; 199 ];
198 final coreLibrary = compiler.coreLibrary; 200 final coreLibrary = compiler.coreLibrary;
199 for (final name in LITERAL_TYPE_NAMES) { 201 for (final name in LITERAL_TYPE_NAMES) {
200 ClassElement classElement = coreLibrary.findLocal(new SourceString(name)); 202 ClassElement classElement = coreLibrary.findLocal(new SourceString(name));
201 classElement.ensureResolved(compiler); 203 classElement.ensureResolved(compiler);
(...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after
534 } 536 }
535 537
536 compareElements(e0, e1) { 538 compareElements(e0, e1) {
537 int result = compareBy((e) => e.getLibrary().uri.toString())(e0, e1); 539 int result = compareBy((e) => e.getLibrary().uri.toString())(e0, e1);
538 if (result != 0) return result; 540 if (result != 0) return result;
539 return compareBy((e) => e.position().charOffset)(e0, e1); 541 return compareBy((e) => e.position().charOffset)(e0, e1);
540 } 542 }
541 543
542 List<Element> sortElements(Collection<Element> elements) => 544 List<Element> sortElements(Collection<Element> elements) =>
543 sorted(elements, compareElements); 545 sorted(elements, compareElements);
OLDNEW
« no previous file with comments | « lib/compiler/implementation/compiler.dart ('k') | lib/compiler/implementation/enqueue.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698