1
0
mirror of https://github.com/golang/go synced 2024-11-25 22:07:58 -07:00
The Go programming language
Go to file
Russ Cox 2da5022bcf change representation of interface values.
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
2009-05-20 14:57:55 -07:00
doc removed TODO 2009-05-20 11:10:18 -07:00
include fix gotest by fixing nm -s to print in file order by storing a sequence number 2009-04-15 21:57:55 -07:00
lib help management of empty pkg and lib directories in perforce 2008-07-21 17:10:49 -07:00
pkg clear out pkg tree in clean.bash. 2009-05-20 11:12:05 -07:00
src change representation of interface values. 2009-05-20 14:57:55 -07:00
test change representation of interface values. 2009-05-20 14:57:55 -07:00
usr fix typo 2009-05-18 16:48:38 -07:00