Ported bugfix for bug 1743 from branch Build-33.

--- copasi/sbml/CSBMLExporter.cpp
+++ copasi/sbml/CSBMLExporter.cpp
@@ -1,9 +1,9 @@
 // Begin CVS Header
 //   $Source: /Volumes/Home/Users/shoops/cvs/copasi_dev/copasi/sbml/CSBMLExporter.cpp,v $
-//   $Revision: 1.97 $
+//   $Revision: 1.98 $
 //   $Name:  $
 //   $Author: gauges $
-//   $Date: 2011/12/02 09:09:12 $
+//   $Date: 2011/12/23 12:32:22 $
 // End CVS Header

 // Copyright (C) 2011 - 2010 by Pedro Mendes, Virginia Tech Intellectual
@@ -2820,6 +2820,8 @@
 void CSBMLExporter::createSBMLDocument(CCopasiDataModel& dataModel)
 {
   const SBMLDocument* pOldSBMLDocument = dataModel.getCurrentSBMLDocument();
+  const CModel* pModel = dataModel.getModel();
+  assert(pModel != NULL);

   if (pOldSBMLDocument == NULL)
     {
@@ -2837,22 +2839,25 @@
       // there might still be COPASI object that have an SBML id, we have to
       // collect those as well
       CSBMLExporter::collectIds(dataModel, this->mIdMap);
-      std::string id = CSBMLExporter::createUniqueId(this->mIdMap, "Model_");
+      std::string id = pModel->getSBMLId();
+
+      if (id.empty())
+        {
+          id = CSBMLExporter::createUniqueId(this->mIdMap, "Model_");
+          this->mIdMap.insert(std::pair<const std::string, const SBase*>(id, this->mpSBMLDocument->getModel()));
+        }
+
       this->mpSBMLDocument->createModel(id);
-      this->mIdMap.insert(std::pair<const std::string, const SBase*>(id, this->mpSBMLDocument->getModel()));
     }
   else
     {
       SBMLUtils::collectIds(this->mpSBMLDocument->getModel(), this->mIdMap, this->mMetaIdMap);
     }
-

   this->mFunctionIdMap.clear();
   // update the copasi2sbmlmap
   updateCOPASI2SBMLMap(dataModel);
   // update the comments on the model
-  const CModel* pModel = dataModel.getModel();
-  assert(pModel != NULL);
   this->mpSBMLDocument->getModel()->setName(pModel->getObjectName());

@@ -6671,6 +6676,13 @@

   const CModel* pModel = dataModel.getModel();

+  id = pModel->getSBMLId();
+
+  if (!id.empty())
+    {
+      idMap.insert(std::pair<const std::string, const SBase*>(id, NULL));
+    }
+
   iMax = pModel->getCompartments().size();

   for (i = 0; i < iMax; ++i)


remove quadratic_converge mechanism

remove quadratic_converge mechanism

--- source/solver/run.cpp
+++ source/solver/run.cpp
@@ -541,8 +541,6 @@
         res_norm_infty_total = 0.0;

         double physical_residual_ratio = 0.0;
-        double log_res_last = 0.0;
-        bool quadratic_converge = true;
         calc_artificial_viscosity();
         calc_laplacian_indicator();
         if (! (parameters->dodge_mesh_adaptation) || is_refine_step)
@@ -670,7 +668,6 @@
             res_norm_infty_total += res_norm_infty;
             if (nonlin_iter == 0)
               {
-                log_res_last = std::log (res_norm);
                 if (n_time_step == 0)
                   {
                     physical_residual_first = physical_res_norm;
@@ -698,14 +695,7 @@
                       }
                   }
               }
-            else
-              {
-                const double log_res = std::log (res_norm);
-                // This only works when log_res<0 && log_res_last<0.
-                quadratic_converge =
-                  (log_res < log_res_last * parameters->laplacian_newton_quadratic);
-                log_res_last = log_res;
-              }
+
             physical_residual_ratio = physical_res_norm/physical_residual_first;

             computing_timer.leave_subsection ("3:Assemble Newton system");
@@ -1066,15 +1056,6 @@
                 {
                   n_step_laplacian_vanished += (continuation_coefficient>0.0);
                   double laplacian_ratio_min = parameters->continuation_min_decrease_rate;
-                  if (quadratic_converge && parameters->Mach < 0.5)
-                    {
-                      laplacian_ratio_min =
-                        std::min (laplacian_ratio_min,
-                                  std::pow (continuation_coefficient,
-                                            parameters->laplacian_decrease_rate - 1.0)
-                                 );
-                    }
-
                   double referencing_continuation_coeff
                     =  parameters->laplacian_continuation;
                   if (parameters->compute_laplacian_coeff_from_Mach_max)


PHP stream_select compatibility.

PHP stream_select compatibility.

--- swoole_runtime.cc
+++ swoole_runtime.cc
@@ -1344,15 +1344,16 @@

 static PHP_FUNCTION(_stream_select)
 {
+    if (!PHPCoroutine::is_in())
+    {
+        ori_stream_select_handler(INTERNAL_FUNCTION_PARAM_PASSTHRU);
+        return;
+    }
+
     zval *r_array, *w_array, *e_array;
     zend_long sec, usec = 0;
     zend_bool secnull;
     int retval = 0;
-
-    if (!PHPCoroutine::is_in())
-    {
-        RETURN_FALSE;
-    }

     php_swoole_check_reactor();


FIXBUG: the array should be aligned at least at 8 bytes(as a pointer)

--- code_gen.cc
+++ code_gen.cc
@@ -1023,7 +1023,13 @@
     heap.pop();

     offset -= obj->Type()->Width();
-    offset = Type::MakeAlign(offset, obj->Align());
+    auto align = obj->Align();
+    if (obj->Type()->ToArray()) {
+      // The alignment of an array is at least the aligment of a pointer
+      // (as it is always cast to a pointer)
+      align = std::max(align, 8);
+    }
+    offset = Type::MakeAlign(offset, align);
     obj->SetOffset(offset);
   }


small fixes

small fixes

git-svn-id: e171abefef93db0a74257c7d87d5b6400fe00c1f@3951 f22100f3-aa73-48fe-a4fb-fd497bb32605

--- trunk/syncped/src/frame.cpp
+++ trunk/syncped/src/frame.cpp
@@ -84,7 +84,8 @@
   EVT_UPDATE_UI_RANGE(wxID_SAVE, wxID_SAVEAS, Frame::OnUpdateUI)
   EVT_UPDATE_UI_RANGE(ID_EDIT_FIND_NEXT, ID_EDIT_FIND_PREVIOUS, Frame::OnUpdateUI)
   EVT_UPDATE_UI_RANGE(ID_EDIT_TOGGLE_FOLD, ID_EDIT_UNFOLD_ALL, Frame::OnUpdateUI)
-  EVT_UPDATE_UI_RANGE(ID_OPTION_LIST_SORT_ASCENDING, ID_OPTION_LIST_SORT_TOGGLE, Frame::OnUpdateUI)
+  EVT_UPDATE_UI_RANGE(
+    ID_OPTION_LIST_SORT_ASCENDING, ID_OPTION_LIST_SORT_TOGGLE, Frame::OnUpdateUI)
   EVT_UPDATE_UI_RANGE(ID_PROJECT_OPENTEXT, ID_PROJECT_SAVEAS, Frame::OnUpdateUI)
   EVT_UPDATE_UI_RANGE(ID_TOOL_LOWEST, ID_TOOL_HIGHEST, Frame::OnUpdateUI)
   EVT_UPDATE_UI_RANGE(ID_VIEW_PANE_FIRST + 1, ID_VIEW_PANE_LAST - 1, Frame::OnUpdateUI)
@@ -873,9 +874,6 @@
     return;
   }

