| Index: lib/compiler/implementation/compiler.dart
|
| diff --git a/lib/compiler/implementation/compiler.dart b/lib/compiler/implementation/compiler.dart
|
| index 02bdebe1cdeedb7544de193cb0afd26726f0a8f7..0eebdf8f6597e25a051422cf080e17a0614ae01d 100644
|
| --- a/lib/compiler/implementation/compiler.dart
|
| +++ b/lib/compiler/implementation/compiler.dart
|
| @@ -381,19 +381,6 @@ class Compiler implements DiagnosticListener {
|
| patchParser.patchLibrary(patchUri, library);
|
| // We allow foreign functions in patched libraries.
|
| addForeignFunctions(library); // Is safe even if already added.
|
| - // TODO(lrn): Make this lazy.
|
| - applyClassPatches(library);
|
| - }
|
| - }
|
| -
|
| - void applyClassPatches(LibraryElement library) {
|
| - for (Element element in library.localMembers) {
|
| - if (element.isClass()) {
|
| - ClassElement classElement = element;
|
| - if (classElement.isPatched) {
|
| - applyClassPatch(classElement, classElement.patch);
|
| - }
|
| - }
|
| }
|
| }
|
|
|
| @@ -481,16 +468,6 @@ class Compiler implements DiagnosticListener {
|
| internalError("Cannot overwrite existing '"
|
| "${originalElement.name.slowToString()}' with non-patch.");
|
| }
|
| - if (originalElement is PartialClassElement) {
|
| - // Only happens when patching a library. Dart does not, yet, have nested
|
| - // classes.
|
| - if (patchElement is! PartialClassElement) {
|
| - internalError("Trying to patch class with non-class",
|
| - element:originalElement);
|
| - }
|
| - applyClassPatch(originalElement, patchElement);
|
| - return;
|
| - }
|
| if (originalElement is! FunctionElement) {
|
| // TODO(lrn): Handle class declarations too.
|
| internalError("Can only patch functions", element: originalElement);
|
| @@ -527,18 +504,6 @@ class Compiler implements DiagnosticListener {
|
| element.setPatch(patchElement);
|
| }
|
|
|
| - void applyClassPatch(PartialClassElement original,
|
| - PartialClassElement patch) {
|
| - // Eagerly parse the class so we can patch it.
|
| - // TODO(lrn): Perhaps find a way to delay parsing until the class is needed,
|
| - // i.e., until [parseNode] is called on [original].
|
| - ClassNode node = original.parseNode(this);
|
| - // Parse patch class with "patch" parser.
|
| - ClassNode patchNode = patchParser.parsePatchClassNode(patch);
|
| - Link<Element> patches = patch.localMembers;
|
| - applyContainerPatch(original, patches);
|
| - }
|
| -
|
| /**
|
| * Get an [Uri] pointing to a patch for the dart: library with
|
| * the given path. Returns null if there is no patch.
|
|
|