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

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

Issue 23118007: Ensure the type inferrer does not infer types for runtime helpers used by the backend. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 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
« no previous file with comments | « no previous file | sdk/lib/_internal/compiler/implementation/js_backend/backend.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 part of dart2js; 5 part of dart2js;
6 6
7 /** 7 /**
8 * If true, print a warning for each method that was resolved, but not 8 * If true, print a warning for each method that was resolved, but not
9 * compiled. 9 * compiled.
10 */ 10 */
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 /// Called by [MirrorUsageAnalyzerTask] after it has merged all @MirrorsUsed 215 /// Called by [MirrorUsageAnalyzerTask] after it has merged all @MirrorsUsed
216 /// annotations. The arguments corresponds to the unions of the corresponding 216 /// annotations. The arguments corresponds to the unions of the corresponding
217 /// fields of the annotations. 217 /// fields of the annotations.
218 void registerMirrorUsage(Set<String> symbols, 218 void registerMirrorUsage(Set<String> symbols,
219 Set<Element> targets, 219 Set<Element> targets,
220 Set<Element> metaTargets) {} 220 Set<Element> metaTargets) {}
221 221
222 /// Returns true if this element should be retained for reflection even if it 222 /// Returns true if this element should be retained for reflection even if it
223 /// would normally be tree-shaken away. 223 /// would normally be tree-shaken away.
224 bool isNeededForReflection(Element element) => false; 224 bool isNeededForReflection(Element element) => false;
225
226 /// Returns true if global optimizations such as type inferencing
227 /// can apply to this element. One category of elements that do not
228 /// apply is runtime helpers that the backend calls, but the
229 /// optimizations don't see those calls.
230 bool canBeUsedForGlobalOptimizations(Element element);
225 } 231 }
226 232
227 /** 233 /**
228 * Key class used in [TokenMap] in which the hash code for a token is based 234 * Key class used in [TokenMap] in which the hash code for a token is based
229 * on the [charOffset]. 235 * on the [charOffset].
230 */ 236 */
231 class TokenKey { 237 class TokenKey {
232 final Token token; 238 final Token token;
233 TokenKey(this.token); 239 TokenKey(this.token);
234 int get hashCode => token.charOffset; 240 int get hashCode => token.charOffset;
(...skipping 1245 matching lines...) Expand 10 before | Expand all | Expand 10 after
1480 1486
1481 void close() {} 1487 void close() {}
1482 1488
1483 toString() => name; 1489 toString() => name;
1484 1490
1485 /// Convenience method for getting an [api.CompilerOutputProvider]. 1491 /// Convenience method for getting an [api.CompilerOutputProvider].
1486 static NullSink outputProvider(String name, String extension) { 1492 static NullSink outputProvider(String name, String extension) {
1487 return new NullSink('$name.$extension'); 1493 return new NullSink('$name.$extension');
1488 } 1494 }
1489 } 1495 }
OLDNEW
« no previous file with comments | « no previous file | sdk/lib/_internal/compiler/implementation/js_backend/backend.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698