Chromium Code Reviews| Index: lib/compiler/implementation/dart_backend/placeholder.dart |
| diff --git a/lib/compiler/implementation/dart_backend/placeholder.dart b/lib/compiler/implementation/dart_backend/placeholder.dart |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..69f35f65b10b337dff4e17ecdee80933abf5ad52 |
| --- /dev/null |
| +++ b/lib/compiler/implementation/dart_backend/placeholder.dart |
| @@ -0,0 +1,27 @@ |
| +// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| +// for details. All rights reserved. Use of this source code is governed by a |
| +// BSD-style license that can be found in the LICENSE file. |
| + |
| +class Placeholder { |
| + abstract String rename(ConflictingRenamer renamer); |
| +} |
| + |
| +class TypePlaceholder extends Placeholder { |
|
Anton Muhin
2012/08/08 08:27:20
looks like all those placeholders can be unified i
Roman
2012/08/09 05:02:35
Later placeholders will also have scope informatio
|
| + final Type type; |
| + TypePlaceholder(this.type); |
| + String rename(ConflictingRenamer renamer) => |
| + renamer.renameElement(type.element); |
| +} |
|
Anton Muhin
2012/08/08 08:27:20
nit: a blank line after class declaration here and
Roman
2012/08/09 05:02:35
Done.
|
| +class MethodPlaceholder extends Placeholder { |
| + final Element method; |
| + MethodPlaceholder(this.method); |
| + String rename(ConflictingRenamer renamer) => renamer.renameElement(method); |
| +} |
| +class NullPlaceholder extends Placeholder { |
| + String rename(ConflictingRenamer renamer) => ''; |
| +} |
| +class ElementPlaceholder extends Placeholder { |
| + final Element element; |
| + ElementPlaceholder(this.element); |
| + String rename(ConflictingRenamer renamer) => renamer.renameElement(element); |
| +} |