Closed
Bug 551772
Opened 16 years ago
Closed 4 years ago
template-ize definitions of JSParseNode subclasses
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
RESOLVED
INVALID
People
(Reporter: dherman, Assigned: dherman)
Details
In bug 550350 comment 19, Waldo suggests:
> There seems to be a considerable amount of duplication here. Might it be
> useful to split out the basic create methods into a single template, to cut
> down on repetitive implementation slightly?
>
> template<class T, JSParseNodeArity Arity>
> struct SimpleParseNode : public JSParseNode {
> T* create(JSTreeContext *tc) {
> return (T*) JSParseNode::create(Arity, tc);
> }
> };
>
> struct FunctionNode : public SimpleParseNode<FunctionNode, PN_FUN> { };
> struct LexicalNode : public SimpleParseNode<LexicalNode, PN_NAME> { };
> ...
Updated•4 years ago
|
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → INVALID
You need to log in
before you can comment on or make changes to this bug.
Description
•