Subj : Re: How and where can I upload a change to the SpiderMonkey source-code? To : Thorsten R From : Brendan Eich Date : Thu Feb 06 2003 08:19 am Thorsten R wrote: >Hello Everybody, > >I made a change to the SpiderMonkey C-Sources which was important for me, >otherwise SpiderMonkey wouldn't have been usable. I changed the >JSPropertySpec.TinyID member from type int8 (8-bit) to long, so I can pass a >pointer as attribute, which is required for my task. > Why do you need to associate a pointer with a property identifier (note well: not store a pointer as the property's value -- you can do that already if the pointer is aligned on at least a 0 mod 2 boundary)? > I also changed all >related functions and inner structures, like the JSScopeProperty structure, >to handle the long type. > >A long should always be sufficient to hold a pointer value, even on 64-bit >machines, however, it raises the question how JSVal will be handled on >64-bit machines, it must be expanded to 64-bit, but is this already done in >the source code? > >But my main question is, how and where can I contribute my change to the >global sources and to the public? > Your change is not going to be taken, because it bloats all property descriptors by more than 4 bytes on most architectures, for a case that you haven't justified yet. You need to say why it's important for you to associate a pointer with a property identifier or descriptor, of which there is only one for many different property value slots in many different objects all named by the same id, or to put it another way, mapped by the same descriptor. > I think it was a big design mistake to >declare the only attribute - one can pass from an application to a JS >property - of type int8, and I'm convinced that the change I made is >reasonable and usable for the whole community. > Someone is making a mistake, perhaps not big, but it wasn't the ancient tinyid representation choice. That choice was made to allow shared getters and setters (shared among all properties in a class, or among a subset of all the properties defined by the class) to dispatch on tinyid using a switch statement, in order to share prolog and epilog code common to all (or to most) getters and setters for that class. /be > >Please let me know. > >Regards >Thorsten Radde > > > > > .