Chromium Code Reviews| Index: lib/compiler/implementation/universe.dart |
| diff --git a/lib/compiler/implementation/universe.dart b/lib/compiler/implementation/universe.dart |
| index 976f06beef56e16aef544a4f315df1d6d69e3af7..41f220d3783bb907e8050c8a9e0e5e83e21d72fc 100644 |
| --- a/lib/compiler/implementation/universe.dart |
| +++ b/lib/compiler/implementation/universe.dart |
| @@ -13,8 +13,10 @@ class Universe { |
| final Map<SourceString, Set<Selector>> invokedSetters; |
| final Map<SourceString, Set<Selector>> fieldGetters; |
| final Map<SourceString, Set<Selector>> fieldSetters; |
| - // TODO(ngeoffray): This should be a Set<Type>. |
| - final Set<Element> isChecks; |
| + final Set<Type> isChecks; |
| + // TODO(karlklose): move this data to RuntimeTypeInformation. |
| + Set<Element> cachedCheckedClasses; |
| + |
| final RuntimeTypeInformation rti; |
| Universe() : generatedCode = new Map<Element, CodeBuffer>(), |
| @@ -27,9 +29,17 @@ class Universe { |
| invokedSetters = new Map<SourceString, Set<Selector>>(), |
| fieldGetters = new Map<SourceString, Set<Selector>>(), |
| fieldSetters = new Map<SourceString, Set<Selector>>(), |
| - isChecks = new Set<Element>(), |
| + isChecks = new Set<Type>(), |
| rti = new RuntimeTypeInformation(); |
| + get checkedClasses { |
|
ngeoffray
2012/08/30 11:03:33
What is that for? Why not using isChecks?
karlklose
2012/08/30 13:04:31
Currently, the code emitter generates the is$-meth
|
| + if (cachedCheckedClasses == null) { |
| + cachedCheckedClasses = new Set<Element>(); |
| + isChecks.forEach((Type t) => cachedCheckedClasses.add(t.element)); |
| + } |
| + return cachedCheckedClasses; |
| + } |
| + |
| void addGeneratedCode(WorkItem work, CodeBuffer codeBuffer) { |
| generatedCode[work.element] = codeBuffer; |
| } |