Subject Goodbye jrd_nod
Author Adriano dos Santos Fernandes
Hi!

Today I just finalized the work of node refactor in the engine.

There is no jrd_nod and nod_arg (of jrd_nod) anymore. Everything has it
own class, in the following hierarchy:

DmlNode
--- StmtNode
--- ExprNode
------- BoolExprNode
------- RseNode
------- ValueExprNode
----------- AggNode
--------------- WinFuncNode

Node operations are not around everywhere anymore. Node data are type
and const safe. It's much more easy to maintain and implement new features.

Initially I had a bit of fear about making execution slower due to
separate node::execute virtual methods instead of big one with could be
better for the processor cache.

Now I can see it's faster than 2.5. Here is a test:

-----------
isql t.fdb -term !
execute block
as
declare i integer = 1;
declare n integer = 0;
begin
while (i < 5000000)
do
begin
i = i + 1;
n = n + 1;
n = n + 2;
n = n + 3;
n = n + 4;
end
end!
-----------

And times, for Linux AMD64 release build with GCC:
2.5: 6.9s
trunk: 4.9s

For Alex, that was interested in clang performance, the new code runs in
6.9s, so it's slower than GCC.

I didn't implement "copy" of all statements. It looks like many of them
was unnecessary and wrong. I'm also not calling copy when parsing views
validation statements, as they seems unnecessary too. Let me know if you
found some problem.


Adriano