Author: cromwellian
Date: Thu Jun 25 16:46:04 2009
New Revision: 5634
Modified:
wiki/AdvancedCompilerOptimizations.wiki
Log:
Edited wiki page through web user interface.
Modified: wiki/AdvancedCompilerOptimizations.wiki
==============================================================================
--- wiki/AdvancedCompilerOptimizations.wiki (original)
+++ wiki/AdvancedCompilerOptimizations.wiki Thu Jun 25 16:46:04 2009
@@ -518,7 +518,7 @@
And any reference to `Foo` may now be replaced with an ordinal index into
`FooHoist`. e.g. `new Foo(5, "Johnny");` becomes `2`.
-This would allow the entire classtype for `Foo` to be pruned in many
circumstances, the chief example being Enum classes. In the case where
`Foo` is polymorphic, you need a separate dispatch table, but you can still
eliminate the type and it's subtypes.
+This would allow the entire classtype for `Foo` to be pruned in many
circumstances, the chief example being Enum classes. In the case where
`Foo` is polymorphic, you need a separate dispatch table, but you can still
eliminate the type and it's subtypes. In cases where Foo is passed and
upcast to Object or some supertype (say for collection usage), it may need
a shim to wrap the ordinal, but this shim might be reusable across all such
interned objects.
This optimization is mostly useful for Enums and Type-Safe enums.
--~--~---------~--~----~------------~-------~--~----~
http://groups.google.com/group/Google-Web-Toolkit-Contributors
-~----------~----~----~----~------~----~------~--~---