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

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

Issue 15381002: Fix a pretty bad bug of a class inheriting a patched class. The fix is (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 7 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 dart2js; 5 part of dart2js;
6 6
7 /** 7 /**
8 * The [ConstantHandler] keeps track of compile-time constants, 8 * The [ConstantHandler] keeps track of compile-time constants,
9 * initializations of global and static fields, and default values of 9 * initializations of global and static fields, and default values of
10 * optional parameters. 10 * optional parameters.
(...skipping 866 matching lines...) Expand 10 before | Expand all | Expand 10 after
877 List<Constant> jsNewArguments = <Constant>[]; 877 List<Constant> jsNewArguments = <Constant>[];
878 classElement.implementation.forEachInstanceField( 878 classElement.implementation.forEachInstanceField(
879 (ClassElement enclosing, Element field) { 879 (ClassElement enclosing, Element field) {
880 Constant fieldValue = fieldValues[field]; 880 Constant fieldValue = fieldValues[field];
881 if (fieldValue == null) { 881 if (fieldValue == null) {
882 // Use the default value. 882 // Use the default value.
883 fieldValue = handler.compileConstant(field); 883 fieldValue = handler.compileConstant(field);
884 } 884 }
885 jsNewArguments.add(fieldValue); 885 jsNewArguments.add(fieldValue);
886 }, 886 },
887 includeBackendMembers: true, 887 includeSuperAndInjectedMembers: true);
888 includeSuperMembers: true);
889 return jsNewArguments; 888 return jsNewArguments;
890 } 889 }
891 } 890 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698