add size in constantvisitor 82/19382/2 YaSp
authorAntoine ELIAS <antoine.elias@scilab-enterprises.com>
Thu, 17 Aug 2017 14:33:28 +0000 (16:33 +0200)
committerC├ędric DELAMARRE <cedric.delamarre@scilab-enterprises.com>
Fri, 18 Aug 2017 13:50:04 +0000 (15:50 +0200)
commit5cbdef02fbe4db10cda38022e2320f7c0f3d494b
treed591ba0b822a2c15a08276c66946509dcd832207
parent9a6f4c446949befa0f9f9fea5f1422c7c51b84be
add size in constantvisitor

//test
function r = test(M)
    if size(M) == [2 3] then
        r = M + 1;
    else
        r = M + 2;
    end
end

tic();for i = 1:1d4, a = test([1 2 3, 4 5 6]);end,toc

analyzerOptions(1);
tic();for i = 1:1d4, a = test([1 2 3, 4 5 6]);end,toc

Change-Id: I5b81fb83df6137c04cd542c4486d760b6a9b8ad8
scilab/modules/ast/src/cpp/analysis/ConstantVisitor.cpp
scilab/modules/ast/src/cpp/analysis/SizeAnalyzer.cpp
scilab/modules/ast/src/cpp/analysis/VisitAssignExp.cpp