Currently, JS objects and their prototypes have the same names, which can be confusing.
Created attachment 12431 [details] proposed patch The fast/tokenizer/external-script-document-write.html test seems to have been failing, going to research it separately.
Comment on attachment 12431 [details] proposed patch Sam has pointed out that this patch has an unintended consequence of changing what property is added to the global object (e.g., HTMLDocumentProto.prototype instead of HTMLDocument.prototype). OTOH, the former isn't available in Firefox anyway. Going to investigate this further.
That is, [[HTMLDocumentProto.prototype]] instead of [[HTMLDocument.prototype]].
(In reply to comment #3) > That is, [[HTMLDocumentProto.prototype]] instead of [[HTMLDocument.prototype]]. > If you're talking about the hidden properties we create through cacheGlobalObject(), the fact that they're reachable at all from client code is really a minor bug, not a feature. Can we spare a few extra letters and use "Prototype" instead of "Proto"?
Created attachment 12492 [details] proposed patch Mostly the same, just changed to append "Proto" in the macro (similar to how it works for constructors in CodGeneratorJS). > Can we spare a few extra letters and use "Prototype" instead of "Proto"? I tried to match how prototype classes are named in C++, so I guess I'd have to rename them at the same time then, as well.
(In reply to comment #5) > > Can we spare a few extra letters and use "Prototype" instead of "Proto"? > > I tried to match how prototype classes are named in C++, so I guess I'd have to > rename them at the same time then, as well. I'm a big fan of words rather than abbreviations, so I like Geoff's suggestion. We could use my rename script to do the renaming of the non-auto-generated C++ in an automated way.
Created attachment 12493 [details] plus global renaming Adds a global rename of Proto, ProtoFunc etc. Not exactly what I intended to do in this patch, but well.
Comment on attachment 12493 [details] plus global renaming r=me on the fancier patch
Comment on attachment 12492 [details] proposed patch r- the older patch to get it out of the queue
Committed revision 18912.
(In reply to comment #1) > The fast/tokenizer/external-script-document-write.html test seems to have been > failing, going to research it separately. Filed bug 12333.