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

Side by Side Diff: pkg/dart2js_incremental/lib/library_updater.dart

Issue 1029003002: dart2js: remove first argument from lazy function. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Added comment. Created 5 years, 9 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 | « pkg/compiler/lib/src/js_emitter/old_emitter/emitter.dart ('k') | no next file » | 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) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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 library dart2js_incremental.library_updater; 5 library dart2js_incremental.library_updater;
6 6
7 import 'dart:async' show 7 import 'dart:async' show
8 Future; 8 Future;
9 9
10 import 'dart:convert' show 10 import 'dart:convert' show
(...skipping 960 matching lines...) Expand 10 before | Expand all | Expand 10 after
971 List<jsAst.Statement> computeFieldUpdateJs(FieldElementX element) { 971 List<jsAst.Statement> computeFieldUpdateJs(FieldElementX element) {
972 if (element.isInstanceMember) { 972 if (element.isInstanceMember) {
973 // Any initializers are inlined in factory methods, and the field is 973 // Any initializers are inlined in factory methods, and the field is
974 // declared by adding its class to [_classesWithSchemaChanges]. 974 // declared by adding its class to [_classesWithSchemaChanges].
975 return const <jsAst.Statement>[]; 975 return const <jsAst.Statement>[];
976 } 976 }
977 // A static (or top-level) field. 977 // A static (or top-level) field.
978 if (backend.constants.lazyStatics.contains(element)) { 978 if (backend.constants.lazyStatics.contains(element)) {
979 jsAst.Expression init = 979 jsAst.Expression init =
980 emitter.oldEmitter.buildLazilyInitializedStaticField( 980 emitter.oldEmitter.buildLazilyInitializedStaticField(
981 element, namer.currentIsolate); 981 element, isolateProperties: namer.currentIsolate);
982 if (init == null) { 982 if (init == null) {
983 throw new StateError("Initializer optimized away for $element"); 983 throw new StateError("Initializer optimized away for $element");
984 } 984 }
985 return <jsAst.Statement>[init.toStatement()]; 985 return <jsAst.Statement>[init.toStatement()];
986 } else { 986 } else {
987 // TODO(ahe): When a field is referenced it is enqueued. If the field has 987 // TODO(ahe): When a field is referenced it is enqueued. If the field has
988 // no initializer, it will not have any associated code, so it will 988 // no initializer, it will not have any associated code, so it will
989 // appear as if it was newly enqueued. 989 // appear as if it was newly enqueued.
990 if (element.initializer == null) { 990 if (element.initializer == null) {
991 return const <jsAst.Statement>[]; 991 return const <jsAst.Statement>[];
(...skipping 495 matching lines...) Expand 10 before | Expand all | Expand 10 after
1487 .buildFieldsHackForIncrementalCompilation(classElement); 1487 .buildFieldsHackForIncrementalCompilation(classElement);
1488 // TODO(ahe): Rewrite for new emitter. 1488 // TODO(ahe): Rewrite for new emitter.
1489 ClassBuilder builder = new ClassBuilder(classElement, namer); 1489 ClassBuilder builder = new ClassBuilder(classElement, namer);
1490 classEmitter.emitFields(cls, builder); 1490 classEmitter.emitFields(cls, builder);
1491 return builder.fields; 1491 return builder.fields;
1492 } 1492 }
1493 } 1493 }
1494 1494
1495 // TODO(ahe): Remove this method. 1495 // TODO(ahe): Remove this method.
1496 NO_WARN(x) => x; 1496 NO_WARN(x) => x;
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/js_emitter/old_emitter/emitter.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698