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

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

Issue 22640009: Enable type inference when using mirrors. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Add explicit case for fields again. Created 7 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 part of js_backend; 5 part of js_backend;
6 6
7 class JavaScriptItemCompilationContext extends ItemCompilationContext { 7 class JavaScriptItemCompilationContext extends ItemCompilationContext {
8 final Set<HInstruction> boundsChecked; 8 final Set<HInstruction> boundsChecked;
9 9
10 JavaScriptItemCompilationContext() 10 JavaScriptItemCompilationContext()
(...skipping 353 matching lines...) Expand 10 before | Expand all | Expand 10 after
364 new MinifyNamer(compiler) : 364 new MinifyNamer(compiler) :
365 new Namer(compiler); 365 new Namer(compiler);
366 } 366 }
367 367
368 bool canBeUsedForGlobalOptimizations(Element element) { 368 bool canBeUsedForGlobalOptimizations(Element element) {
369 if (element.isParameter() 369 if (element.isParameter()
370 || element.isFieldParameter() 370 || element.isFieldParameter()
371 || element.isField()) { 371 || element.isField()) {
372 element = element.enclosingElement; 372 element = element.enclosingElement;
373 } 373 }
374 return !helpersUsed.contains(element.declaration); 374 element = element.declaration;
375 return !isNeededForReflection(element) && !helpersUsed.contains(element);
375 } 376 }
376 377
377 bool isInterceptorClass(ClassElement element) { 378 bool isInterceptorClass(ClassElement element) {
378 if (element == null) return false; 379 if (element == null) return false;
379 if (Elements.isNativeOrExtendsNative(element)) return true; 380 if (Elements.isNativeOrExtendsNative(element)) return true;
380 if (interceptedClasses.contains(element)) return true; 381 if (interceptedClasses.contains(element)) return true;
381 if (classesMixedIntoNativeClasses.contains(element)) return true; 382 if (classesMixedIntoNativeClasses.contains(element)) return true;
382 return false; 383 return false;
383 } 384 }
384 385
(...skipping 1276 matching lines...) Expand 10 before | Expand all | Expand 10 after
1661 copy(constant.values); 1662 copy(constant.values);
1662 copy(constant.protoValue); 1663 copy(constant.protoValue);
1663 copy(constant); 1664 copy(constant);
1664 } 1665 }
1665 1666
1666 void visitConstructed(ConstructedConstant constant) { 1667 void visitConstructed(ConstructedConstant constant) {
1667 copy(constant.fields); 1668 copy(constant.fields);
1668 copy(constant); 1669 copy(constant);
1669 } 1670 }
1670 } 1671 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698