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

Side by Side Diff: pkg/compiler/lib/src/native/enqueue.dart

Issue 2738513007: Split NativeDataImpl (Closed)
Patch Set: Created 3 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
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 import '../common.dart'; 5 import '../common.dart';
6 import '../common/backend_api.dart' show ForeignResolver; 6 import '../common/backend_api.dart' show ForeignResolver;
7 import '../common/resolution.dart' show Resolution; 7 import '../common/resolution.dart' show Resolution;
8 import '../compiler.dart' show Compiler; 8 import '../compiler.dart' show Compiler;
9 import '../constants/values.dart'; 9 import '../constants/values.dart';
10 import '../common_elements.dart' show CommonElements; 10 import '../common_elements.dart' show CommonElements;
(...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after
360 360
361 void registerBackendUse(MethodElement element) { 361 void registerBackendUse(MethodElement element) {
362 _backendUsageBuilder.registerBackendFunctionUse(element); 362 _backendUsageBuilder.registerBackendFunctionUse(element);
363 _backendUsageBuilder.registerGlobalFunctionDependency(element); 363 _backendUsageBuilder.registerGlobalFunctionDependency(element);
364 } 364 }
365 365
366 void processNativeClass(ClassElement classElement) { 366 void processNativeClass(ClassElement classElement) {
367 super.processNativeClass(classElement); 367 super.processNativeClass(classElement);
368 368
369 // Js Interop interfaces do not have tags. 369 // Js Interop interfaces do not have tags.
370 if (backend.nativeData.isJsInteropClass(classElement)) return; 370 if (backend.nativeClassData.isJsInteropClass(classElement)) return;
371 // Since we map from dispatch tags to classes, a dispatch tag must be used 371 // Since we map from dispatch tags to classes, a dispatch tag must be used
372 // on only one native class. 372 // on only one native class.
373 for (String tag in backend.nativeData.getNativeTagsOfClass(classElement)) { 373 for (String tag
374 in backend.nativeClassData.getNativeTagsOfClass(classElement)) {
374 ClassElement owner = tagOwner[tag]; 375 ClassElement owner = tagOwner[tag];
375 if (owner != null) { 376 if (owner != null) {
376 if (owner != classElement) { 377 if (owner != classElement) {
377 reporter.internalError( 378 reporter.internalError(
378 classElement, "Tag '$tag' already in use by '${owner.name}'"); 379 classElement, "Tag '$tag' already in use by '${owner.name}'");
379 } 380 }
380 } else { 381 } else {
381 tagOwner[tag] = classElement; 382 tagOwner[tag] = classElement;
382 } 383 }
383 } 384 }
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
498 List<ClassEntity> directSubtypes = 499 List<ClassEntity> directSubtypes =
499 emitter.directSubtypes.putIfAbsent(superclass, () => <ClassEntity>[]); 500 emitter.directSubtypes.putIfAbsent(superclass, () => <ClassEntity>[]);
500 directSubtypes.add(cls); 501 directSubtypes.add(cls);
501 } 502 }
502 503
503 void logSummary(log(message)) { 504 void logSummary(log(message)) {
504 log('Compiled ${_registeredClasses.length} native classes, ' 505 log('Compiled ${_registeredClasses.length} native classes, '
505 '${_unusedClasses.length} native classes omitted.'); 506 '${_unusedClasses.length} native classes omitted.');
506 } 507 }
507 } 508 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/js_backend/native_data.dart ('k') | pkg/compiler/lib/src/native/resolver.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698