Optimize variant list, use array instead of list.
Use a global function list, to save a bit memory. Use a global variant list to store both global variants and local variants to save memory.
Authored by: utunnels 2007-03-24
Parent: [r665]
Child: [r667]