-  const wxString selection = files[0];
-  const wxExFileName filename(selection);
-
   if (event.GetEventType() == wxEVT_COMMAND_TREE_ITEM_RIGHT_CLICK)
   {
     wxExMenu menu;
@@ -883,6 +881,9 @@
     menu.AppendSeparator();
     menu.Append(ID_TREE_COPY,
       wxGetStockLabel(wxID_COPY), wxEmptyString, wxART_COPY);
+
+    const wxString selection = files[0];
+    const wxExFileName filename(selection);

     if (wxExVCS::Get()->DirExists(filename))
     {
@@ -944,9 +945,10 @@
     case ID_PROJECT_CLOSE:
     case ID_PROJECT_SAVEAS:
       event.Enable(GetProject() != NULL && GetProject()->IsShown());
-    break;
+      break;
     case ID_PROJECT_OPENTEXT:
-      event.Enable(GetProject() != NULL && !GetProject()->GetFileName().GetFullPath().empty());
+      event.Enable(
+        GetProject() != NULL && !GetProject()->GetFileName().GetFullPath().empty());
       break;
     case ID_PROJECT_SAVE:
       event.Enable(GetProject() != NULL && GetProject()->GetContentsChanged());


removing commented out code

removing commented out code

--- lib/Runtime/ByteCode/ByteCodeGenerator.cpp
+++ lib/Runtime/ByteCode/ByteCodeGenerator.cpp
@@ -47,21 +47,6 @@
     ParseNodeVisitor<TContext> postfixHelper(context, postfix);

     Visit(pnode, byteCodeGenerator, prefixHelper, postfixHelper, nullptr);
-
-    /*
-    Visit(pnode, byteCodeGenerator,
-        [context, prefix](ParseNode * pnode, ByteCodeGenerator * byteCodeGenerator)
-        {
-            prefix(pnode, byteCodeGenerator, context);
-        },
-        [context, postfix](ParseNode * pnode, ByteCodeGenerator * byteCodeGenerator)
-        {
-            if (postfix)
-            {
-                postfix(pnode, byteCodeGenerator, context);
-            }
-        }, nullptr);
-        */
 }

 template <class PrefixFn, class PostfixFn>


tried E.cpp to 'E'

tried E.cpp to 'E'


[1.7>master] [MERGE #3719 @jianchun] fix JavascriptFunction::CheckValidDebugThunk CrossSite check

Merge pull request #3719 from jianchun:validdbgthunk

Comparing with scriptContext->CurrentCrossSiteThunk is unreliable. The
function being checked could be CrossSite and its context closed, thus
could be using a cross site thunk different to scriptContext's (note we
have 2 cross site thunks: DefaultThunk and ProfileThunk).

Change to CrossSite::IsThunk to cover both.

Fix OS#11699485

--- lib/Runtime/Library/JavascriptFunction.cpp
+++ lib/Runtime/Library/JavascriptFunction.cpp
@@ -805,7 +805,7 @@
         if (scriptContext->IsScriptContextInDebugMode()
             && !scriptContext->IsInterpreted() && !CONFIG_FLAG(ForceDiagnosticsMode)    // Does not work nicely if we change the default settings.
             && function->GetEntryPoint() != scriptContext->CurrentThunk
-            && function->GetEntryPoint() != scriptContext->CurrentCrossSiteThunk
+            && !CrossSite::IsThunk(function->GetEntryPoint())
             && JavascriptFunction::Is(function))
         {


Disable using restart_interp based on usage

--- vm/llvm/jit_visit.hpp
+++ vm/llvm/jit_visit.hpp
@@ -1091,7 +1091,7 @@
     }

     void emit_uncommon() {
-      if(!inline_return_ && !has_side_effects()) {
+      if(false) { // !inline_return_ && !has_side_effects()) {
         Signature sig(ls_, "Object");

         sig << "VM";


[AArch64] Remove lots of redundant code. NFC.

git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@286606 91177308-0d34-0410-b5e6-96231b3b80d8

--- lib/Target/AArch64/AArch64ISelLowering.cpp
+++ lib/Target/AArch64/AArch64ISelLowering.cpp
@@ -7625,45 +7625,56 @@
   // future CPUs have a cheaper MADD instruction, this may need to be
   // gated on a subtarget feature. For Cyclone, 32-bit MADD is 4 cycles and
   // 64-bit is 5 cycles, so this is always a win.
+  unsigned ShiftAmt, AddSubOpc;
+  // Is the shifted value the LHS operand of the add/sub?
+  bool ShiftValUseIsN0 = true;
+  // Do we need to negate the result?
+  bool NegateResult = false;
+
+  if (ConstValue.isNonNegative()) {
+    // (mul x, 2^N + 1) => (add (shl x, N), x)
+    // (mul x, 2^N - 1) => (sub (shl x, N), x)
+    APInt CVMinus1 = ConstValue - 1;
+    APInt CVPlus1 = ConstValue + 1;
+    if (CVMinus1.isPowerOf2()) {
+      ShiftAmt = CVMinus1.logBase2();
+      AddSubOpc = ISD::ADD;
+    } else if (CVPlus1.isPowerOf2()) {
+      ShiftAmt = CVPlus1.logBase2();
+      AddSubOpc = ISD::SUB;
+    } else
+      return SDValue();
+  } else {
+    // (mul x, -(2^N - 1)) => (sub x, (shl x, N))
+    // (mul x, -(2^N + 1)) => - (add (shl x, N), x)
+    APInt CVNegPlus1 = -ConstValue + 1;
+    APInt CVNegMinus1 = -ConstValue - 1;
+    if (CVNegPlus1.isPowerOf2()) {
+      ShiftAmt = CVNegPlus1.logBase2();
+      AddSubOpc = ISD::SUB;
+      ShiftValUseIsN0 = false;
+    } else if (CVNegMinus1.isPowerOf2()) {
+      ShiftAmt = CVNegMinus1.logBase2();
+      AddSubOpc = ISD::ADD;
+      NegateResult = true;
+    } else
+      return SDValue();
+  }
+
   SDLoc DL(N);
   EVT VT = N->getValueType(0);
-  if (ConstValue.isNonNegative()) {
-    // (mul x, 2^N + 1) => (add (shl x, N), x)
-    APInt CVMinus1 = ConstValue - 1;
-    if (CVMinus1.isPowerOf2()) {
-      SDValue ShiftedVal =
-          DAG.getNode(ISD::SHL, DL, VT, N->getOperand(0),
-                      DAG.getConstant(CVMinus1.logBase2(), DL, MVT::i64));
-      return DAG.getNode(ISD::ADD, DL, VT, ShiftedVal, N->getOperand(0));
-    }
-    // (mul x, 2^N - 1) => (sub (shl x, N), x)
-    APInt CVPlus1 = ConstValue + 1;
-    if (CVPlus1.isPowerOf2()) {
-      SDValue ShiftedVal =
-          DAG.getNode(ISD::SHL, DL, VT, N->getOperand(0),
-                      DAG.getConstant(CVPlus1.logBase2(), DL, MVT::i64));
-      return DAG.getNode(ISD::SUB, DL, VT, ShiftedVal, N->getOperand(0));
-    }
-  } else {
-    // (mul x, -(2^N - 1)) => (sub x, (shl x, N))
-    APInt CVNegPlus1 = -ConstValue + 1;
-    if (CVNegPlus1.isPowerOf2()) {
-      SDValue ShiftedVal =
-          DAG.getNode(ISD::SHL, DL, VT, N->getOperand(0),
-                      DAG.getConstant(CVNegPlus1.logBase2(), DL, MVT::i64));
-      return DAG.getNode(ISD::SUB, DL, VT, N->getOperand(0), ShiftedVal);
-    }
-    // (mul x, -(2^N + 1)) => - (add (shl x, N), x)
-    APInt CVNegMinus1 = -ConstValue - 1;
-    if (CVNegMinus1.isPowerOf2()) {
-      SDValue ShiftedVal =
-          DAG.getNode(ISD::SHL, DL, VT, N->getOperand(0),
-                      DAG.getConstant(CVNegMinus1.logBase2(), DL, MVT::i64));
-      SDValue Add = DAG.getNode(ISD::ADD, DL, VT, ShiftedVal, N->getOperand(0));
-      return DAG.getNode(ISD::SUB, DL, VT, DAG.getConstant(0, DL, VT), Add);
-    }
-  }
-  return SDValue();
+  SDValue N0 = N->getOperand(0);
+  SDValue ShiftedVal = DAG.getNode(ISD::SHL, DL, VT, N->getOperand(0),
+                                   DAG.getConstant(ShiftAmt, DL, MVT::i64));
+
+  SDValue AddSubN0 = ShiftValUseIsN0 ? ShiftedVal : N0;
+  SDValue AddSubN1 = ShiftValUseIsN0 ? N0 : ShiftedVal;
+  SDValue Res = DAG.getNode(AddSubOpc, DL, VT, AddSubN0, AddSubN1);
+  if (!NegateResult)
+    return Res;
+
+  // Negate the result.
+  return DAG.getNode(ISD::SUB, DL, VT, DAG.getConstant(0, DL, VT), Res);
 }

 static SDValue performVectorCompareAndMaskUnaryOpCombine(SDNode *N,


LoopVectorizer: change debug prints: Print the module identifier when deciding to vectorize. When deciding not to vectorize do not print the called function name because it can be null.

git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@166989 91177308-0d34-0410-b5e6-96231b3b80d8

--- lib/Transforms/Vectorize/LoopVectorize.cpp
+++ lib/Transforms/Vectorize/LoopVectorize.cpp
@@ -408,7 +408,9 @@
       VF = VectorizationFactor;
     }

-    DEBUG(dbgs() << "LV: Found a vectorizable loop ("<< VF << ").\n");
+    DEBUG(dbgs() << "LV: Found a vectorizable loop ("<< VF << ") in "<<
+          L->getHeader()->getParent()->getParent()->getModuleIdentifier()<<
+          "\n");

     // If we decided that it is *legal* to vectorizer the loop then do it.
     SingleBlockLoopVectorizer LB(L, SE, LI, DT, &LPM, VF);
@@ -597,7 +599,8 @@
     WidenMap[Instr] = VecResults;
 }

-void SingleBlockLoopVectorizer::createEmptyLoop(LoopVectorizationLegality *Legal) {
+void
+SingleBlockLoopVectorizer::createEmptyLoop(LoopVectorizationLegality *Legal) {
   /*
    In this function we generate a new loop. The new loop will contain
    the vectorized instructions while the old loop will continue to run the
@@ -1178,8 +1181,7 @@
     // We still don't handle functions.
     CallInst *CI = dyn_cast<CallInst>(I);
     if (CI) {
-      DEBUG(dbgs() << "LV: Found a call site:"<<
-            CI->getCalledFunction()->getName() << "\n");
+      DEBUG(dbgs() << "LV: Found a call site.\n");
       return false;
     }


Reverted "new AliPhysicsSelectionTask()" call to "new AliPhysicsSelectionTask("")"

--- ANALYSIS/macros/AddTaskPhysicsSelection.C
+++ ANALYSIS/macros/AddTaskPhysicsSelection.C
@@ -19,7 +19,7 @@

   // Configure analysis
   //===========================================================================
-  AliPhysicsSelectionTask *task = new AliPhysicsSelectionTask();
+  AliPhysicsSelectionTask *task = new AliPhysicsSelectionTask("");
   task->SetUseSpecialOutput(useSpecialOutput); // RS: optionally use special output
   // this makes physics selection to work using AliMultiInputEventHandler
   if (inputHandler && (inputHandler->IsA() == AliMultiInputEventHandler::Class())) {


Print known packets only

Print known packets only

--- vpn-bridge/vclient.cc
+++ vpn-bridge/vclient.cc
@@ -49,8 +49,8 @@
 		{
 			// Layer 2: Ethernet packet
 			Eth* eth = reinterpret_cast<Eth*>(buffer);
-			eth->print_header();
-			eth->print_header_raw();
+			// eth->print_header();
+			// eth->print_header_raw();
 			if (ntohs(eth->h_proto) != Eth::ETH_P_IP) continue;

 			// Layer 3: IP packet
@@ -60,8 +60,6 @@
 #endif // HOSTGATOR

 		// Layer 3
-		ip->print_header();
-		ip->print_header_raw();
 		{
 			// Verify that our IP checksum algorithm is correct
 			uint16_t original_checksum = ip->check;
@@ -82,6 +80,8 @@
 			if (ntohs(tcp->source) == 22 || ntohs(tcp->dest) == 22) {
 				continue;
 			}
+			ip->print_header();
+			ip->print_header_raw();
 			tcp->print_header();
 			tcp->print_header_raw();
 			std::cout << "Payload:" << std::endl;
@@ -104,6 +104,8 @@
 		case Ip::IPPROTO_UDP:
 		{
 			Udp* udp = reinterpret_cast<Udp*>(ip->payload());
+			ip->print_header();
+			ip->print_header_raw();
 			udp->print_header();
 			udp->print_header_raw();
 			std::cout << "Payload:" << std::endl;
@@ -127,6 +129,8 @@
 		case Ip::IPPROTO_ICMP:
 		{
 			Icmp* icmp = reinterpret_cast<Icmp*>(ip->payload());
+			ip->print_header();
+			ip->print_header_raw();
 			icmp->print_header();
 			{
 				// Verify that our ICMP checksum algorithm is correct


[LV] Port the remarks in processLoop to the new streaming API

This completes LV.

git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@282821 91177308-0d34-0410-b5e6-96231b3b80d8
(cherry picked from commit 1247d5cd07dba82afc0f2d83348a04f8e6400ff2)

--- lib/Transforms/Vectorize/LoopVectorize.cpp
+++ lib/Transforms/Vectorize/LoopVectorize.cpp
@@ -6694,8 +6694,8 @@
   // Looking at the diagnostic output is the only way to determine if a loop
   // was vectorized (other than looking at the IR or machine code), so it
   // is important to generate an optimization remark for each loop. Most of
-  // these messages are generated by emitOptimizationRemarkAnalysis. Remarks
-  // generated by emitOptimizationRemark and emitOptimizationRemarkMissed are
+  // these messages are generated as OptimizationRemarkAnalysis. Remarks
+  // generated as OptimizationRemark and OptimizationRemarkMissed are
   // less verbose reporting vectorized loops and unvectorized loops that may
   // benefit from vectorization, respectively.

@@ -6795,7 +6795,7 @@
   unsigned UserIC = Hints.getInterleave();

   // Identify the diagnostic messages that should be produced.
-  std::string VecDiagMsg, IntDiagMsg;
+  std::pair<StringRef, std::string> VecDiagMsg, IntDiagMsg;
   bool VectorizeLoop = true, InterleaveLoop = true;
   if (Requirements.doesNotMeet(F, L, Hints)) {
     DEBUG(dbgs() << "LV: Not vectorizing: loop did not meet vectorization "
@@ -6806,26 +6806,32 @@

   if (VF.Width == 1) {
     DEBUG(dbgs() << "LV: Vectorization is possible but not beneficial.\n");
-    VecDiagMsg =
-        "the cost-model indicates that vectorization is not beneficial";
+    VecDiagMsg = std::make_pair(
+        "VectorizationNotBeneficial",
+        "the cost-model indicates that vectorization is not beneficial");
     VectorizeLoop = false;
   }

   if (IC == 1 && UserIC <= 1) {
     // Tell the user interleaving is not beneficial.
     DEBUG(dbgs() << "LV: Interleaving is not beneficial.\n");
-    IntDiagMsg =
-        "the cost-model indicates that interleaving is not beneficial";
+    IntDiagMsg = std::make_pair(
+        "InterleavingNotBeneficial",
+        "the cost-model indicates that interleaving is not beneficial");
     InterleaveLoop = false;
-    if (UserIC == 1)
-      IntDiagMsg +=
+    if (UserIC == 1) {
+      IntDiagMsg.first = "InterleavingNotBeneficialAndDisabled";
+      IntDiagMsg.second +=
           " and is explicitly disabled or interleave count is set to 1";
+    }
   } else if (IC > 1 && UserIC == 1) {
     // Tell the user interleaving is beneficial, but it explicitly disabled.
     DEBUG(dbgs()
           << "LV: Interleaving is beneficial but is explicitly disabled.");
-    IntDiagMsg = "the cost-model indicates that interleaving is beneficial "
-                 "but is explicitly disabled or interleave count is set to 1";
+    IntDiagMsg = std::make_pair(
+        "InterleavingBeneficialButDisabled",
+        "the cost-model indicates that interleaving is beneficial "
+        "but is explicitly disabled or interleave count is set to 1");
     InterleaveLoop = false;
   }

@@ -6836,22 +6842,31 @@
   const char *VAPassName = Hints.vectorizeAnalysisPassName();
   if (!VectorizeLoop && !InterleaveLoop) {
     // Do not vectorize or interleaving the loop.
-    ORE->emitOptimizationRemarkAnalysis(VAPassName, L, VecDiagMsg);
-    ORE->emitOptimizationRemarkAnalysis(LV_NAME, L, IntDiagMsg);
+    ORE->emit(OptimizationRemarkAnalysis(VAPassName, VecDiagMsg.first,
+                                         L->getStartLoc(), L->getHeader())
+              << VecDiagMsg.second);
+    ORE->emit(OptimizationRemarkAnalysis(LV_NAME, IntDiagMsg.first,
+                                         L->getStartLoc(), L->getHeader())
+              << IntDiagMsg.second);
     return false;
   } else if (!VectorizeLoop && InterleaveLoop) {
     DEBUG(dbgs() << "LV: Interleave Count is " << IC << '\n');
-    ORE->emitOptimizationRemarkAnalysis(VAPassName, L, VecDiagMsg);
+    ORE->emit(OptimizationRemarkAnalysis(VAPassName, VecDiagMsg.first,
+                                         L->getStartLoc(), L->getHeader())
+              << VecDiagMsg.second);
   } else if (VectorizeLoop && !InterleaveLoop) {
     DEBUG(dbgs() << "LV: Found a vectorizable loop (" << VF.Width << ") in "
                  << DebugLocStr << '\n');
-    ORE->emitOptimizationRemarkAnalysis(LV_NAME, L, IntDiagMsg);
+    ORE->emit(OptimizationRemarkAnalysis(LV_NAME, IntDiagMsg.first,
+                                         L->getStartLoc(), L->getHeader())
+              << IntDiagMsg.second);
   } else if (VectorizeLoop && InterleaveLoop) {
     DEBUG(dbgs() << "LV: Found a vectorizable loop (" << VF.Width << ") in "
                  << DebugLocStr << '\n');
     DEBUG(dbgs() << "LV: Interleave Count is " << IC << '\n');
   }

+  using namespace ore;
   if (!VectorizeLoop) {
     assert(IC > 1 && "interleave count should not be 1 or 0");
     // If we decided that it is not legal to vectorize the loop, then
@@ -6859,9 +6874,10 @@
     InnerLoopUnroller Unroller(L, PSE, LI, DT, TLI, TTI, AC, ORE, IC);
     Unroller.vectorize(&LVL, CM.MinBWs);

-    ORE->emitOptimizationRemark(LV_NAME, L,
-                                Twine("interleaved loop (interleaved count: ") +
-                                    Twine(IC) + ")");
+    ORE->emit(OptimizationRemark(LV_NAME, "Interleaved", L->getStartLoc(),
+                                 L->getHeader())
+              << "interleaved loop (interleaved count: "
+              << NV("InterleaveCount", IC) << ")");
   } else {
     // If we decided that it is *legal* to vectorize the loop, then do it.
     InnerLoopVectorizer LB(L, PSE, LI, DT, TLI, TTI, AC, ORE, VF.Width, IC);
@@ -6875,10 +6891,11 @@
       AddRuntimeUnrollDisableMetaData(L);

     // Report the vectorization decision.
-    ORE->emitOptimizationRemark(
-        LV_NAME, L, Twine("vectorized loop (vectorization width: ") +
-                        Twine(VF.Width) + ", interleaved count: " + Twine(IC) +
-                        ")");
+    ORE->emit(OptimizationRemark(LV_NAME, "Vectorized", L->getStartLoc(),
+                                 L->getHeader())
+              << "vectorized loop (vectorization width: "
+              << NV("VectorizationFactor", VF.Width)
+              << ", interleaved count: " << NV("InterleaveCount", IC) << ")");
   }

   // Mark the loop as already vectorized to avoid vectorizing again.


remove debug printing

remove debug printing

--- vtk/vtkXdmfReader.cxx
+++ vtk/vtkXdmfReader.cxx
@@ -86,7 +86,7 @@
 #define USE_IMAGE_DATA // otherwise uniformgrid

 vtkStandardNewMacro(vtkXdmfReader);
-vtkCxxRevisionMacro(vtkXdmfReader, "1.8");
+vtkCxxRevisionMacro(vtkXdmfReader, "1.9");

 vtkCxxSetObjectMacro(vtkXdmfReader,Controller,vtkMultiProcessController);

@@ -229,9 +229,9 @@
     {
     if ( this->DataItem )
       {
-      cout << "....Deleting DataItem " << this->DataItem << endl;
+      // cout << "....Deleting DataItem " << this->DataItem << endl;
       delete this->DataItem;
-      cout << "....Back from Deleting DataItem " << this->DataItem << endl;
+      // cout << "....Back from Deleting DataItem " << this->DataItem << endl;
       this->DataItem = 0;
       }
     this->ArrayConverter->Delete();
@@ -741,7 +741,7 @@
         currentGridIterator->first.c_str(),&currentGridIterator->second,
         outputGrid, this->NumberOfEnabledActualGrids, outputVector);
       outputGrid++;
-       cout << "Progress " << 1.0 * outputGrid / this->NumberOfEnabledActualGrids << endl;
+       // cout << "Progress " << 1.0 * outputGrid / this->NumberOfEnabledActualGrids << endl;
       this->UpdateProgress(1.0 * outputGrid / this->NumberOfEnabledActualGrids);
       }
     }
@@ -757,7 +757,7 @@
   int numberOfGrids,
   vtkInformationVector *outputVector)
 {
-    cout << " ........... In RequestActualGridData" << endl;
+    // cout << " ........... In RequestActualGridData" << endl;
   vtkInformation *info=outputVector->GetInformationObject(0);
   int procId=info->Get(vtkStreamingDemandDrivenPipeline::UPDATE_PIECE_NUMBER());
   int nbProcs=info->Get(vtkStreamingDemandDrivenPipeline::UPDATE_NUMBER_OF_PIECES());
@@ -773,7 +773,7 @@
     // int levels = 1;

     int level=0;
-    cout << "mgd->SetNumberOfDataSets(" << outputGrid << "," << currentActualGrid->Collection->GetNumberOfDataSets(level) << ")" << endl;
+    // cout << "mgd->SetNumberOfDataSets(" << outputGrid << "," << currentActualGrid->Collection->GetNumberOfDataSets(level) << ")" << endl;
     mgd->SetNumberOfDataSets(outputGrid, currentActualGrid->Collection->GetNumberOfDataSets(level));
     while(level<levels)
       {
@@ -781,7 +781,7 @@
       ++level;
       }

-   cout << "level = " << level << " levels = " << levels << " numberOfDataSets = " << numberOfDataSets << endl;
+   // cout << "level = " << level << " levels = " << levels << " numberOfDataSets = " << numberOfDataSets << endl;
     vtkXdmfReaderGridCollection::SetOfGrids::iterator gridIt;
     vtkXdmfReaderGridCollection::SetOfGrids::iterator gridItEnd;

@@ -826,7 +826,7 @@
       int index=currentIndex[level];
       if(datasetIdx<blockStart || datasetIdx>blockEnd)
         {
-             cout << " mgd->SetDataSet(0) for index " << index << " outputGrid " << outputGrid << " datasetIdx " << datasetIdx << endl;
+             // cout << " mgd->SetDataSet(0) for index " << index << " outputGrid " << outputGrid << " datasetIdx " << datasetIdx << endl;
         // mgd->SetDataSet(level,index,0); // empty, on another processor
         mgd->SetDataSet(outputGrid, index, 0); // empty, on another processor
         }
@@ -837,7 +837,7 @@
           {
           vtkUnstructuredGrid *ds=vtkUnstructuredGrid::New();
           ds->SetMaximumNumberOfPieces(1);
-             cout << " 1 mgd->SetDataSet(ds) for index " << index << " outputGrid " << outputGrid << " datasetIdx " << datasetIdx << endl;
+             // cout << " 1 mgd->SetDataSet(ds) for index " << index << " outputGrid " << outputGrid << " datasetIdx " << datasetIdx << endl;
           // mgd->SetDataSet(level,index,ds);
           mgd->SetDataSet(outputGrid, index, ds);
           ds->Delete();
@@ -846,7 +846,7 @@
                  xdmfGrid->GetTopology()->GetTopologyType() == XDMF_3DSMESH )
           {
           vtkStructuredGrid *ds=vtkStructuredGrid::New();
-             cout << " 2 mgd->SetDataSet(ds) for index " << index << " level " << level << " datasetIdx " << datasetIdx << endl;
+             // cout << " 2 mgd->SetDataSet(ds) for index " << index << " level " << level << " datasetIdx " << datasetIdx << endl;
           // mgd->SetDataSet(level,index,ds);
           mgd->SetDataSet(outputGrid, index, ds);
           ds->Delete();
@@ -878,7 +878,7 @@
         vtkDataObject *ds=mgd->GetDataSet(outputGrid,index);
         vtkInformation *subInfo=compInfo->GetInformation(level,index);
         result=this->RequestSingleGridData("",gridIt->second,subInfo,ds,1);
-        cout << "ds level " << level << " index " << index << " = " << endl;
+        // cout << "ds level " << level << " index " << index << " = " << endl;
         // ds->Print(std::cout);
         }
       ++currentIndex[level];
@@ -1079,7 +1079,7 @@
         verts = vtkCellArray::New();

         /* Get the pointer. Make it Big enough ... too big for now */
-        cout << "::::: Length = " << Length << endl;
+        // cout << "::::: Length = " << Length << endl;
         connections = verts->WritePointer(
           NumberOfElements,
           Length);
@@ -1140,8 +1140,8 @@
           }
     // Resize the Array to the Proper Size
     IdArray = verts->GetData();
-    vtkDebugWithObjectMacro(this->Reader, "Resizing to " << index << " elements");
     RealSize = index - 1;
+    vtkDebugWithObjectMacro(this->Reader, "Resizing to " << RealSize << " elements");
     IdArray->Resize(RealSize);
     }
     delete [] Connections;


Fixed endianness bug

Fixed endianness bug

--- source/EndianUtils.hpp
+++ source/EndianUtils.hpp
@@ -25,10 +25,9 @@
 #ifdef ANDROID
 #include <machine/endian.h>
    #if _BYTE_ORDER == _BIG_ENDIAN
+      #define kBigEndianHost 1
+   #else
       #define kBigEndianHost 0
-   #else
-      #define kBigEndianHost 1
-      #define kLittleEndianHost 0
    #endif
 #endif


Test commit.

Test commit.

git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@297579 91177308-0d34-0410-b5e6-96231b3b80d8

--- lib/Transforms/Vectorize/LoopVectorize.cpp
+++ lib/Transforms/Vectorize/LoopVectorize.cpp
@@ -6231,6 +6231,7 @@
     else {
       // If the trip count that we found modulo the vectorization factor is not
       // zero then we require a tail.
+      // FIXME: look for a smaller VF that does divide TC rather than give up.
       ORE->emit(createMissedAnalysis("NoTailLoopWithOptForSize")
                 << "cannot optimize for size and vectorize at the "
                    "same time. Enable vectorization of this loop "


Copy palette from source data if type is PALETTE COLOR.

--- vtkDICOMGenerator.cxx
+++ vtkDICOMGenerator.cxx
@@ -908,12 +908,14 @@
     }
   else
     {
-    meta->RemoveAttribute(DC::SamplesPerPixel);
-    meta->RemoveAttribute(DC::PlanarConfiguration);
-    std::string pm = meta->GetAttributeValue(
-      DC::PhotometricInterpretation).AsString();
-    if (pm == "PALETTE COLOR" &&
-        meta->HasAttribute(DC::RedPaletteColorLookupTableData))
+    std::string pm;
+    if (this->MetaData)
+      {
+      pm = this->MetaData->GetAttributeValue(
+        DC::PhotometricInterpretation).AsString();
+      }
+    if (pm == "PALETTE COLOR" && this->MetaData &&
+        this->MetaData->HasAttribute(DC::RedPaletteColorLookupTableData))
       {
       paletteColor = true;
       }
@@ -924,15 +926,22 @@
     meta->SetAttributeValue(DC::PhotometricInterpretation, pm);
     }

-  // Remove unless "PALETTE COLOR"
-  if (!paletteColor)
-    {
-    meta->RemoveAttribute(DC::RedPaletteColorLookupTableDescriptor);
-    meta->RemoveAttribute(DC::GreenPaletteColorLookupTableDescriptor);
-    meta->RemoveAttribute(DC::BluePaletteColorLookupTableDescriptor);
-    meta->RemoveAttribute(DC::RedPaletteColorLookupTableData);
-    meta->RemoveAttribute(DC::GreenPaletteColorLookupTableData);
-    meta->RemoveAttribute(DC::BluePaletteColorLookupTableData);
+  if (paletteColor && this->MetaData)
+    {
+    static const DC::EnumType palette[] = {
+      DC::RedPaletteColorLookupTableDescriptor,
+      DC::GreenPaletteColorLookupTableDescriptor,
+      DC::BluePaletteColorLookupTableDescriptor,
+      DC::RedPaletteColorLookupTableData,
+      DC::GreenPaletteColorLookupTableData,
+      DC::BluePaletteColorLookupTableData,
+      DC::ItemDelimitationItem
+    };
+    for (int i = 0; palette[i] != DC::ItemDelimitationItem; i++)
+      {
+      meta->SetAttributeValue(palette[i],
+        this->MetaData->GetAttributeValue(palette[i]));
+      }
     }

   meta->SetAttributeValue(DC::Rows, rows);
@@ -949,7 +958,7 @@
     DC::PixelAspectRatio,
     vtkDICOMValue(vtkDICOMVR::IS, aspect, aspect+2));

-  // These can be easily added, but they are optional
+  // These can be easily added in the writer, but they are optional
   meta->RemoveAttribute(DC::SmallestImagePixelValue);
   meta->RemoveAttribute(DC::LargestImagePixelValue);


fix for compile time warning messages

fix for compile time warning messages

git-svn-id: e2fa1b4f04257a65cc3162f75ad5f19d327daceb@109 85bd2434-ea95-11dd-8fb1-9960f2a117f8

--- source/QXmppStanza.cpp
+++ source/QXmppStanza.cpp
@@ -32,16 +32,16 @@
 uint QXmppStanza::s_uniqeIdNo = 0;

 QXmppStanza::Error::Error():
+    m_code(0),
     m_type(static_cast<QXmppStanza::Error::Type>(-1)),
-    m_code(0),
     m_condition(static_cast<QXmppStanza::Error::Condition>(-1)),
     m_text("")
 {
 }

 QXmppStanza::Error::Error(Type type, Condition cond, const QString& text):
+    m_code(0),
     m_type(type),
-    m_code(0),
     m_condition(cond),
     m_text(text)
 {


[LV] Rename StrideAccesses to AccessStrideInfo (NFC)

We now collect all accesses with a constant stride, not just the ones with a
stride greater than one. This change was requested in the review of D19984.

git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@275473 91177308-0d34-0410-b5e6-96231b3b80d8

--- lib/Transforms/Vectorize/LoopVectorize.cpp
+++ lib/Transforms/Vectorize/LoopVectorize.cpp
@@ -937,8 +937,8 @@
   }

   /// \brief Collect all the accesses with a constant stride in program order.
-  void collectConstStridedAccesses(
-      MapVector<Instruction *, StrideDescriptor> &StrideAccesses,
+  void collectConstStrideAccesses(
+      MapVector<Instruction *, StrideDescriptor> &AccessStrideInfo,
       const ValueToValueMap &Strides);

   /// \brief Returns true if \p Stride is allowed in an interleaved group.
@@ -4927,8 +4927,8 @@
   return true;
 }

-void InterleavedAccessInfo::collectConstStridedAccesses(
-    MapVector<Instruction *, StrideDescriptor> &StrideAccesses,
+void InterleavedAccessInfo::collectConstStrideAccesses(
+    MapVector<Instruction *, StrideDescriptor> &AccessStrideInfo,
     const ValueToValueMap &Strides) {

   auto &DL = TheLoop->getHeader()->getModule()->getDataLayout();
@@ -4938,7 +4938,7 @@
   // blocks in the loop in reverse postorder (i.e., in a topological order).
   // Such an ordering will ensure that any load/store that may be executed
   // before a second load/store will precede the second load/store in
-  // StrideAccesses.
+  // AccessStrideInfo.
   LoopBlocksDFS DFS(TheLoop);
   DFS.perform(LI);
   for (BasicBlock *BB : make_range(DFS.beginRPO(), DFS.endRPO()))
@@ -4960,7 +4960,7 @@
       if (!Align)
         Align = DL.getABITypeAlignment(PtrTy->getElementType());

-      StrideAccesses[&I] = StrideDescriptor(Stride, Scev, Size, Align);
+      AccessStrideInfo[&I] = StrideDescriptor(Stride, Scev, Size, Align);
     }
 }

@@ -5004,11 +5004,11 @@
     const ValueToValueMap &Strides) {
   DEBUG(dbgs() << "LV: Analyzing interleaved accesses...\n");

-  // Holds all the stride accesses.
-  MapVector<Instruction *, StrideDescriptor> StrideAccesses;
-  collectConstStridedAccesses(StrideAccesses, Strides);
-
-  if (StrideAccesses.empty())
+  // Holds all accesses with a constant stride.
+  MapVector<Instruction *, StrideDescriptor> AccessStrideInfo;
+  collectConstStrideAccesses(AccessStrideInfo, Strides);
+
+  if (AccessStrideInfo.empty())
     return;

   // Collect the dependences in the loop.
@@ -5024,8 +5024,8 @@
   //   1. A and B have the same stride.
   //   2. A and B have the same memory object size.
   //   3. B belongs to the group according to the distance.
-  for (auto AI = StrideAccesses.rbegin(), E = StrideAccesses.rend(); AI != E;
-       ++AI) {
+  for (auto AI = AccessStrideInfo.rbegin(), E = AccessStrideInfo.rend();
+       AI != E; ++AI) {
     Instruction *A = AI->first;
     StrideDescriptor DesA = AI->second;


Reflect function & parent classes

Reflect function & parent classes

--- include/asmith/reflection/reflection_class.hpp
+++ include/asmith/reflection/reflection_class.hpp
@@ -44,9 +44,14 @@
 		virtual const reflection_class& get_parent_class(size_t) const = 0;
 	};

+	template<class T>
+	const reflection_class& reflect() {
+		return T::REFLECTION;
+	}
+
 	class auto_reflection_class : public reflection_class {
 	private:
-		std::vector<std::shared_ptr<reflection_class>> mParents;
+		std::vector<const reflection_class*> mParents;
 		std::vector<std::shared_ptr<reflection_constructor>> mConstructors;
 		std::vector<std::shared_ptr<reflection_variable>> mVariables;
 		std::vector<std::shared_ptr<reflection_function>> mFunctions;
@@ -59,7 +64,13 @@
 			mSize(aSize)
 		{}

-		//! \todo Add parent_classes, constructors, variables and destructor
+		//! \todo Add constructors, variables and destructor
+
+		template<class CLASS>
+		auto_reflection_class& parent() {
+			mFunctions.push_back(&reflect<CLASS>());
+			return *this;
+		}

 		template<class CLASS, class RETURN, class... PARAMS>
 		auto_reflection_class& function(const std::string& aName, RETURN(CLASS::*aPtr)(PARAMS...), const size_t aModifiers) {


[SLP] Fix placement of debug statement (NFC)

By Ayal Zaks (ayal.zaks@intel.com)

Differential Revision: http://reviews.llvm.org/D16976

git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@260094 91177308-0d34-0410-b5e6-96231b3b80d8

--- lib/Transforms/Vectorize/SLPVectorizer.cpp
+++ lib/Transforms/Vectorize/SLPVectorizer.cpp
@@ -1741,6 +1741,13 @@
       continue;
     }

+    // Update LiveValues.
+    LiveValues.erase(PrevInst);
+    for (auto &J : PrevInst->operands()) {
+      if (isa<Instruction>(&*J) && ScalarToTreeEntry.count(&*J))
+        LiveValues.insert(cast<Instruction>(&*J));
+    }
+
     DEBUG(
       dbgs() << "SLP: #LV: " << LiveValues.size();
       for (auto *X : LiveValues)
@@ -1748,13 +1755,6 @@
       dbgs() << ", Looking at ";
       Inst->dump();
       );
-
-    // Update LiveValues.
-    LiveValues.erase(PrevInst);
-    for (auto &J : PrevInst->operands()) {
-      if (isa<Instruction>(&*J) && ScalarToTreeEntry.count(&*J))
-        LiveValues.insert(cast<Instruction>(&*J));
-    }

     // Now find the sequence of instructions between PrevInst and Inst.
     BasicBlock::reverse_iterator InstIt(Inst->getIterator()),


Fix crash discovered by the move to using stdlib for all tests.

--- include/chaiscript/dispatchkit/dispatchkit.hpp
+++ include/chaiscript/dispatchkit/dispatchkit.hpp
@@ -153,6 +153,11 @@
           apply_single(m_conversions.begin(), m_conversions.end(), t_engine);
           apply_globals(m_globals.begin(), m_globals.end(), t_engine);
         }
+
+      ~Module()
+      {
+        detail::Dynamic_Conversions::get().cleanup(m_conversions.begin(), m_conversions.end());
+      }

     private:
       std::vector<std::pair<Type_Info, std::string> > m_typeinfos;


main_menu: added menu getters

main_menu: added menu getters

--- include/rectojump/game/main_menu/main_menu.hpp
+++ include/rectojump/game/main_menu/main_menu.hpp
@@ -123,9 +123,17 @@
 			m_on_menu_switch[m_submenumgr.get_current_state()]();
 		}

-		auto get_gamehandler()
+		auto get_gamehandler() noexcept
 		-> decltype(m_gamehandler)&
 		{return m_gamehandler;}
+
+		auto get_menu_start() noexcept
+		-> decltype(m_start)&
+		{return m_start;}
+
+		auto get_menu_levels() noexcept
+		-> decltype(m_levels)&
+		{return m_levels;}

 		const sf::Font& get_font() const noexcept
 		{return m_font;}


fix shadowing warnings by enlarging scope

(Even better would be *smaller* scopes, but that would mean more restructuring.)

--- include/vigra/singular_value_decomposition.hxx
+++ include/vigra/singular_value_decomposition.hxx
@@ -316,7 +316,7 @@
     Real eps = NumericTraits<Real>::epsilon()*2.0;
     while (p > 0)
     {
-        MultiArrayIndex k=0;
+        k=0;
         int kase=0;

         // Here is where a test for too many iterations would go.
@@ -546,7 +546,7 @@
     }
     Real tol = std::max(m,n)*s(0)*eps;
     unsigned int rank = 0;
-    for (MultiArrayIndex i = 0; i < n; ++i)
+    for (i = 0; i < n; ++i)
     {
         if (s(i) > tol)
         {


fixes issue #72

fixes issue #72

--- syncped/frame.cpp
+++ syncped/frame.cpp
@@ -963,7 +963,6 @@
         case ID_EDIT_MACRO_START_RECORD:
           event.Enable(
              editor->GetVi().GetIsActive() &&
-             editor->GetLength() > 0 &&
             !editor->GetVi().MacroIsRecording());
           break;
         case ID_EDIT_MACRO_STOP_RECORD:


enabled many_build test again

enabled many_build test again

--- tutorials/verify/verify.cpp
+++ tutorials/verify/verify.cpp
@@ -4105,12 +4105,10 @@
         groups.top()->add(new EmptyGeometryTest(to_string(sflags),isa,sflags,RTC_GEOMETRY_STATIC));
       groups.pop();

-#if 0
       push(new TestGroup("many_build",false,false,false));
       for (auto sflags : sceneFlags)
         groups.top()->add(new ManyBuildTest(to_string(sflags),isa,sflags,RTC_GEOMETRY_STATIC));
       groups.pop();
-#endif

       push(new TestGroup("build",true,true));
       for (auto sflags : sceneFlags)


#89507#sending helprequested notification

--- fpicker/source/win32/filepicker/FilePicker.cxx
+++ fpicker/source/win32/filepicker/FilePicker.cxx
@@ -2,9 +2,9 @@
  *
  *  $RCSfile: FilePicker.cxx,v $
  *
- *  $Revision: 1.3 $
- *
- *  last change: $Author: tra $ $Date: 2001-08-03 13:59:06 $
+ *  $Revision: 1.4 $
+ *
+ *  last change: $Author: tra $ $Date: 2001-08-06 07:34:48 $
  *
  *  The Contents of this file are made available subject to the terms of
  *  either of the following licenses
@@ -230,19 +230,59 @@
 }

 //-----------------------------------------------------------------------------------------
-//
+// If there are more then one listener the return value of the last one wins
 //-----------------------------------------------------------------------------------------

 OUString SAL_CALL CFilePicker::helpRequested( FilePickerEvent aEvent ) const
 {
-    /*
-    PFNCXFPLISTENER pfncFPListener = &XFilePickerListener::helpRequested;
-    aEvent.Source = Reference< XInterface > (
-        static_cast< XFilePickerNotifier* >(
-            const_cast< CFilePicker* >( this ) ) );
-    notifyAllListener( pfncFPListener, aEvent );
-    */
-    return OUString( );
+    OUString aHelpText;
+
+    if ( !rBHelper.bDisposed )
+    {
+        ::osl::ClearableMutexGuard aGuard( rBHelper.rMutex );
+
+        if ( !rBHelper.bDisposed )
+        {
+            aGuard.clear( );
+
+            ::cppu::OInterfaceContainerHelper* pICHelper =
+                rBHelper.aLC.getContainer( getCppuType( ( Reference< XFilePickerListener > * ) 0 ) );
+
+            if ( pICHelper )
+            {
+                ::cppu::OInterfaceIteratorHelper iter( *pICHelper );
+
+                while( iter.hasMoreElements( ) )
+                {
+                    try
+                    {
+                        /*
+                            if there are multiple listeners responding
+                            to this notification the next response
+                            overwrittes  the one before if it is not empty
+                        */
+
+                        OUString temp;
+
+                        Reference< XFilePickerListener > xFPListener( iter.next( ), ::com::sun::star::uno::UNO_QUERY );
+                        if ( xFPListener.is( ) )
+                        {
+                            temp = xFPListener->helpRequested( aEvent );
+                            if ( temp.getLength( ) )
+                                aHelpText = temp;
+                        }
+
+                    }
+                    catch( RuntimeException& )
+                    {
+                        OSL_ENSURE( false, "RuntimeException during event dispatching" );
+                    }
+                }
+            }
+        }
+    }
+
+    return aHelpText;
 }

 //-----------------------------------------------------------------------------------------


Jos `triangulation_type` on virheellinen, palautetaan `false`.

	modified:   cpp/common/triangulation.cpp

--- cpp/common/triangulation.cpp
+++ cpp/common/triangulation.cpp
@@ -351,6 +351,7 @@
         if (!is_triangulation_type_valid)
         {
             std::cerr << "invalid triangulation type!\n";
+            return false;
         }

         uint32_t n_faces_for_each_vertex;
@@ -742,6 +743,7 @@
                 else
                 {
                     std::cerr << "invalid triangulation type!\n";
+                    return false;
                 }
                 current_interpolated_vertex_i++;
             }


fix build on Windows: use OUString

fix build on Windows: use OUString

--- fpicker/source/win32/misc/resourceprovider.cxx
+++ fpicker/source/win32/misc/resourceprovider.cxx
@@ -122,7 +122,7 @@
         const SolarMutexGuard aGuard;

         com::sun::star::lang::Locale aLoc( Application::GetSettings().GetUILocale() );
-        m_ResMgr = new SimpleResMgr( CREATEVERSIONRESMGR_NAME( fps_office ), aLoc );
+        m_ResMgr = new SimpleResMgr( OUString( "fps_office" ), aLoc );
     }

     //-------------------------------------


Added change to fix race condition.

Added change to fix race condition.

--- cpp/config/ConfigManager.cpp
+++ cpp/config/ConfigManager.cpp
@@ -479,7 +479,14 @@
    mLock.lockShared();
    if(mConfigs->hasMember(id))
    {
-      rval = (raw ? mConfigs[id]["raw"].clone() : getMergedConfig(id, cache));
+      // Note: We must return a clone of the cached config because it could
+      // be modified after it is returned and the shared lock has been
+      // released... such a modification could cause a race condition with
+      // the reference counting in Collectable.h (until this is fixed, we
+      // must continue to return a clone here)
+      rval = raw ?
+         mConfigs[id]["raw"].clone() :
+         getMergedConfig(id, cache).clone();

       // implicit config groups do not have any raw configs, so do not
       // return any here


INTEGRATION: CWS keyconfig01 (1.19.36); FILE MERGED 2004/07/10 18:16:52 as 1.19.36.4: RESYNC: (1.19-1.22); FILE MERGED resolve merge conflict 2004/07/08 06:45:42 as 1.19.36.3: #i29863# support localized UI config, support new UI directory structure, adopt converter tool to support accelerators 2004/06/22 07:57:39 as 1.19.36.2: #i29863# second revision of shortcut configuration 2004/06/04 09:34:57 as 1.19.36.1: #i29863# new services for accelerator config

--- framework/source/register/registerservices.cxx
+++ framework/source/register/registerservices.cxx
@@ -2,9 +2,9 @@
  *
  *  $RCSfile: registerservices.cxx,v $
  *
- *  $Revision: 1.24 $
- *
- *  last change: $Author: obo $ $Date: 2004-09-09 17:09:56 $
+ *  $Revision: 1.25 $
+ *
+ *  last change: $Author: rt $ $Date: 2004-09-20 10:08:44 $
  *
  *  The Contents of this file are made available subject to the terms of
  *  either of the following licenses
@@ -209,6 +209,18 @@

 #ifndef __FRAMEWORK_UIFACTORY_MENUBARFACTORY_HXX_
 #include <uifactory/menubarfactory.hxx>
+#endif
+
+#ifndef __FRAMEWORK_ACCELERATORS_GLOBALACCELERATORCONFIGURATION_HXX_
+#include <accelerators/globalacceleratorconfiguration.hxx>
+#endif
+
+#ifndef __FRAMEWORK_ACCELERATORS_MODULEACCELERATORCONFIGURATION_HXX_
+#include <accelerators/moduleacceleratorconfiguration.hxx>
+#endif
+
+#ifndef __FRAMEWORK_ACCELERATORS_DOCUMENTACCELERATORCONFIGURATION_HXX_
+#include <accelerators/documentacceleratorconfiguration.hxx>
 #endif

 #ifndef __FRAMEWORK_UIFACTORY_TOOLBOXFACTORY_HXX_
@@ -275,6 +287,9 @@
                         COMPONENTINFO( ::framework::ModuleUIConfigurationManagerSupplier    )
                         COMPONENTINFO( ::framework::ModuleUIConfigurationManager            )
                         COMPONENTINFO( ::framework::MenuBarFactory                          )
+                        COMPONENTINFO( ::framework::GlobalAcceleratorConfiguration          )
+                        COMPONENTINFO( ::framework::ModuleAcceleratorConfiguration          )
+                        COMPONENTINFO( ::framework::DocumentAcceleratorConfiguration        )
                         COMPONENTINFO( ::framework::ToolBoxFactory                          )
                         COMPONENTINFO( ::framework::AddonsToolBoxFactory                    )
                         COMPONENTINFO( ::framework::WindowStateConfiguration                )
@@ -315,6 +330,9 @@
                         IFFACTORY( ::framework::ModuleUIConfigurationManagerSupplier    )   else
                         IFFACTORY( ::framework::ModuleUIConfigurationManager            )   else
                         IFFACTORY( ::framework::MenuBarFactory                          )   else
+                        IFFACTORY( ::framework::GlobalAcceleratorConfiguration          )   else
+                        IFFACTORY( ::framework::ModuleAcceleratorConfiguration          )   else
+                        IFFACTORY( ::framework::DocumentAcceleratorConfiguration        )   else
                         IFFACTORY( ::framework::ToolBoxFactory                          )   else
                         IFFACTORY( ::framework::AddonsToolBoxFactory                    )   else
                         IFFACTORY( ::framework::WindowStateConfiguration                )   else


Correction of the unit tests names

Correction of the unit tests names

--- cpp/tests/tests_SGLGraph.cpp
+++ cpp/tests/tests_SGLGraph.cpp
@@ -1,5 +1,5 @@
 /*
- *  tests_SGLGraph.cpp
+ *  tests_theGraph.cpp
  *
  *  Created on: Oct 11, 2013
  *
@@ -7,7 +7,7 @@
  */

 #include "gtest/gtest.h"
-#include "SGLGraph.h"
+#include "SGL.h"

 using namespace SGL;
 using namespace std;
@@ -18,7 +18,7 @@
 // *****************************************************************************
 class GraphTest: public ::testing::Test {
 public:
-	SGLGraph<int> graph;
+	graph<int> theGraph;

 protected:
 	void addVertices(int nbr, int p_from);
@@ -26,121 +26,121 @@

 void GraphTest::addVertices(int p_nbr, int p_from) {
 	for (int i = 0; i < p_nbr; i++) {
-		graph.addVertex(p_from);
+		theGraph.addVertex(p_from);
 		p_from++;
 	}
 }

 TEST_F(GraphTest, constructor) {
-	EXPECT_EQ((int)graph.size(), 0);
-	EXPECT_EQ((int)graph.order(), 0);
+	EXPECT_EQ((int)theGraph.size(), 0);
+	EXPECT_EQ((int)theGraph.order(), 0);
 }

 TEST_F(GraphTest, LogicOnEmptyGraph) {
-	EXPECT_THROW(graph.deleteEdge(42, 21), logic_error);
-	EXPECT_THROW(graph.deleteVertex(42), logic_error);
-	EXPECT_THROW(graph.hasEdge(42, 21), logic_error);
-	EXPECT_THROW(graph.vertexInDegree(42), logic_error);
-	EXPECT_THROW(graph.vertexOutDegree(42), logic_error);
-	EXPECT_THROW(graph.vertexNeighborhood(42), logic_error);
+	EXPECT_THROW(theGraph.deleteEdge(42, 21), logic_error);
+	EXPECT_THROW(theGraph.deleteVertex(42), logic_error);
+	EXPECT_THROW(theGraph.hasEdge(42, 21), logic_error);
+	EXPECT_THROW(theGraph.vertexInDegree(42), logic_error);
+	EXPECT_THROW(theGraph.vertexOutDegree(42), logic_error);
+	EXPECT_THROW(theGraph.vertexNeighborhood(42), logic_error);
 }

 TEST_F(GraphTest, addVertex) {
-	graph.addVertex(42);
-	EXPECT_THROW(graph.addVertex(42), logic_error);
-	graph.addVertex(21);
+	theGraph.addVertex(42);
+	EXPECT_THROW(theGraph.addVertex(42), logic_error);
+	theGraph.addVertex(21);
 }

 TEST_F(GraphTest, deleteVertex) {
-	graph.addVertex(42);
-	EXPECT_THROW(graph.deleteVertex(41), logic_error);
-	graph.deleteVertex(42);
-	EXPECT_THROW(graph.deleteVertex(42), logic_error);
+	theGraph.addVertex(42);
+	EXPECT_THROW(theGraph.deleteVertex(41), logic_error);
+	theGraph.deleteVertex(42);
+	EXPECT_THROW(theGraph.deleteVertex(42), logic_error);
 }

 TEST_F(GraphTest, hasVertex) {
-	EXPECT_FALSE(graph.hasVertex(42));
-	graph.addVertex(42);
-	EXPECT_TRUE(graph.hasVertex(42));
-	graph.deleteVertex(42);
-	EXPECT_FALSE(graph.hasVertex(42));
+	EXPECT_FALSE(theGraph.hasVertex(42));
+	theGraph.addVertex(42);
+	EXPECT_TRUE(theGraph.hasVertex(42));
+	theGraph.deleteVertex(42);
+	EXPECT_FALSE(theGraph.hasVertex(42));
 	addVertices(2, 42);
-	EXPECT_TRUE(graph.hasVertex(42));
-	EXPECT_TRUE(graph.hasVertex(43));
+	EXPECT_TRUE(theGraph.hasVertex(42));
+	EXPECT_TRUE(theGraph.hasVertex(43));
 }

 TEST_F(GraphTest, vertexInDegree) {
-	graph.addVertex(42);
-	EXPECT_EQ((int)graph.vertexInDegree(42), 0);
-	graph.addVertex(21);
-	graph.addEdge(21, 42);
-	EXPECT_EQ((int)graph.vertexInDegree(42), 1);
-	graph.addVertex(84);
-	graph.addEdge(84, 42);
-	EXPECT_EQ((int)graph.vertexInDegree(42), 2);
-	graph.deleteVertex(84);
-	EXPECT_EQ((int)graph.vertexInDegree(42), 1);
-	graph.deleteVertex(21);
-	EXPECT_EQ((int)graph.vertexInDegree(42), 0);
-	graph.deleteVertex(42);
-	EXPECT_THROW(graph.vertexInDegree(42), logic_error);
+	theGraph.addVertex(42);
+	EXPECT_EQ((int)theGraph.vertexInDegree(42), 0);
+	theGraph.addVertex(21);
+	theGraph.addEdge(21, 42);
+	EXPECT_EQ((int)theGraph.vertexInDegree(42), 1);
+	theGraph.addVertex(84);
+	theGraph.addEdge(84, 42);
+	EXPECT_EQ((int)theGraph.vertexInDegree(42), 2);
+	theGraph.deleteVertex(84);
+	EXPECT_EQ((int)theGraph.vertexInDegree(42), 1);
+	theGraph.deleteVertex(21);
+	EXPECT_EQ((int)theGraph.vertexInDegree(42), 0);
+	theGraph.deleteVertex(42);
+	EXPECT_THROW(theGraph.vertexInDegree(42), logic_error);
 }

 TEST_F(GraphTest, vertexOutDegree) {
-	graph.addVertex(42);
-	EXPECT_EQ((int)graph.vertexOutDegree(42), 0);
-	graph.addVertex(21);
-	graph.addEdge(42, 21);
-	EXPECT_EQ((int)graph.vertexOutDegree(42), 1);
-	graph.addVertex(84);
-	graph.addEdge(42, 84);
-	EXPECT_EQ((int)graph.vertexOutDegree(42), 2);
-	graph.deleteVertex(84);
-	EXPECT_EQ((int)graph.vertexOutDegree(42), 1);
-	graph.deleteVertex(21);
-	EXPECT_EQ((int)graph.vertexOutDegree(42), 0);
-	graph.deleteVertex(42);
-	EXPECT_THROW(graph.vertexOutDegree(42), logic_error);
+	theGraph.addVertex(42);
+	EXPECT_EQ((int)theGraph.vertexOutDegree(42), 0);
+	theGraph.addVertex(21);
+	theGraph.addEdge(42, 21);
+	EXPECT_EQ((int)theGraph.vertexOutDegree(42), 1);
+	theGraph.addVertex(84);
+	theGraph.addEdge(42, 84);
+	EXPECT_EQ((int)theGraph.vertexOutDegree(42), 2);
+	theGraph.deleteVertex(84);
+	EXPECT_EQ((int)theGraph.vertexOutDegree(42), 1);
+	theGraph.deleteVertex(21);
+	EXPECT_EQ((int)theGraph.vertexOutDegree(42), 0);
+	theGraph.deleteVertex(42);
+	EXPECT_THROW(theGraph.vertexOutDegree(42), logic_error);
 }

 TEST_F(GraphTest, vertexIsSource) {
-	EXPECT_THROW(graph.vertexIsSource(42), logic_error);
-	graph.addVertex(42);
-	EXPECT_TRUE(graph.vertexIsSource(42));
-	graph.addVertex(21);
-	graph.addEdge(21, 42);
-	EXPECT_FALSE(graph.vertexIsSource(42));
-	graph.deleteVertex(21);
-	EXPECT_TRUE(graph.vertexIsSource(42));
-	graph.addVertex(21);
-	graph.addEdge(42, 21);
-	EXPECT_TRUE(graph.vertexIsSource(42));
+	EXPECT_THROW(theGraph.vertexIsSource(42), logic_error);
+	theGraph.addVertex(42);
+	EXPECT_TRUE(theGraph.vertexIsSource(42));
+	theGraph.addVertex(21);
+	theGraph.addEdge(21, 42);
+	EXPECT_FALSE(theGraph.vertexIsSource(42));
+	theGraph.deleteVertex(21);
+	EXPECT_TRUE(theGraph.vertexIsSource(42));
+	theGraph.addVertex(21);
+	theGraph.addEdge(42, 21);
+	EXPECT_TRUE(theGraph.vertexIsSource(42));
 }

 TEST_F(GraphTest, vertexIsSink) {
-	EXPECT_THROW(graph.vertexIsSink(42), logic_error);
-	graph.addVertex(42);
-	EXPECT_TRUE(graph.vertexIsSink(42));
-	graph.addVertex(21);
-	graph.addEdge(21, 42);
-	EXPECT_TRUE(graph.vertexIsSink(42));
-	graph.deleteVertex(21);
-	EXPECT_TRUE(graph.vertexIsSink(42));
-	graph.addVertex(21);
-	graph.addEdge(42, 21);
-	EXPECT_FALSE(graph.vertexIsSink(42));
+	EXPECT_THROW(theGraph.vertexIsSink(42), logic_error);
+	theGraph.addVertex(42);
+	EXPECT_TRUE(theGraph.vertexIsSink(42));
+	theGraph.addVertex(21);
+	theGraph.addEdge(21, 42);
+	EXPECT_TRUE(theGraph.vertexIsSink(42));
+	theGraph.deleteVertex(21);
+	EXPECT_TRUE(theGraph.vertexIsSink(42));
+	theGraph.addVertex(21);
+	theGraph.addEdge(42, 21);
+	EXPECT_FALSE(theGraph.vertexIsSink(42));
 }

 TEST_F(GraphTest, vertexNeighborhood) {
 	addVertices(6, 42);
 	// Two edges coming to 42
-	graph.addEdge(43, 42);
-	graph.addEdge(44, 42);
+	theGraph.addEdge(43, 42);
+	theGraph.addEdge(44, 42);
 	// Two edges coming from 42
-	graph.addEdge(42, 44);
-	graph.addEdge(42, 45);
-
-	vector<int> neighbors = graph.vertexNeighborhood(42);
+	theGraph.addEdge(42, 44);
+	theGraph.addEdge(42, 45);
+
+	vector<int> neighbors = theGraph.vertexNeighborhood(42);
 	vector<int>::const_iterator found;

 	// Neighborhood of 42 should be 3 vertices
@@ -155,7 +155,7 @@
 	EXPECT_EQ(found, neighbors.end());

 	// Let's test the "closed" parameter (should include the vertex itself in the vector)
-	neighbors = graph.vertexNeighborhood(42, true);
+	neighbors = theGraph.vertexNeighborhood(42, true);
 	EXPECT_EQ((int)neighbors.size(), 4);
 	for (int i = 42; i < 46; i++) {
 		// each of the concerned vertices should be in the vector
@@ -163,7 +163,7 @@
 		EXPECT_NE(found, neighbors.end());
 	}
 	// Vertices which aren't in 42's neighborhood shouldn't be in the vector
-	graph.addEdge(46, 43);
+	theGraph.addEdge(46, 43);
 	found = std::find(neighbors.begin(), neighbors.end(), 46);
 	EXPECT_EQ(found, neighbors.end());
 	found = std::find(neighbors.begin(), neighbors.end(), 47);
@@ -171,10 +171,10 @@
 }

 TEST_F(GraphTest, vertices) {
-	vector<int> vertices = graph.vertices();
+	vector<int> vertices = theGraph.vertices();
 	EXPECT_EQ((int)vertices.size(), 0);
 	addVertices(6, 42);
-	vertices = graph.vertices();
+	vertices = theGraph.vertices();

 	vector<int>::const_iterator found;

@@ -187,98 +187,98 @@
 }

 TEST_F(GraphTest, addEdge) {
-	EXPECT_THROW(graph.addEdge(41, 42), logic_error);
+	EXPECT_THROW(theGraph.addEdge(41, 42), logic_error);
 	addVertices(2, 42);
-	graph.addEdge(42, 43);
-	graph.addEdge(43, 42);
-	EXPECT_THROW(graph.addEdge(42, 41), logic_error);
-	EXPECT_THROW(graph.addEdge(41, 43), logic_error);
+	theGraph.addEdge(42, 43);
+	theGraph.addEdge(43, 42);
+	EXPECT_THROW(theGraph.addEdge(42, 41), logic_error);
+	EXPECT_THROW(theGraph.addEdge(41, 43), logic_error);
 }

 TEST_F(GraphTest, deleteEdge) {
-	EXPECT_THROW(graph.deleteEdge(42, 41), logic_error);
+	EXPECT_THROW(theGraph.deleteEdge(42, 41), logic_error);
 	addVertices(2, 42);
-	EXPECT_THROW(graph.deleteEdge(42, 41), logic_error);
-	EXPECT_THROW(graph.deleteEdge(41, 43), logic_error);
-	graph.addEdge(42, 43);
-	EXPECT_THROW(graph.deleteEdge(43, 42), logic_error);
-	graph.addEdge(43, 42);
-	graph.deleteEdge(42, 43);
-	graph.deleteEdge(43, 42);
-	EXPECT_THROW(graph.deleteEdge(42, 43), logic_error);
-	EXPECT_THROW(graph.deleteEdge(43, 42), logic_error);
+	EXPECT_THROW(theGraph.deleteEdge(42, 41), logic_error);
+	EXPECT_THROW(theGraph.deleteEdge(41, 43), logic_error);
+	theGraph.addEdge(42, 43);
+	EXPECT_THROW(theGraph.deleteEdge(43, 42), logic_error);
+	theGraph.addEdge(43, 42);
+	theGraph.deleteEdge(42, 43);
+	theGraph.deleteEdge(43, 42);
+	EXPECT_THROW(theGraph.deleteEdge(42, 43), logic_error);
+	EXPECT_THROW(theGraph.deleteEdge(43, 42), logic_error);
 }

 TEST_F(GraphTest, hasEdge) {
-	EXPECT_THROW(graph.addEdge(41, 42), logic_error);
+	EXPECT_THROW(theGraph.addEdge(41, 42), logic_error);
 	addVertices(2, 42);
-	EXPECT_FALSE(graph.hasEdge(42, 43));
-	graph.addEdge(42, 43);
-	EXPECT_FALSE(graph.hasEdge(43, 42));
-	EXPECT_TRUE(graph.hasEdge(42, 43));
-	graph.addEdge(43, 42);
-	EXPECT_TRUE(graph.hasEdge(43, 42));
-	EXPECT_TRUE(graph.hasEdge(42, 43));
-	graph.deleteEdge(42, 43);
-	EXPECT_TRUE(graph.hasEdge(43, 42));
-	EXPECT_FALSE(graph.hasEdge(42, 43));
-	graph.deleteEdge(43, 42);
-	EXPECT_FALSE(graph.hasEdge(43, 42));
-	EXPECT_FALSE(graph.hasEdge(42, 43));
+	EXPECT_FALSE(theGraph.hasEdge(42, 43));
+	theGraph.addEdge(42, 43);
+	EXPECT_FALSE(theGraph.hasEdge(43, 42));
+	EXPECT_TRUE(theGraph.hasEdge(42, 43));
+	theGraph.addEdge(43, 42);
+	EXPECT_TRUE(theGraph.hasEdge(43, 42));
+	EXPECT_TRUE(theGraph.hasEdge(42, 43));
+	theGraph.deleteEdge(42, 43);
+	EXPECT_TRUE(theGraph.hasEdge(43, 42));
+	EXPECT_FALSE(theGraph.hasEdge(42, 43));
+	theGraph.deleteEdge(43, 42);
+	EXPECT_FALSE(theGraph.hasEdge(43, 42));
+	EXPECT_FALSE(theGraph.hasEdge(42, 43));
 }

 TEST_F(GraphTest, display) {
-	cout << graph;
-	addVertices(6, 42);
-	cout << graph;
-	graph.addEdge(42, 43);
-	graph.addEdge(42, 45);
-	graph.addEdge(43, 46);
-	graph.addEdge(43, 42);
-	graph.addEdge(46, 45);
-	graph.addEdge(46, 42);
-	graph.addEdge(47, 42);
-	graph.addEdge(47, 43);
-	graph.addEdge(47, 44);
-	graph.addEdge(47, 45);
-	graph.addEdge(47, 46);
-	graph.addEdge(47, 47);
-	cout << graph;
+	cout << theGraph;
+	addVertices(6, 42);
+	cout << theGraph;
+	theGraph.addEdge(42, 43);
+	theGraph.addEdge(42, 45);
+	theGraph.addEdge(43, 46);
+	theGraph.addEdge(43, 42);
+	theGraph.addEdge(46, 45);
+	theGraph.addEdge(46, 42);
+	theGraph.addEdge(47, 42);
+	theGraph.addEdge(47, 43);
+	theGraph.addEdge(47, 44);
+	theGraph.addEdge(47, 45);
+	theGraph.addEdge(47, 46);
+	theGraph.addEdge(47, 47);
+	cout << theGraph;
 }

 TEST_F(GraphTest, areEqual) {
-	SGLGraph<int>	copy(graph);
-
-	EXPECT_TRUE(copy == graph);
-	graph.addVertex(42);
-	graph.addVertex(43);
-	EXPECT_FALSE(copy == graph);
+	graph<int>	copy(theGraph);
+
+	EXPECT_TRUE(copy == theGraph);
+	theGraph.addVertex(42);
+	theGraph.addVertex(43);
+	EXPECT_FALSE(copy == theGraph);
 	copy.addVertex(42);
 	copy.addVertex(43);
-	EXPECT_TRUE(copy == graph);
-	graph.addEdge(42, 43);
-	graph.addEdge(43, 42);
-	EXPECT_FALSE(copy == graph);
+	EXPECT_TRUE(copy == theGraph);
+	theGraph.addEdge(42, 43);
+	theGraph.addEdge(43, 42);
+	EXPECT_FALSE(copy == theGraph);
 	copy.addEdge(42, 43);
-	EXPECT_FALSE(copy == graph);
+	EXPECT_FALSE(copy == theGraph);
 	copy.addEdge(43, 42);
-	EXPECT_TRUE(copy == graph);
+	EXPECT_TRUE(copy == theGraph);
 }

 TEST_F(GraphTest, CopyConstructor) {
-	SGLGraph<int>	copy(graph);
+	graph<int>	copy(theGraph);

 	EXPECT_EQ((int)copy.size(), 0);
 	EXPECT_EQ((int)copy.order(), 0);

 	addVertices(6, 42);
-	EXPECT_EQ((int)graph.order(), 6);
-
-	SGLGraph<int>	copy2(graph);
+	EXPECT_EQ((int)theGraph.order(), 6);
+
+	graph<int>	copy2(theGraph);
 	vector<int> vertices = copy2.vertices();
 	vector<int>::const_iterator found;

-	EXPECT_EQ(graph.order(), copy2.order());
+	EXPECT_EQ(theGraph.order(), copy2.order());
 	for (int i = 42; i < 48; i++) {
 		// each of the concerned vertices should be in the vector
 		found = std::find(vertices.begin(), vertices.end(), i);
@@ -288,34 +288,34 @@

 TEST_F(GraphTest, AssignmentOperator) {
 	// from empty graph to empty graph
-	SGLGraph<int>	copy;
-
-	EXPECT_EQ((int)graph.size(), 0);
-	EXPECT_EQ((int)graph.order(), 0);
-	copy = graph;
+	graph<int>	copy;
+
+	EXPECT_EQ((int)theGraph.size(), 0);
+	EXPECT_EQ((int)theGraph.order(), 0);
+	copy = theGraph;
 	EXPECT_EQ((int)copy.size(), 0);
 	EXPECT_EQ((int)copy.order(), 0);

 	// from full graph to empty graph
 	addVertices(6, 42);
-	graph.addEdge(42, 43);
-	graph.addEdge(42, 45);
-	graph.addEdge(43, 46);
-
-	copy = graph;
-	EXPECT_TRUE(copy == graph);
+	theGraph.addEdge(42, 43);
+	theGraph.addEdge(42, 45);
+	theGraph.addEdge(43, 46);
+
+	copy = theGraph;
+	EXPECT_TRUE(copy == theGraph);

 	// from empty graph to full graph
-	SGLGraph<int>	copy2;
+	graph<int>	copy2;

 	copy = copy2;
 	EXPECT_TRUE(copy == copy2);

 	// from full graph to full graph
-	copy = graph;
+	copy = theGraph;
 	addVertices(2, 1);
-	graph.addEdge(46, 45);
-	graph.addEdge(46, 42);
-	copy = graph;
-	EXPECT_TRUE(copy == graph);
-}
+	theGraph.addEdge(46, 45);
+	theGraph.addEdge(46, 42);
+	copy = theGraph;
+	EXPECT_TRUE(copy == theGraph);
+}


disable removal of %flags and %CF (they overlap); simplify condition for \!cond1 && cond2; insert casts if DFA_TA

--- db/proc.cpp
+++ db/proc.cpp
@@ -1351,9 +1351,10 @@

 		// this is just to make it readable, do NOT rely on these statements being removed
 		removeSpAssignsIfPossible();
-		removeMatchingAssignsIfPossible(new Terminal(opFlags));
+		// The problem with removing %flags and %CF is that %CF is a subset of %flags
+		//removeMatchingAssignsIfPossible(new Terminal(opFlags));
+		//removeMatchingAssignsIfPossible(new Terminal(opCF));
 		removeMatchingAssignsIfPossible(new Unary(opTemp, new Terminal(opWildStrConst)));
-		removeMatchingAssignsIfPossible(new Terminal(opCF));
 		removeMatchingAssignsIfPossible(new Terminal(opPC));

 		processTypes();
@@ -1800,7 +1801,10 @@
 						branch->setFallBB(fallto->getFallBB());
 						branch->setTakenBB(fallto->getTakenBB());
 						branch->setDest(fallto->getFixedDest());
-						branch->setCondExpr(new Binary(opAnd, new Unary(opNot, branch->getCondExpr()), fallto->getCondExpr()->clone()));
+						Exp* cond = new Binary(opAnd,
+							new Unary(opNot, branch->getCondExpr()),
+							fallto->getCondExpr()->clone());
+						branch->setCondExpr(cond->simplify());
 						assert(fallto->getBB()->getNumInEdges() == 0);
 						fallto->getBB()->deleteEdge(fallto->getBB()->getOutEdge(0));
 						fallto->getBB()->deleteEdge(fallto->getBB()->getOutEdge(0));
@@ -1817,7 +1821,9 @@
 					// B:
 					if (fallto->getTakenBB() == branch->getTakenBB() && fallto->getBB()->getNumInEdges() == 1) {
 						branch->setFallBB(fallto->getFallBB());
-						branch->setCondExpr(new Binary(opOr, branch->getCondExpr(), fallto->getCondExpr()->clone()));
+						branch->setCondExpr(new Binary(opOr,
+							branch->getCondExpr(),
+							fallto->getCondExpr()->clone()));
 						assert(fallto->getBB()->getNumInEdges() == 0);
 						fallto->getBB()->deleteEdge(fallto->getBB()->getOutEdge(0));
 						fallto->getBB()->deleteEdge(fallto->getBB()->getOutEdge(0));
@@ -2042,6 +2048,8 @@
 	std::ostringstream str;
 	str << "before removing matching assigns (" << e << ").";
 	Boomerang::get()->alert_decompile_debug_point(this, str.str().c_str());
+	if (VERBOSE)
+		LOG << str.str().c_str() << "\n";

 	for (StatementList::iterator it = stmts.begin(); it != stmts.end(); it++)
 		if ((*it)->isAssign()) {
@@ -2057,6 +2065,8 @@
 	str.str("");
 	str << "after removing matching assigns (" << e << ").";
 	Boomerang::get()->alert_decompile_debug_point(this, str.str().c_str());
+		LOG << str.str().c_str() << "\n";
+
 }

 void UserProc::updateReturnTypes()
@@ -3589,13 +3599,18 @@

 	StatementList stmts;
 	getStatements(stmts);
+	StatementList::iterator it;
 	igraph ig;

-	// Map registers to initial local variables
-	StatementList::iterator it;
-	for (it = stmts.begin(); it != stmts.end(); it++) {
-		(*it)->mapRegistersToLocals();
-	}
+	if (DFA_TYPE_ANALYSIS) {
+		for (it = stmts.begin(); it != stmts.end(); it++) {
+			// Map registers to initial local variables
+			(*it)->mapRegistersToLocals();
+			// Insert casts where needed, as types are about to become inaccessible
+			(*it)->insertCasts();
+		}
+	}
+

 	// First split the live ranges where needed, i.e. when the type of a subscripted variable is different to
 	// its previous type. Start at the top, because we don't want to rename parameters (e.g. argc)
@@ -5295,10 +5310,8 @@
 			first = false;
 			dfaTypeAnalysis();

-			// Now a special pass to insert casts where needed. I think that these are mainly needed where an operator
-			// implies a signedness, e.g. <u or >>. Example: test/sparc/minmax2 local0 would like to be declared as
-			// unsigned, but then local0 >> 31 doesn't get a cast to int on the lhs without this pass.
-			insertCasts();
+			// There used to be a pass here to insert casts. This is best left until global type analysis is complete,
+			// so do it just before translating from SSA form (which is the where type information becomes inaccessible)

 		} while (ellipsisProcessing());
 		if (VERBOSE || DEBUG_TA)
@@ -5569,19 +5582,6 @@
 	provenTrue[lhs] = rhs;
 }

-// Insert casts as needed. At present, these are limited to operators such as <u or >> which imply unsigned and signed
-// operators respectively. If needed, the ExpCastInserter inserts TypedExps which the back end emits as casts.
-void UserProc::insertCasts() {
-	StatementList stmts;
-	getStatements(stmts);
-	StatementList::iterator it;
-	ExpCastInserter eci;
-	StmtCastInserter sci(&eci);
-	for (it = stmts.begin(); it != stmts.end(); it++) {
-		Statement* s = *it;
-		s->accept(&sci);
-	}
-}

 #ifdef USING_MEMOS
 class LibProcMemo : public Memo {


lib/core/object/object: doc corrections.

--- lib/core/src/quanta/core/object/object.cpp
+++ lib/core/src/quanta/core/object/object.cpp
@@ -223,26 +223,26 @@
 	return object::find_impl(obj.tags, StringRef{}, name_hash);
 }

-/// Find tag by name.
+/// Find child by name.
 Object* object::find_child(Object& obj, StringRef const& name) {
 	ObjectNameHash const name_hash = object::hash_name(name);
 	return const_cast<Object*>(object::find_impl(obj.children, name, name_hash));
 }

-/// Find tag by name.
+/// Find child by name.
 Object const* object::find_child(Object const& obj, StringRef const& name) {
 	ObjectNameHash const name_hash = object::hash_name(name);
 	return object::find_impl(obj.children, name, name_hash);
 }

-/// Find tag by name hash.
+/// Find child by name hash.
 Object* object::find_child(Object& obj, ObjectNameHash const name_hash) {
 	return const_cast<Object*>(
 		object::find_impl(obj.children, StringRef{}, name_hash)
 	);
 }

-/// Find tag by name hash.
+/// Find child by name hash.
 Object const* object::find_child(Object const& obj, ObjectNameHash const name_hash) {
 	return object::find_impl(obj.children, StringRef{}, name_hash);
 }


use getLangOpts().Modules to avoid warnings

--- core/metacling/src/TCling.cxx
+++ core/metacling/src/TCling.cxx
@@ -5949,9 +5949,8 @@
 /// Autoload a library based on a missing symbol.

 void* TCling::LazyFunctionCreatorAutoload(const std::string& mangled_name) {
-#ifdef R__USE_CXXMODULES
-   return LazyFunctionCreatorAutoloadForModule(mangled_name, fInterpreter);
-#endif
+   if (fInterpreter->getCI()->getLangOpts().Modules)
+      return LazyFunctionCreatorAutoloadForModule(mangled_name, fInterpreter);

    // First see whether the symbol is in the library that we are currently
    // loading. It will have access to the symbols of its dependent libraries,


Adds just enough of the MSX memory map for the Z80 to appear to try to do useful things.

--- Machines/MSX/MSX.cpp
+++ Machines/MSX/MSX.cpp
@@ -98,6 +98,7 @@
 				case CPU::Z80::PartialMachineCycle::Output:
 					switch(address & 0xff) {
 						case 0x98:	case 0x99:
+							printf("VDP %d %02x\n", address&1, *cycle.value);
 							vdp_->set_register(address, *cycle.value);
 						break;

@@ -113,6 +114,7 @@

 						case 0xa8:	case 0xa9:
 						case 0xaa:	case 0xab:
+							printf("8255 %d %02x\n", address&3, *cycle.value);
 							i8255_.set_register(address, *cycle.value);
 						break;
 					}
@@ -131,7 +133,8 @@
 			auto roms = roms_with_names(
 				"MSX",
 				{
-					"basic.rom",	"main_msx1.rom"
+					"basic.rom",
+					"main_msx1.rom"
 				});

 			if(!roms[0] || !roms[1]) return false;
@@ -141,6 +144,15 @@

 			main_ = std::move(*roms[1]);
 			main_.resize(16384);
+
+			for(size_t c = 0; c < 4; ++c) {
+				write_pointers_[c] = &ram_[c * 16384];
+				read_pointers_[c] = &ram_[c * 16384];
+			}
+			read_pointers_[0] = main_.data();
+			write_pointers_[0] = scratch_;
+			read_pointers_[1] = basic_.data();
+			write_pointers_[1] = scratch_;

 			return true;
 		}
@@ -157,6 +169,7 @@
 		uint8_t *read_pointers_[4];
 		uint8_t *write_pointers_[4];
 		uint8_t ram_[65536];
+		uint8_t scratch_[16384];
 		std::vector<uint8_t> basic_, main_;
 };


перешел на новые OfficeUtils

перешел на новые OfficeUtils

git-svn-id: bd6e61130530ab01186c33a20f55445ba6f1e843@64213 954022d7-b5bf-4e40-9824-e11837661b57

--- DesktopEditor/raster/Metafile/StarView/SvmFile.cpp
+++ DesktopEditor/raster/Metafile/StarView/SvmFile.cpp
@@ -6,7 +6,7 @@
 #include "../Common/MetaFileTypes.h"
 #include "../Common/MetaFileRenderer.h"

-#include "../../../../ASCOfficeUtils/ASCOfficeUtilsLib/OfficeUtils.h"
+#include "../../../../OfficeUtils/src/OfficeUtils.h"
 #ifdef _DEBUG
 	#include <iostream>
 #endif


Log and abort on io service start-up failure

--- src/InitialConnection.cpp
+++ src/InitialConnection.cpp
@@ -22,6 +22,7 @@
 #include "Logger.hpp"
 #include "netinterface/NetInterface.hpp"

+#include <cstdlib>
 #include <memory>
 #include <thread>

@@ -35,19 +36,25 @@
 auto InitialConnection::getNewPlayers() -> NewPlayerVector & { return newPlayers; }

 void InitialConnection::run_service() {
-    using boost::asio::ip::tcp;
+    try {
+        using boost::asio::ip::tcp;

-    int port = Config::instance().port;
+        int port = Config::instance().port;

-    auto endpoint = tcp::endpoint(tcp::v4(), port);
-    acceptor = std::make_unique<tcp::acceptor>(io_service, endpoint);
-    auto newConnection = std::make_shared<NetInterface>(io_service);
-    using std::placeholders::_1;
-    acceptor->async_accept(newConnection->getSocket(), [shared_this = shared_from_this(), newConnection](auto &&PH1) {
-        shared_this->accept_connection(newConnection, PH1);
-    });
-    Logger::info(LogFacility::Other) << "Starting the IO Service!" << Log::end;
-    io_service.run();
+        auto endpoint = tcp::endpoint(tcp::v4(), port);
+        acceptor = std::make_unique<tcp::acceptor>(io_service, endpoint);
+        auto newConnection = std::make_shared<NetInterface>(io_service);
+        using std::placeholders::_1;
+        acceptor->async_accept(newConnection->getSocket(),
+                               [shared_this = shared_from_this(), newConnection](auto &&PH1) {
+                                   shared_this->accept_connection(newConnection, PH1);
+                               });
+        Logger::info(LogFacility::Other) << "Starting the io service." << Log::end;
+        io_service.run();
+    } catch (const boost::system::system_error &e) {
+        Logger::critical(LogFacility::Other) << "Failed to start io service: " << e.what() << Log::end;
+        std::abort();
+    }
 }

 void InitialConnection::accept_connection(const std::shared_ptr<NetInterface> &connection,


Parameter name is variables not events

Parameter name is variables not events

--- src/JDKSAvdeccMCU_Aps.cpp
+++ src/JDKSAvdeccMCU_Aps.cpp
@@ -35,10 +35,10 @@
 namespace JDKSAvdeccMCU
 {

-ApsStateMachine::ApsStateMachine( ApsStateMachine::StateVariables *events,
+ApsStateMachine::ApsStateMachine( ApsStateMachine::StateVariables *variables,
                                   ApsStateMachine::StateActions *actions,
                                   ApsStateMachine::States *states )
-    : m_variables( events ), m_actions( actions ), m_states( states )
+    : m_variables( variables ), m_actions( actions ), m_states( states )
 {
     m_variables->setOwner( this );
     m_actions->setOwner( this );


Shorten the date.

Shorten the date.

--- src/Launcher/Launcher.cpp
+++ src/Launcher/Launcher.cpp
@@ -12,6 +12,7 @@
 #endif

 #include "Tools/date.h"
+#include "Tools/general_utils.h"
 #include "Tools/Factory/Factory_modem.hpp"
 #include "Tools/Display/bash_tools.h"

@@ -525,7 +526,8 @@
 	std::stringstream date;
 	date << system_clock::now();

-	p.push_back(std::make_pair("Date (UTC)", date.str()));
+	auto split_date = string_split(date.str(), '.');
+	p.push_back(std::make_pair("Date (UTC)", split_date[0]));

 	return p;
 }


BinprotSetClusterCommand must include the key

The key (if provided) is included in the length fields
in the package header, and must be added to the encoded
buffer.

Change-Id: Id43389ce16029fca3669fb4034d9fbaab5c51433
Reviewed-on: http://review.couchbase.org/c/kv_engine/+/134653
Tested-by: Build Bot <80754af91bfb6d1073585b046fe0a474ce868509@couchbase.com>
Reviewed-by: Jim Walker <1cd02e31b43620d7c664e038ca42a060d61727b9@couchbase.com>

--- protocol/connection/client_mcbp_commands.cc
+++ protocol/connection/client_mcbp_commands.cc
@@ -1643,6 +1643,7 @@
         writeHeader(buf, config.size(), sizeof(revision));
         append(buf, uint32_t(revision));
     }
+    buf.insert(buf.end(), key.begin(), key.end());
     buf.insert(buf.end(), config.begin(), config.end());
 }


Using the TRD friend track for monitoring of the TPC/TRD residuals

--- TPC/AliTPCcalibTime.cxx
+++ TPC/AliTPCcalibTime.cxx
@@ -1150,22 +1150,22 @@
       }

     }
-    TObjArray* addArray=cal->GetHistoDrift();
-    if(!addArray) return 0;
-    TIterator* iterator = addArray->MakeIterator();
-    iterator->Reset();
-    THnSparse* addHist=NULL;
-    if ((fMemoryMode>1)) while((addHist=(THnSparseF*)iterator->Next())){
-      //      if(!addHist) continue;
-      addHist->Print();
-      THnSparse* localHist=(THnSparseF*)fArrayDz->FindObject(addHist->GetName());
-      if(!localHist){
-        localHist=new THnSparseF(addHist->GetName(),"HistVdrift;time;p/T ratio;Vdrift;run",4,fBinsVdrift,fXminVdrift,fXmaxVdrift);
-        fArrayDz->AddLast(localHist);
-      }
-      localHist->Add(addHist);
-    }
-    delete iterator;
+//     TObjArray* addArray=cal->GetHistoDrift();
+//     if(!addArray) return 0;
+//     TIterator* iterator = addArray->MakeIterator();
+//     iterator->Reset();
+//     THnSparse* addHist=NULL;
+//     if ((fMemoryMode>1)) while((addHist=(THnSparseF*)iterator->Next())){
+//       //      if(!addHist) continue;
+//       addHist->Print();
+//       THnSparse* localHist=(THnSparseF*)fArrayDz->FindObject(addHist->GetName());
+//       if(!localHist){
+//         localHist=new THnSparseF(addHist->GetName(),"HistVdrift;time;p/T ratio;Vdrift;run",4,fBinsVdrift,fXminVdrift,fXmaxVdrift);
+//         fArrayDz->AddLast(localHist);
+//       }
+//       localHist->Add(addHist);
+//     }
+//     delete iterator;
     for(Int_t i=0;i<10;i++) if (cal->GetCosmiMatchingHisto(i)) fCosmiMatchingHisto[i]->Add(cal->GetCosmiMatchingHisto(i));
     //
     // Merge alignment
@@ -1664,7 +1664,7 @@
   // 3. Update kalman filter
   //
   const Int_t    kMinTPC  = 80;    // minimal number of TPC cluster
-  const Int_t    kMinTRD  = 50;    // minimal number of TRD cluster
+  const Int_t    kMinTRD  = 60;    // minimal number of TRD cluster
   const Double_t kMinZ    = 20;    // maximal dz distance
   const Double_t kMaxDy   = 5.;    // maximal dy distance
   const Double_t kMaxAngle= 0.1;  // maximal angular distance
@@ -1673,7 +1673,7 @@
   const Double_t kT0Err   = 3.;  // initial uncertainty of the T0 time
   const Double_t kVdYErr  = 0.05;  // initial uncertainty of the vd correction
   const Double_t kOutCut  = 3.0;   // outlyer cut in AliRelAlgnmentKalman
-  const Double_t kRefX    = 275;   // reference X
+  const Double_t kRefX    = 330;   // reference X
   const  Int_t     kN=50;         // deepnes of history
   static Int_t     kglast=0;
   static Double_t* kgdP[4]={new Double_t[kN], new Double_t[kN], new Double_t[kN], new Double_t[kN]};
@@ -1683,8 +1683,8 @@
   Int_t dummycl[1000];
   if (track->GetTRDclusters(dummycl)<kMinTRD) return;  // minimal amount of clusters
   if (track->GetTPCNcls()<kMinTPC) return;  // minimal amount of clusters cut
-  if (!friendTrack->GetTRDIn()) return;
-  if (!track->IsOn(AliESDtrack::kTRDrefit)) return;
+  //  if (!friendTrack->GetTRDIn()) return;
+  //  if (!track->IsOn(AliESDtrack::kTRDrefit)) return;
   if (!track->IsOn(AliESDtrack::kTRDout)) return;
   if (!track->GetInnerParam())   return;
   if (!friendTrack->GetTPCOut())   return;
@@ -1694,7 +1694,15 @@
   //
   AliExternalTrackParam &pTPC=(AliExternalTrackParam &)(*(friendTrack->GetTPCOut()));
   AliTracker::PropagateTrackToBxByBz(&pTPC,kRefX,0.1,0.1,kFALSE);
-  AliExternalTrackParam pTRD(*(friendTrack->GetTRDIn()));
+  AliExternalTrackParam *pTRDtrack = 0;
+  TObject *calibObject=0;
+  for (Int_t l=0;(calibObject=((AliESDfriendTrack*)friendTrack)->GetCalibObject(l));++l) {
+    if ((dynamic_cast< AliTPCseed*>(calibObject))) continue;
+    if ((pTRDtrack=dynamic_cast< AliExternalTrackParam*>(calibObject))) break;
+  }
+  if (!pTRDtrack) return;
+  //  AliExternalTrackParam pTRD(*(friendTrack->GetTRDIn()));
+  AliExternalTrackParam pTRD(*(pTRDtrack));
   pTRD.Rotate(pTPC.GetAlpha());
   //  pTRD.PropagateTo(pTPC.GetX(),fMagF);
   AliTracker::PropagateTrackToBxByBz(&pTRD,pTPC.GetX(),0.1,0.1,kFALSE);
@@ -2178,7 +2186,8 @@
   const AliExternalTrackParam * pTPCIn = pTrack->GetInnerParam();
   AliExternalTrackParam pTPCvertex(*(pTrack->GetInnerParam()));
   //
-  AliExternalTrackParam lits(*pTrack);
+  if (!(pTrack->GetConstrainedParam())) return;
+  AliExternalTrackParam lits(*(pTrack->GetConstrainedParam()));
   if (TMath::Abs(pTrack->GetY())>3) return;  // beam pipe
   pTPCvertex.Rotate(lits.GetAlpha());
   //pTPCvertex.PropagateTo(pTPCvertex->GetX(),fMagF);


ERR: Oops- treated bounds as min, min, min, max, max, max rather than min, max, min, max, min, max.

--- graphics/vtkRenderer.cxx
+++ graphics/vtkRenderer.cxx
@@ -723,14 +723,14 @@
   d = -(a*position[0] + b*position[1] + c*position[2]);

   diagdist =
-    sqrt( (bounds[0] - bounds[3]) * (bounds[0] - bounds[3]) +
-	  (bounds[1] - bounds[4]) * (bounds[1] - bounds[4]) +
-	  (bounds[2] - bounds[5]) * (bounds[2] - bounds[5]) );
+    sqrt( (bounds[0] - bounds[1]) * (bounds[0] - bounds[1]) +
+	  (bounds[2] - bounds[3]) * (bounds[2] - bounds[3]) +
+	  (bounds[4] - bounds[5]) * (bounds[4] - bounds[5]) );

   centerdist =
-    a*(bounds[0]+bounds[3])/2.0 +
-    b*(bounds[1]+bounds[4])/2.0 +
-    c*(bounds[2]+bounds[5])/2.0 +
+    a*(bounds[0]+bounds[1])/2.0 +
+    b*(bounds[2]+bounds[3])/2.0 +
+    c*(bounds[4]+bounds[5])/2.0 +
     d;

   range[0] = centerdist - 0.5*diagdist;


Change debug level to print information in transform function (Marian)

--- TPC/AliTPCtrackerMI.cxx
+++ TPC/AliTPCtrackerMI.cxx
@@ -1318,7 +1318,7 @@
   //
   // in debug mode  check the transformation
   //
-  if (AliTPCReconstructor::StreamLevel()>-1) {
+  if (AliTPCReconstructor::StreamLevel()>1) {
     TTreeSRedirector &cstream = *fDebugStreamer;
     cstream<<"Transform"<<
       "x0="<<x[0]<<


Correction with address

Correction with address

--- OrionUO/Managers/MapManager.cpp
+++ OrionUO/Managers/MapManager.cpp
@@ -673,7 +673,7 @@

 		if (mapAddress != 0)
 		{
-			uint address = (mapAddress + uopDataStruct.offset + uopDataStruct.length) + ((block & 4095) * 196);
+			uint address = (mapAddress + uopDataStruct.offset) + ((block & 4095) * 196) + 4;

 			if (address < endMapAddress)
 				realMapAddress = address;


Changing parameters (Marian)

Changing parameters (Marian)

--- TPC/macros/recTPC2007.C
+++ TPC/macros/recTPC2007.C
@@ -1,7 +1,11 @@
 void recTPC2007(Int_t type, const char *filename="data.root")
 {
+  //  .L $ALICE_ROOT/TPC/macros/recTPC2007.C
+
+  // recTPC2007(0,"rfio:/castor/cern.ch/alice/data/2007/12/16/11/07000013151011.20.root")
+  //recTPC2007(0,"alien:///alice/data/2007/LHC07w_TPC/000012674/raw/07000012674011.90.root")
+  //  recTPC2007(0,"/data/test2007/07000012674011/07000012674011.90.root")

-  // .x recTPC(0,"rfio:/castor/cern.ch/alice/tpc/2007/12/13/00/07000011524011.980.root")
   //
   // Set path to calibration data
   //
@@ -10,7 +14,8 @@
   //
   // Set reconstruction parameters
   ////
-  gSystem->Load("/afs/cern.ch/alice/tpctest/root/HEAD/lib/libRAliEn.so");
+  //gSystem->Load("/afs/cern.ch/alice/tpctest/root/HEAD/lib/libRAliEn.so");
+  //gSystem->Load("$ROOTSYS/lib/libXrdClient.so")
   TGrid::Connect("alien://");
   //

@@ -18,10 +23,20 @@
   AliTPCRecoParam * tpcRecoParam = 0;
   if (type==0)  tpcRecoParam = AliTPCRecoParam::GetCosmicTestParam(kTRUE);
   if (type>0)  tpcRecoParam = AliTPCRecoParam::GetLaserTestParam(kTRUE);
-  tpcRecoParam->SetTimeInterval(60,1000);
+  tpcRecoParam->SetTimeInterval(60,940);
   tpcRecoParam->Dump();
+  //
+  //
+ //  tpcRecoParam->SetMinMaxCutAbs(4.);
+//   tpcRecoParam->SetMinLeftRightCutAbs(6.);
+//   tpcRecoParam->SetMinUpDownCutAbs(7.);
+//   tpcRecoParam->SetMinMaxCutSigma(4.);
+//   tpcRecoParam->SetMinLeftRightCutSigma(6.);
+//   tpcRecoParam->SetMinUpDownCutSigma(7.);
+  //
+  //
   AliTPCReconstructor::SetRecoParam(tpcRecoParam);
-  AliTPCReconstructor::SetStreamLevel(1);
+  AliTPCReconstructor::SetStreamLevel(100);
   AliMagFMaps* field = new AliMagFMaps("Maps","Maps", 2, 1., 10., 1);
   AliTracker::SetFieldMap(field,1);
   //
@@ -37,6 +52,7 @@
   rec.SetFillESD("TPC");
   rec.SetFillTriggerESD(kFALSE);
   rec.SetRunVertexFinder(kFALSE);
+  rec.SetCleanESD(kFALSE);
   rec.Run();
 }


Update texteditor.cpp

Update texteditor.cpp

--- examples/texteditor.cpp
+++ examples/texteditor.cpp
@@ -1,16 +1,21 @@
+// 关闭Darwin UCGL的扩展功能和日志功能
 #define DARWIN_FORCE_BUILTIN
 #define DARWIN_DISABLE_LOG
-#include "../darwin/darwin.hpp"
+// 引入Darwin UCGL
+#include <darwin/darwin.hpp>
+// 其他STL
 #include <fstream>
 #include <cstdlib>
 #include <vector>
 #include <string>
+// 引入Darwin UCGL名称空间
 using namespace darwin;
-
+// 按键映射
 namespace keymap {
 	constexpr int key_esc = 27;
 	constexpr int key_enter = 10;
 	constexpr int key_delete = 127;
+	constexpr int key_tab = '\t';
 	constexpr int key_up = 'w';
 	constexpr int key_down = 's';
 	constexpr int key_left = 'a';
@@ -22,28 +27,36 @@
 	constexpr int key_find = 'f';
 	constexpr int key_info = 'v';
 } // namespace keymap
-
+// 文本编辑器类
 class texteditor final {
+// 渲染器属性
 	std::size_t render_border = 0, render_offx = 0, render_offy = 0;
+// 光标属性
 	std::size_t cursor_count = 0, cursor_x = 0, cursor_y = 0;
+// 窗口属性
 	std::size_t last_win_width = 0, last_win_height = 0;
+// 文本 Buffer
 	std::vector<std::string> file_buffer;
+// 查找高亮属性
 	std::size_t find_x = 0, find_y = 0;
+// 帧 Buffer
 	darwin::drawable *pic = nullptr;
+// 状态
 	bool text_modified = false;
 	bool insert_mode = false;
 	bool found_text = false;
 	bool expect_txt = false;
+// 字符 Buffer
 	std::string find_target;
 	std::string char_buffer;
 	std::string file_path;
-
+// 挂起任务
 	enum class await_process_type {
 		null,
 		quit,
 		reload
 	} await_process = await_process_type::null;
-
+// 编辑器状态
 	enum class editor_status_type {
 		null,
 		asking,
@@ -56,8 +69,15 @@
 	} editor_status = editor_status_type::null;

 public:
-	int tab_indent = 4;
-	void load(const std::string &path)
+// Tab 缩进宽度
+	unsigned int tab_indent = 4;
+// 构造函数 & 赋值函数
+	texteditor() = default;
+	texteditor(const texteditor&) = delete;
+	texteditor &operator(const texteditor&) = delete;
+private:
+	// 文件操作
+	void load_file(const std::string &path)
 	{
 		std::ifstream in(file_path);
 		for (std::string line; std::getline(in, line); file_buffer.push_back(line)) {
@@ -70,32 +90,6 @@
 			}
 		}
 	}
-	texteditor(const std::string &path) : file_path(path)
-	{
-		load(file_path);
-	}
-
-private:
-	std::size_t text_area_width()
-	{
-		return pic->get_width() - render_border - 5;
-	}
-	std::size_t text_area_height()
-	{
-		return pic->get_height() - 2;
-	}
-	std::size_t text_offset_x()
-	{
-		return render_offx + cursor_x;
-	}
-	std::size_t text_offset_y()
-	{
-		return render_offy + cursor_y;
-	}
-	std::string &current_line()
-	{
-		return file_buffer[text_offset_y()];
-	}
 	void save_file(const std::string &path)
 	{
 		std::ofstream out(path);
@@ -103,6 +97,36 @@
 			out << file_buffer[idx] << std::endl;
 		out << file_buffer[file_buffer.size() - 1] << std::flush;
 		text_modified = false;
+	}
+	// 各类属性
+	std::size_t text_area_width()
+	{
+		return pic->get_width() - render_border - 5;
+	}
+	std::size_t text_area_height()
+	{
+		return pic->get_height() - 2;
+	}
+	std::size_t text_offset_x()
+	{
+		return render_offx + cursor_x;
+	}
+	std::size_t text_offset_y()
+	{
+		return render_offy + cursor_y;
+	}
+	std::string &current_line()
+	{
+		return file_buffer[text_offset_y()];
+	}
+	// 工具
+	void force_refresh()
+	{
+		cursor_count = 59;
+	}
+	bool is_validate_path_char(int ch)
+	{
+		return std::isalnum(ch) || ch == ' ' || ch == '\\' || ch == '/';
 	}
 	void adjust_cursor(std::size_t x_offset)
 	{
@@ -122,6 +146,46 @@
 				;
 		}
 	}
+	// 文本查找
+	void reset_find()
+	{
+		find_x = find_y = 0;
+		found_text = false;
+		expect_txt = false;
+	}
+	void find()
+	{
+		while (find_y < file_buffer.size()) {
+			auto &line = file_buffer[find_y];
+			auto pos = line.find(find_target, expect_txt ? find_x + 1 : 0);
+			if (pos != std::string::npos) {
+				if (!expect_txt || pos > find_x) {
+					found_text = true;
+					expect_txt = true;
+					find_x = pos;
+					break;
+				}
+			}
+			expect_txt = false;
+			find_x = 0;
+			++find_y;
+		}
+		if (found_text) {
+			if (find_y == file_buffer.size()) {
+				reset_find();
+				find();
+			}
+			cursor_x = render_offx = 0;
+			cursor_y = 0;
+			if (find_y < file_buffer.size() - text_area_height())
+				render_offy = find_y > 4 ? find_y - 4 : 0;
+			else
+				render_offy = file_buffer.size() - text_area_height();
+			if (find_x + find_target.size() > text_area_width())
+				render_offx = find_x + find_target.size() - text_area_width() + 1;
+		}
+	}
+	// 键盘事件处理
 	void key_up()
 	{
 		if (cursor_y > 0)
@@ -171,6 +235,7 @@
 			++render_offy;
 		}
 	}
+	// 事件响应
 	bool window_resized()
 	{
 		if (last_win_width != pic->get_width() || last_win_height != pic->get_height()) {
@@ -258,7 +323,7 @@
 					}
 					else {
 						file_buffer.clear();
-						load(file_path);
+						load_file(file_path);
 					}
 					break;
 				case keymap::key_quit:
@@ -300,6 +365,7 @@
 		else
 			return false;
 	}
+	// 渲染函数
 	void render_linenum()
 	{
 		render_border = std::to_string(file_buffer.size()).size();
@@ -343,10 +409,7 @@
 		render_linenum();
 		render_text();
 	}
-	void force_refresh()
-	{
-		cursor_count = 59;
-	}
+	// 处理挂起任务
 	void exec_await_process()
 	{
 		switch (await_process) {
@@ -358,11 +421,12 @@
 		case await_process_type::reload:
 			text_modified = false;
 			file_buffer.clear();
-			load(file_path);
+			load_file(file_path);
 			break;
 		}
 		await_process = await_process_type::null;
 	}
+	// 运行状态实现
 	void run_normal()
 	{
 		darwin::runtime.fit_drawable();
@@ -403,10 +467,6 @@
 		}
 		darwin::runtime.update_drawable();
 	}
-	bool is_validate_path_char(int ch)
-	{
-		return std::isalnum(ch) || ch == ' ' || ch == '\\' || ch == '/';
-	}
 	void run_unsaved_confirm()
 	{
 		darwin::runtime.fit_drawable();
@@ -433,44 +493,6 @@
 			}
 		}
 		darwin::runtime.update_drawable();
-	}
-	void reset_find()
-	{
-		find_x = find_y = 0;
-		found_text = false;
-		expect_txt = false;
-	}
-	void find()
-	{
-		while (find_y < file_buffer.size()) {
-			auto &line = file_buffer[find_y];
-			auto pos = line.find(find_target, expect_txt ? find_x + 1 : 0);
-			if (pos != std::string::npos) {
-				if (!expect_txt || pos > find_x) {
-					found_text = true;
-					expect_txt = true;
-					find_x = pos;
-					break;
-				}
-			}
-			expect_txt = false;
-			find_x = 0;
-			++find_y;
-		}
-		if (found_text) {
-			if (find_y == file_buffer.size()) {
-				reset_find();
-				find();
-			}
-			cursor_x = render_offx = 0;
-			cursor_y = 0;
-			if (find_y < file_buffer.size() - text_area_height())
-				render_offy = find_y > 4 ? find_y - 4 : 0;
-			else
-				render_offy = file_buffer.size() - text_area_height();
-			if (find_x + find_target.size() > text_area_width())
-				render_offx = find_x + find_target.size() - text_area_width() + 1;
-		}
 	}
 	void run_find_setup()
 	{
@@ -596,8 +618,11 @@
 	}

 public:
