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

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

Issue 338103004: Use metadata for patching. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 6 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 | « no previous file | sdk/lib/_internal/compiler/implementation/patch_parser.dart » ('j') | 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) 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 * If true, print a warning for each method that was resolved, but not 8 * If true, print a warning for each method that was resolved, but not
9 * compiled. 9 * compiled.
10 */ 10 */
(...skipping 628 matching lines...) Expand 10 before | Expand all | Expand 10 after
639 ClassElement listClass; 639 ClassElement listClass;
640 ClassElement typeClass; 640 ClassElement typeClass;
641 ClassElement mapClass; 641 ClassElement mapClass;
642 ClassElement symbolClass; 642 ClassElement symbolClass;
643 ClassElement stackTraceClass; 643 ClassElement stackTraceClass;
644 ClassElement typedDataClass; 644 ClassElement typedDataClass;
645 645
646 /// The constant for the [proxy] variable defined in dart:core. 646 /// The constant for the [proxy] variable defined in dart:core.
647 Constant proxyConstant; 647 Constant proxyConstant;
648 648
649 /// The constant for the [patch] variable defined in dart:_js_helper.
650 Constant patchConstant;
651
649 // Initialized after symbolClass has been resolved. 652 // Initialized after symbolClass has been resolved.
650 FunctionElement symbolConstructor; 653 FunctionElement symbolConstructor;
651 654
652 // Initialized when dart:mirrors is loaded. 655 // Initialized when dart:mirrors is loaded.
653 ClassElement mirrorSystemClass; 656 ClassElement mirrorSystemClass;
654 657
655 // Initialized when dart:mirrors is loaded. 658 // Initialized when dart:mirrors is loaded.
656 ClassElement mirrorsUsedClass; 659 ClassElement mirrorsUsedClass;
657 660
658 // Initialized after mirrorSystemClass has been resolved. 661 // Initialized after mirrorSystemClass has been resolved.
(...skipping 407 matching lines...) Expand 10 before | Expand all | Expand 10 after
1066 Future onLibrariesLoaded(Map<Uri, LibraryElement> loadedLibraries) { 1069 Future onLibrariesLoaded(Map<Uri, LibraryElement> loadedLibraries) {
1067 return new Future.sync(() { 1070 return new Future.sync(() {
1068 if (!loadedLibraries.containsKey(DART_CORE)) return new Future.value(); 1071 if (!loadedLibraries.containsKey(DART_CORE)) return new Future.value();
1069 1072
1070 functionClass.ensureResolved(this); 1073 functionClass.ensureResolved(this);
1071 functionApplyMethod = functionClass.lookupLocalMember('apply'); 1074 functionApplyMethod = functionClass.lookupLocalMember('apply');
1072 1075
1073 proxyConstant = 1076 proxyConstant =
1074 resolver.constantCompiler.compileConstant(coreLibrary.find('proxy')); 1077 resolver.constantCompiler.compileConstant(coreLibrary.find('proxy'));
1075 1078
1079 patchConstant = resolver.constantCompiler.compileConstant(
1080 jsHelperLibrary.find('patch'));
1081
1076 if (jsInvocationMirrorClass != null) { 1082 if (jsInvocationMirrorClass != null) {
1077 jsInvocationMirrorClass.ensureResolved(this); 1083 jsInvocationMirrorClass.ensureResolved(this);
1078 invokeOnMethod = jsInvocationMirrorClass.lookupLocalMember(INVOKE_ON); 1084 invokeOnMethod = jsInvocationMirrorClass.lookupLocalMember(INVOKE_ON);
1079 } 1085 }
1080 1086
1081 if (preserveComments) { 1087 if (preserveComments) {
1082 return libraryLoader.loadLibrary(DART_MIRRORS) 1088 return libraryLoader.loadLibrary(DART_MIRRORS)
1083 .then((LibraryElement libraryElement) { 1089 .then((LibraryElement libraryElement) {
1084 documentClass = libraryElement.find('Comment'); 1090 documentClass = libraryElement.find('Comment');
1085 }); 1091 });
(...skipping 897 matching lines...) Expand 10 before | Expand all | Expand 10 after
1983 static NullSink outputProvider(String name, String extension) { 1989 static NullSink outputProvider(String name, String extension) {
1984 return new NullSink('$name.$extension'); 1990 return new NullSink('$name.$extension');
1985 } 1991 }
1986 } 1992 }
1987 1993
1988 /// Information about suppressed warnings and hints for a given library. 1994 /// Information about suppressed warnings and hints for a given library.
1989 class SuppressionInfo { 1995 class SuppressionInfo {
1990 int warnings = 0; 1996 int warnings = 0;
1991 int hints = 0; 1997 int hints = 0;
1992 } 1998 }
OLDNEW
« no previous file with comments | « no previous file | sdk/lib/_internal/compiler/implementation/patch_parser.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698