• Russ Cox's avatar
    change representation of interface values. · 2da5022b
    Russ Cox authored
    this is not a user-visible change.
    
    before, all interface values were
    
    	struct Itype {
    		Sigt *type;
    		Sigi *inter;
    		void *method[n];
    	}
    
    	struct Iface {
    		void *addr;
    		Itype *itype;
    	}
    
    the itype is basically a vtable, but it's unnecessary
    if the static type is interface{ }.
    for interface values with static type empty, the
    new representation is
    
    	struct Eface {
    		void *addr;
    		Sigt *type;
    	}
    
    this complicates the code somewhat, but
    it reduces the number of Itypes that
    have to be computed and cached,
    it opens up opportunities to avoid function
    calls in a few common cases,
    and it will make it possible to lay out
    interface{} values at compile time,
    which i think i'll need for the new reflection.
    
    R=ken
    OCL=28701
    CL=29121
    2da5022b
Name
Last commit
Last update
..
cmd Loading commit data...
lib Loading commit data...
lib9 Loading commit data...
libbio Loading commit data...
libmach_amd64 Loading commit data...
old/c Loading commit data...
pkg/debug/macho/testdata Loading commit data...
runtime Loading commit data...
Make.conf Loading commit data...
all.bash Loading commit data...
clean.bash Loading commit data...
make.bash Loading commit data...
quietgcc.bash Loading commit data...
run.bash Loading commit data...
sudo.bash Loading commit data...