-	void run()
-	{
+	// 主函数
+	void run(const std::string& path)
+	{
+		file_path = path;
+		load_file(file_path);
 		darwin::runtime.load("./darwin.module");
 		darwin::runtime.fit_drawable();
 		pic = darwin::runtime.get_drawable();
@@ -634,12 +659,12 @@
 		}
 	}
 };
-
+// 启动进程
 int main(int argc, char **argv)
 {
 	if (argc != 2)
 		return -1;
-	texteditor editor(argv[1]);
-	editor.run();
+	texteditor editor;
+	editor.run(argv[1]);
 	return 0;
 }


Removal of AliDebug in the innermost raw-data decoding loop. Removal of unneeded filling of MC labels in case of raw-data reading. The overall speed-up of the TRD local reconstruction is about 2-2.5

--- TRD/AliTRDRawStream.cxx
+++ TRD/AliTRDRawStream.cxx
@@ -851,9 +851,12 @@
 		  //
 		  //fDigits->SetData(fROW, fCOL, fTB+ctr, fSig[ctr] - fCommonAdditive);
 		  fDigits->SetData(fROW, fCOL, fTB+ctr, fSig[ctr]);
-		  fTrack0->SetData(fROW, fCOL, fTB+ctr, 0);
-		  fTrack1->SetData(fROW, fCOL, fTB+ctr, 0);
-		  fTrack2->SetData(fROW, fCOL, fTB+ctr, 0);
+		  // The MC labels have been already flushed, no need
+		  // in the following three lines
+		  //		  fTrack0->SetData(fROW, fCOL, fTB+ctr, 0);
+		  //		  fTrack1->SetData(fROW, fCOL, fTB+ctr, 0);
+		  //		  fTrack2->SetData(fROW, fCOL, fTB+ctr, 0);
+		  //
 		}
 	      }
 	    }
