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

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

Issue 430913002: Better dependency tracking (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: fixed final critiques Created 6 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 | 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 part of dart_backend; 5 part of dart_backend;
6 6
7 // TODO(ahe): This class is simply wrong. This backend should use 7 // TODO(ahe): This class is simply wrong. This backend should use
8 // elements when it can, not AST nodes. Perhaps a [Map<Element, 8 // elements when it can, not AST nodes. Perhaps a [Map<Element,
9 // TreeElements>] is what is needed. 9 // TreeElements>] is what is needed.
10 class ElementAst { 10 class ElementAst {
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 final LITERAL_TYPE_NAMES = const [ 125 final LITERAL_TYPE_NAMES = const [
126 'Map', 'List', 'num', 'int', 'double', 'bool' 126 'Map', 'List', 'num', 'int', 'double', 'bool'
127 ]; 127 ];
128 final coreLibrary = compiler.coreLibrary; 128 final coreLibrary = compiler.coreLibrary;
129 for (final name in LITERAL_TYPE_NAMES) { 129 for (final name in LITERAL_TYPE_NAMES) {
130 ClassElement classElement = coreLibrary.findLocal(name); 130 ClassElement classElement = coreLibrary.findLocal(name);
131 classElement.ensureResolved(compiler); 131 classElement.ensureResolved(compiler);
132 } 132 }
133 // Enqueue the methods that the VM might invoke on user objects because 133 // Enqueue the methods that the VM might invoke on user objects because
134 // we don't trust the resolution to always get these included. 134 // we don't trust the resolution to always get these included.
135 world.registerInvocation( 135 world.registerInvocation(new Selector.call("toString", null, 0));
136 null, new Selector.call("toString", null, 0)); 136 world.registerInvokedGetter(new Selector.getter("hashCode", null));
137 world.registerInvokedGetter( 137 world.registerInvocation(new Selector.binaryOperator("=="));
138 null, new Selector.getter("hashCode", null)); 138 world.registerInvocation(new Selector.call("compareTo", null, 1));
139 world.registerInvocation(
140 null, new Selector.binaryOperator("=="));
141 world.registerInvocation(
142 null, new Selector.call("compareTo", null, 1));
143 } 139 }
144 140
145 void codegen(CodegenWorkItem work) { } 141 void codegen(CodegenWorkItem work) { }
146 142
147 bool isUserLibrary(LibraryElement lib) => !lib.isPlatformLibrary; 143 bool isUserLibrary(LibraryElement lib) => !lib.isPlatformLibrary;
148 144
149 /** 145 /**
150 * Tells whether we should output given element. Corelib classes like 146 * Tells whether we should output given element. Corelib classes like
151 * Object should not be in the resulting code. 147 * Object should not be in the resulting code.
152 */ 148 */
(...skipping 514 matching lines...) Expand 10 before | Expand all | Expand 10 after
667 } 663 }
668 664
669 Constant compileMetadata(MetadataAnnotation metadata, 665 Constant compileMetadata(MetadataAnnotation metadata,
670 Node node, 666 Node node,
671 TreeElements elements) { 667 TreeElements elements) {
672 return measure(() { 668 return measure(() {
673 return constantCompiler.compileMetadata(metadata, node, elements); 669 return constantCompiler.compileMetadata(metadata, node, elements);
674 }); 670 });
675 } 671 }
676 } 672 }
OLDNEW
« no previous file with comments | « sdk/lib/_internal/compiler/implementation/dart2jslib.dart ('k') | sdk/lib/_internal/compiler/implementation/dump_info.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698