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

Side by Side Diff: pkg/compiler/lib/src/js_backend/backend.dart

Issue 2239193002: Rerun formatter (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 4 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
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 library js_backend.backend; 5 library js_backend.backend;
6 6
7 import 'dart:async' show Future; 7 import 'dart:async' show Future;
8 8
9 import 'package:js_runtime/shared/embedded_names.dart' as embeddedNames; 9 import 'package:js_runtime/shared/embedded_names.dart' as embeddedNames;
10 10
(...skipping 1185 matching lines...) Expand 10 before | Expand all | Expand 10 after
1196 (Name.isPrivateName(name) && 1196 (Name.isPrivateName(name) &&
1197 ctor.library != helpers.mapLiteralClass.library)) { 1197 ctor.library != helpers.mapLiteralClass.library)) {
1198 reporter.internalError( 1198 reporter.internalError(
1199 helpers.mapLiteralClass, 1199 helpers.mapLiteralClass,
1200 "Map literal class ${helpers.mapLiteralClass} missing " 1200 "Map literal class ${helpers.mapLiteralClass} missing "
1201 "'$name' constructor" 1201 "'$name' constructor"
1202 " ${helpers.mapLiteralClass.constructors}"); 1202 " ${helpers.mapLiteralClass.constructors}");
1203 } 1203 }
1204 return ctor; 1204 return ctor;
1205 } 1205 }
1206
1206 Element getMember(String name) { 1207 Element getMember(String name) {
1207 // The constructor is on the patch class, but dart2js unit tests don't 1208 // The constructor is on the patch class, but dart2js unit tests don't
1208 // have a patch class. 1209 // have a patch class.
1209 ClassElement implementation = cls.implementation; 1210 ClassElement implementation = cls.implementation;
1210 Element element = implementation.lookupLocalMember(name); 1211 Element element = implementation.lookupLocalMember(name);
1211 if (element == null || !element.isFunction || !element.isStatic) { 1212 if (element == null || !element.isFunction || !element.isStatic) {
1212 reporter.internalError( 1213 reporter.internalError(
1213 helpers.mapLiteralClass, 1214 helpers.mapLiteralClass,
1214 "Map literal class ${helpers.mapLiteralClass} missing " 1215 "Map literal class ${helpers.mapLiteralClass} missing "
1215 "'$name' static member function"); 1216 "'$name' static member function");
1216 } 1217 }
1217 return element; 1218 return element;
1218 } 1219 }
1220
1219 helpers.mapLiteralConstructor = getFactory('_literal', 1); 1221 helpers.mapLiteralConstructor = getFactory('_literal', 1);
1220 helpers.mapLiteralConstructorEmpty = getFactory('_empty', 0); 1222 helpers.mapLiteralConstructorEmpty = getFactory('_empty', 0);
1221 enqueueInResolution(helpers.mapLiteralConstructor, registry); 1223 enqueueInResolution(helpers.mapLiteralConstructor, registry);
1222 enqueueInResolution(helpers.mapLiteralConstructorEmpty, registry); 1224 enqueueInResolution(helpers.mapLiteralConstructorEmpty, registry);
1223 1225
1224 helpers.mapLiteralUntypedMaker = getMember('_makeLiteral'); 1226 helpers.mapLiteralUntypedMaker = getMember('_makeLiteral');
1225 helpers.mapLiteralUntypedEmptyMaker = getMember('_makeEmpty'); 1227 helpers.mapLiteralUntypedEmptyMaker = getMember('_makeEmpty');
1226 enqueueInResolution(helpers.mapLiteralUntypedMaker, registry); 1228 enqueueInResolution(helpers.mapLiteralUntypedMaker, registry);
1227 enqueueInResolution(helpers.mapLiteralUntypedEmptyMaker, registry); 1229 enqueueInResolution(helpers.mapLiteralUntypedEmptyMaker, registry);
1228 } 1230 }
(...skipping 1978 matching lines...) Expand 10 before | Expand all | Expand 10 after
3207 3209
3208 @override 3210 @override
3209 void onImpactUsed(ImpactUseCase impactUse) { 3211 void onImpactUsed(ImpactUseCase impactUse) {
3210 if (impactUse == DeferredLoadTask.IMPACT_USE && !supportSerialization) { 3212 if (impactUse == DeferredLoadTask.IMPACT_USE && !supportSerialization) {
3211 // TODO(johnniwinther): Allow emptying when serialization has been 3213 // TODO(johnniwinther): Allow emptying when serialization has been
3212 // performed. 3214 // performed.
3213 resolution.emptyCache(); 3215 resolution.emptyCache();
3214 } 3216 }
3215 } 3217 }
3216 } 3218 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/js/rewrite_async.dart ('k') | pkg/compiler/lib/src/js_backend/backend_helpers.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698