@@ -1358,8 +1361,9 @@
     fSig[2] = (fDataWord & 0xffc00000) >> 22;

     // Print data to screen:
-    AliDebug(5, Form("SM%d L%dS%d: ROB%d MCM=%d ADC=%d (ROW=%d COL=%d): Data %04d %04d %04d\n",
-		     fSM, fLAYER, fSTACK, fROB, fMCM, fADC, fROW, fCOL, fSig[0], fSig[1], fSig[2]));
+    // Do NOT switch on for default production, it is VERY slow
+    //    AliDebug(5, Form("SM%d L%dS%d: ROB%d MCM=%d ADC=%d (ROW=%d COL=%d): Data %04d %04d %04d\n",
+    //		     fSM, fLAYER, fSTACK, fROB, fMCM, fADC, fROW, fCOL, fSig[0], fSig[1], fSig[2]));

   }
   else {


Disable WebRtcVideoMediaChannelSimulcastTest.SimulcastSend tests on Win (take 2)

In https://webrtc-codereview.appspot.com/35669004/ the wrong
define was used (OS_WIN only exists in Chromium code).

BUG=4135
R=pbos@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/33799004

git-svn-id: a556c8bde68cedbc0208a1ffc78b06e9cd07f676@8008 4adac7df-926f-26a2-2b94-8c16560cd09d

--- media/webrtc/webrtcvideoengine_unittest.cc
+++ media/webrtc/webrtcvideoengine_unittest.cc
@@ -4246,7 +4246,7 @@
 }

 // Flaky on Windows. https://code.google.com/p/webrtc/issues/detail?id=4135
