[Libreoffice-commits] core.git: 2 commits - sc/source

Luboš Luňák l.lunak at collabora.com
Fri Jun 15 08:40:51 UTC 2018


 sc/source/core/tool/token.cxx |   23 +++++++++++++++--------
 1 file changed, 15 insertions(+), 8 deletions(-)

New commits:
commit 4f965ca5a9da3e4fb9fd9046be69bd7deb1c28c9
Author: Luboš Luňák <l.lunak at collabora.com>
Date:   Fri Jun 15 10:39:26 2018 +0200

    print also formula opcode value in debug output
    
    Some opcodes, such as ocName, have no textual representation.
    
    Change-Id: Ibca80a8ae0f05d8649095d111aadcf3ba9b77ebb

diff --git a/sc/source/core/tool/token.cxx b/sc/source/core/tool/token.cxx
index b1f34b5b6b36..08989651f278 100644
--- a/sc/source/core/tool/token.cxx
+++ b/sc/source/core/tool/token.cxx
@@ -1338,7 +1338,8 @@ void ScTokenArray::CheckForThreading( OpCode eOp  )
     {
         if (aThreadedCalcBlackList.count(eOp))
         {
-            SAL_INFO("sc.core.formulagroup", "opcode " << formula::FormulaCompiler().GetOpCodeMap(sheet::FormulaLanguage::ENGLISH)->getSymbol(eOp) << " disables threaded calculation of formula group");
+            SAL_INFO("sc.core.formulagroup", "opcode " << formula::FormulaCompiler().GetOpCodeMap(sheet::FormulaLanguage::ENGLISH)->getSymbol(eOp)
+                << "(" << int(eOp) << ") disables threaded calculation of formula group");
             mbThreadingEnabled = false;
         }
         else
@@ -1366,7 +1367,8 @@ void ScTokenArray::CheckToken( const FormulaToken& r )
         if (ScInterpreter::GetGlobalConfig().mbOpenCLSubsetOnly &&
             ScInterpreter::GetGlobalConfig().mpOpenCLSubsetOpCodes->find(eOp) == ScInterpreter::GetGlobalConfig().mpOpenCLSubsetOpCodes->end())
         {
-            SAL_INFO("sc.opencl", "opcode " << formula::FormulaCompiler().GetOpCodeMap(sheet::FormulaLanguage::ENGLISH)->getSymbol(eOp) << " disables vectorisation for formula group");
+            SAL_INFO("sc.opencl", "opcode " << formula::FormulaCompiler().GetOpCodeMap(sheet::FormulaLanguage::ENGLISH)->getSymbol(eOp)
+                << "(" << int(eOp) << ") disables vectorisation for formula group");
             meVectorState = FormulaVectorDisabledNotInSubSet;
             mbOpenCLEnabled = false;
             CheckForThreading(eOp);
@@ -1379,7 +1381,8 @@ void ScTokenArray::CheckToken( const FormulaToken& r )
             (dynamic_cast<sc::FormulaGroupInterpreterSoftware*>(sc::FormulaGroupInterpreter::getStatic()) != nullptr) &&
             ScInterpreter::GetGlobalConfig().mpSwInterpreterSubsetOpCodes->find(eOp) == ScInterpreter::GetGlobalConfig().mpSwInterpreterSubsetOpCodes->end())
         {
-            SAL_INFO("sc.core.formulagroup", "opcode " << formula::FormulaCompiler().GetOpCodeMap(sheet::FormulaLanguage::ENGLISH)->getSymbol(eOp) << " disables S/W interpreter for formula group");
+            SAL_INFO("sc.core.formulagroup", "opcode " << formula::FormulaCompiler().GetOpCodeMap(sheet::FormulaLanguage::ENGLISH)->getSymbol(eOp)
+                << "(" << int(eOp) << ") disables S/W interpreter for formula group");
             meVectorState = FormulaVectorDisabledNotInSoftwareSubset;
             mbOpenCLEnabled = false;
             CheckForThreading(eOp);
@@ -1564,7 +1567,8 @@ void ScTokenArray::CheckToken( const FormulaToken& r )
             // Don't change the state.
             break;
             default:
-                SAL_INFO("sc.opencl", "opcode " << formula::FormulaCompiler().GetOpCodeMap(sheet::FormulaLanguage::ENGLISH)->getSymbol(eOp) << " disables vectorisation for formula group");
+                SAL_INFO("sc.opencl", "opcode " << formula::FormulaCompiler().GetOpCodeMap(sheet::FormulaLanguage::ENGLISH)->getSymbol(eOp)
+                    << "(" << int(eOp) << ") disables vectorisation for formula group");
                 meVectorState = FormulaVectorDisabledByOpCode;
                 mbOpenCLEnabled = false;
         }
@@ -1618,7 +1622,8 @@ void ScTokenArray::CheckToken( const FormulaToken& r )
         if (ScInterpreter::GetGlobalConfig().mbOpenCLSubsetOnly &&
             ScInterpreter::GetGlobalConfig().mpOpenCLSubsetOpCodes->find(eOp) == ScInterpreter::GetGlobalConfig().mpOpenCLSubsetOpCodes->end())
         {
-            SAL_INFO("sc.opencl", "opcode " << formula::FormulaCompiler().GetOpCodeMap(sheet::FormulaLanguage::ENGLISH)->getSymbol(eOp) << " disables vectorisation for formula group");
+            SAL_INFO("sc.opencl", "opcode " << formula::FormulaCompiler().GetOpCodeMap(sheet::FormulaLanguage::ENGLISH)->getSymbol(eOp)
+                << "(" << int(eOp) << ") disables vectorisation for formula group");
             meVectorState = FormulaVectorDisabledNotInSubSet;
             mbOpenCLEnabled = false;
             CheckForThreading(eOp);
@@ -1629,7 +1634,8 @@ void ScTokenArray::CheckToken( const FormulaToken& r )
                  (dynamic_cast<sc::FormulaGroupInterpreterSoftware*>(sc::FormulaGroupInterpreter::getStatic()) != nullptr) &&
                  ScInterpreter::GetGlobalConfig().mpSwInterpreterSubsetOpCodes->find(eOp) == ScInterpreter::GetGlobalConfig().mpSwInterpreterSubsetOpCodes->end())
         {
-            SAL_INFO("sc.core.formulagroup", "opcode " << formula::FormulaCompiler().GetOpCodeMap(sheet::FormulaLanguage::ENGLISH)->getSymbol(eOp) << " disables S/W interpreter for formula group");
+            SAL_INFO("sc.core.formulagroup", "opcode " << formula::FormulaCompiler().GetOpCodeMap(sheet::FormulaLanguage::ENGLISH)->getSymbol(eOp)
+                << "(" << int(eOp) << ") disables S/W interpreter for formula group");
             meVectorState = FormulaVectorDisabledNotInSoftwareSubset;
             mbOpenCLEnabled = false;
             CheckForThreading(eOp);
@@ -1664,7 +1670,8 @@ void ScTokenArray::CheckToken( const FormulaToken& r )
                 // Auto column/row names lead to references computed in
                 // interpreter.
 
-                SAL_INFO("sc.opencl", "opcode " << formula::FormulaCompiler().GetOpCodeMap(sheet::FormulaLanguage::ENGLISH)->getSymbol(eOp) << " disables vectorisation for formula group");
+                SAL_INFO("sc.opencl", "opcode " << formula::FormulaCompiler().GetOpCodeMap(sheet::FormulaLanguage::ENGLISH)->getSymbol(eOp)
+                    << "(" << int(eOp) << ") disables vectorisation for formula group");
                 meVectorState = FormulaVectorDisabledByOpCode;
                 mbOpenCLEnabled = false;
                 CheckForThreading(eOp);
commit dfe78833d0919c3213727b20b5abea5718ba64b0
Author: Luboš Luňák <l.lunak at collabora.com>
Date:   Fri Jun 15 10:39:03 2018 +0200

    fix build error in debug code
    
    Change-Id: I2c8102ebd50d8df055c6c30a493a718b8ac8b528

diff --git a/sc/source/core/tool/token.cxx b/sc/source/core/tool/token.cxx
index d60172b1cb0d..b1f34b5b6b36 100644
--- a/sc/source/core/tool/token.cxx
+++ b/sc/source/core/tool/token.cxx
@@ -507,7 +507,7 @@ void DumpToken(formula::FormulaToken const & rToken)
         break;
     default:
         cout << "-- FormulaToken" << endl;
-        cout << "  opcode: " << rToken.GetOpCode() << " " <<
+        cout << "  opcode: " << int(rToken.GetOpCode()) << " " <<
             formula::FormulaCompiler::GetNativeSymbol( rToken.GetOpCode()).toUtf8().getStr() << endl;
         cout << "  type: " << static_cast<int>(rToken.GetType()) << endl;
         switch (rToken.GetType())


More information about the Libreoffice-commits mailing list