The ConfigureXXXTemplate() function generated for each binding class has a lot of common boilerplace that can be de-inlined, esp. since each of these functions is only called once. It also sets up the class's callback functions/methods with individual function calls, instead of using a table-driven approach (the way it already sets up accessors.) Changing these results in 100kbytes of code size savings on x86/32.
Created attachment 43076 [details] patch
Comment on attachment 43076 [details] patch r=me, feel free to commit after this fix-up: > +v8::Local<v8::Signature> configureTemplate(v8::Persistent<v8::FunctionTemplate>desc, > + const char *interfaceName, > + V8ClassIndex::V8WrapperType parentClassIndex, > + int fieldCount, > + const BatchedAttribute* attributes, > + size_t attributeCount, > + const BatchedCallback* callbacks, > + size_t callbackCount) > +{ > + desc->SetClassName(v8::String::New(interfaceName)); > + v8::Local<v8::ObjectTemplate> instance = desc->InstanceTemplate(); > + instance->SetInternalFieldCount(fieldCount); > + if (parentClassIndex) > + desc->Inherit(V8DOMWrapper::getTemplate(parentClassIndex)); > + if (attributeCount) > + batchConfigureAttributes(instance, desc->PrototypeTemplate(), > + attributes, attributeCount); > + v8::Local<v8::Signature> default_signature = v8::Signature::New(desc); Should be defaultSignature in WebKit-land.
Fixed that variable name, thanks. Committed revision 50897.