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

Unified Diff: sdk/lib/_internal/compiler/implementation/enqueue.dart

Issue 11365170: Start new design for interceptors and implement String.charCodeAt with it. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: sdk/lib/_internal/compiler/implementation/enqueue.dart
===================================================================
--- sdk/lib/_internal/compiler/implementation/enqueue.dart (revision 14732)
+++ sdk/lib/_internal/compiler/implementation/enqueue.dart (working copy)
@@ -29,6 +29,7 @@
final Set<ClassElement> seenClasses;
final Universe universe;
final Queue<WorkItem> queue;
+ final Map<SourceString, List<Element>> interceptedElements;
ahe 2012/11/12 13:24:11 Backend specific?
ngeoffray 2012/11/13 11:45:16 Done.
/**
* Map from declaration elements to the [TreeElements] object holding the
@@ -48,6 +49,7 @@
seenClasses = new Set<ClassElement>(),
universe = new Universe(),
queue = new Queue<WorkItem>(),
+ interceptedElements = new Map<SourceString, List<Element>>(),
resolvedElements = new Map<Element, TreeElements>();
bool get isResolutionQueue => identical(compiler.enqueuer.resolution, this);
@@ -141,6 +143,15 @@
onRegisterInstantiatedClass(cls);
}
+ void registerSpecialInstantiatedClass(ClassElement cls) {
+ registerInstantiatedClass(cls);
+ cls.forEachMember((_, Element member) {
+ List<Element> list = interceptedElements.putIfAbsent(
+ member.name, () => new List<Element>());
+ list.add(member);
+ });
+ }
+
bool checkNoEnqueuedInvokedInstanceMethods() {
task.measure(() {
// Run through the classes and see if we need to compile methods.

Powered by Google App Engine
This is Rietveld 408576698