-#if defined(OS_WIN)
+#if defined(WIN32)
 #define MAYBE_SimulcastSend_1280x800 DISABLED_SimulcastSend_1280x800
 #else
 #define MAYBE_SimulcastSend_1280x800 SimulcastSend_1280x800
@@ -4260,7 +4260,7 @@
 }

 // Flaky on Windows. https://code.google.com/p/webrtc/issues/detail?id=4135
-#if defined(OS_WIN)
+#if defined(WIN32)
 #define MAYBE_SimulcastSend_1280x720 DISABLED_SimulcastSend_1280x720
 #else
 #define MAYBE_SimulcastSend_1280x720 SimulcastSend_1280x720
@@ -4274,7 +4274,7 @@
 }

 // Flaky on Windows. https://code.google.com/p/webrtc/issues/detail?id=4135
-#if defined(OS_WIN)
+#if defined(WIN32)
 #define MAYBE_SimulcastSend_960x540 DISABLED_SimulcastSend_960x540
 #else
 #define MAYBE_SimulcastSend_960x540 SimulcastSend_960x540
@@ -4288,7 +4288,7 @@
 }

 // Flaky on Windows. https://code.google.com/p/webrtc/issues/detail?id=4135
-#if defined(OS_WIN)
+#if defined(WIN32)
 #define MAYBE_SimulcastSend_960x600 DISABLED_SimulcastSend_960x600
 #else
 #define MAYBE_SimulcastSend_960x600 SimulcastSend_960x600
@@ -4302,7 +4302,7 @@
 }

 // Flaky on Windows. https://code.google.com/p/webrtc/issues/detail?id=4135
-#if defined(OS_WIN)
+#if defined(WIN32)
 #define MAYBE_SimulcastSend_640x400 DISABLED_SimulcastSend_640x400
 #else
 #define MAYBE_SimulcastSend_640x400 SimulcastSend_640x400
@@ -4315,7 +4315,7 @@
 }

 // Flaky on Windows. https://code.google.com/p/webrtc/issues/detail?id=4135
-#if defined(OS_WIN)
+#if defined(WIN32)
 #define MAYBE_SimulcastSend_640x360 DISABLED_SimulcastSend_640x360
 #else
 #define MAYBE_SimulcastSend_640x360 SimulcastSend_640x360


Attempt to remove setters/getters from doc data

--- editor/doc/doc_data.cpp
+++ editor/doc/doc_data.cpp
@@ -214,6 +214,9 @@
 	ClassDB::get_class_list(&classes);
 	classes.sort_custom<StringName::AlphCompare>();

+	Set<StringName> setters_getters;
+	bool skip_setter_getter_methods = true;
+
 	while (classes.size()) {

 		String name = classes.front()->get();
@@ -266,6 +269,13 @@
 						prop.type = Variant::get_type_name(retinfo.type);
 					}
 				}
+
+				setters_getters.insert(getter);
+			}
+
+			if (setter != StringName()) {
+
+				setters_getters.insert(setter);
 			}

 			if (!found_type) {
@@ -287,6 +297,9 @@

 			if (E->get().name == "" || (E->get().name[0] == '_' && !(E->get().flags & METHOD_FLAG_VIRTUAL)))
 				continue; //hidden, don't count
+
+			if (skip_setter_getter_methods && setters_getters.has(E->get().name) && E->get().name.find("/") == -1)
+				continue;

 			MethodDoc method;


(invoke) : Fix to set the prototype object specified by the interface ID parameter.

--- esjs/src/interface.cpp
+++ esjs/src/interface.cpp
@@ -238,6 +238,7 @@
                 throw getErrorInstance("TypeError");
             }
             *argp = Variant(iidp);
+            riid = *iidp;
             ++iidp;
             break;
         case Ent::TypeStructure: