Fix documentation

Fix documentation

--- src/algorithms/standard/vectorrealtotensor.cpp
+++ src/algorithms/standard/vectorrealtotensor.cpp
@@ -28,7 +28,7 @@
 const char* VectorRealToTensor::category = "Standard";
 const char* VectorRealToTensor::description = DOC("This algorithm generates tensors "
 "out of a stream of input frames. The 4 dimensions of the tensors stand for (batchSize, channels, patchSize, featureSize):\n"
-"  - batchSize: Number of patches per tensor. If batchSize is set to 0 it will accumulate patches until the end of the stream is reached and then produce a single tensor. "
+"  - batchSize: Number of patches per tensor. If batchSize is set to -1 it will accumulate patches until the end of the stream is reached and then produce a single tensor. "
 "Warning: This option may exhaust memory depending on the size of the stream.\n"
 "  - channels: Number of channels per tensor. Currently, only single-channel tensors are supported. Otherwise, an exception is thrown.\n"
 "  - patchSize: Number of timestamps (i.e., number of frames) per patch.\n"


Require addkey action scraper to use master key - Part II

--- src/contract/contract.cpp
+++ src/contract/contract.cpp
@@ -27,7 +27,7 @@
     if (sAction=="D" && messagetype=="beacon") strMasterPubKey = msMasterProjectPublicKey;
     if (sAction=="D" && messagetype=="poll")   strMasterPubKey = msMasterProjectPublicKey;
     if (sAction=="D" && messagetype=="vote")   strMasterPubKey = msMasterProjectPublicKey;
-    if (messagetype=="protocol")  strMasterPubKey = msMasterProjectPublicKey;
+    if (messagetype == "protocol" || messagetype == "scraper")  strMasterPubKey = msMasterProjectPublicKey;

     std::string db64 = DecodeBase64(sSig);
     CKey key;


Allow to eat values started with "-", but don't allow to eat correct arguments' names.

--- Args/value_utils.hpp
+++ Args/value_utils.hpp
@@ -58,10 +58,7 @@
 		auto last = std::find_if( context.begin(), context.end(),
 			[ & ] ( const String & v ) -> bool
 			{
-				if( details::isArgument( v ) || details::isFlag( v ) )
-					return true;
-				else
-					return( cmdLine->findArgument( v ) != nullptr );
+				return( cmdLine->findArgument( v ) != nullptr );
 			}
 		);

@@ -100,11 +97,8 @@
 	{
 		auto val = context.next();

-		if( !details::isArgument( *val ) && !details::isFlag( *val ) )
-		{
-			if( !cmdLine->findArgument( *val ) )
-				return *val;
-		}
+		if( !cmdLine->findArgument( *val ) )
+			return *val;

 		context.putBack();
 	}


More translateable strings (#1354)

More translateable strings (#1354)

--- src/ClientCommand.cpp
+++ src/ClientCommand.cpp
@@ -1654,187 +1654,244 @@
     }
 }

-static void AddCommandHelp(CTable& Table, const CString& sCmd,
-                           const CString& sArgs, const CString& sDesc,
-                           const CString& sFilter = "") {
-    if (sFilter.empty() || sCmd.StartsWith(sFilter) ||
-        sCmd.AsLower().WildCmp(sFilter.AsLower())) {
-        Table.AddRow();
-        Table.SetCell("Command", sCmd + " " + sArgs);
-        Table.SetCell("Description", sDesc);
-    }
-}
-
 void CClient::HelpUser(const CString& sFilter) {
     CTable Table;
-    Table.AddColumn("Command");
-    Table.AddColumn("Description");
+    Table.AddColumn(t_s("Command", "helpcmd"));
+    Table.AddColumn(t_s("Description", "helpcmd"));

     if (sFilter.empty()) {
         PutStatus(
-            "In the following list all occurrences of <#chan> support "
-            "wildcards (* and ?)");
-        PutStatus("(Except ListNicks)");
+            t_s("In the following list all occurrences of <#chan> support "
+                "wildcards (* and ?) except ListNicks"));
     }

-    AddCommandHelp(Table, "Version", "", "Print which version of ZNC this is",
-                   sFilter);
-
-    AddCommandHelp(Table, "ListMods", "", "List all loaded modules", sFilter);
-    AddCommandHelp(Table, "ListAvailMods", "", "List all available modules",
-                   sFilter);
+    const auto AddCommandHelp = [&](const CString& sCmd, const CString& sArgs,
+                                    const CString& sDesc) {
+        if (sFilter.empty() || sCmd.StartsWith(sFilter) ||
+            sCmd.AsLower().WildCmp(sFilter.AsLower())) {
+            Table.AddRow();
+            Table.SetCell(t_s("Command", "helpcmd"), sCmd + " " + sArgs);
+            Table.SetCell(t_s("Description", "helpcmd"), sDesc);
+        }
+    };
+
+    AddCommandHelp(
+        "Version", "",
+        t_s("Print which version of ZNC this is", "helpcmd|Version|desc"));
+
+    AddCommandHelp("ListMods", "",
+                   t_s("List all loaded modules", "helpcmd|ListMods|desc"));
+    AddCommandHelp(
+        "ListAvailMods", "",
+        t_s("List all available modules", "helpcmd|ListAvailMods|desc"));
     if (!m_pUser->IsAdmin()) {
         // If they are an admin we will add this command below with an argument
-        AddCommandHelp(Table, "ListChans", "", "List all channels", sFilter);
+        AddCommandHelp("ListChans", "",
+                       t_s("List all channels", "helpcmd|ListChans|desc"));
     }
-    AddCommandHelp(Table, "ListNicks", "<#chan>", "List all nicks on a channel",
-                   sFilter);
+    AddCommandHelp(
+        "ListNicks", t_s("<#chan>", "helpcmd|ListNicks|args"),
+        t_s("List all nicks on a channel", "helpcmd|ListNicks|desc"));
     if (!m_pUser->IsAdmin()) {
-        AddCommandHelp(Table, "ListClients", "",
-                       "List all clients connected to your ZNC user", sFilter);
+        AddCommandHelp("ListClients", "",
+                       t_s("List all clients connected to your ZNC user",
+                           "helpcmd|ListClients|desc"));
     }
-    AddCommandHelp(Table, "ListServers", "",
-                   "List all servers of current IRC network", sFilter);
-
-    AddCommandHelp(Table, "AddNetwork", "<name>", "Add a network to your user",
-                   sFilter);
-    AddCommandHelp(Table, "DelNetwork", "<name>",
-                   "Delete a network from your user", sFilter);
-    AddCommandHelp(Table, "ListNetworks", "", "List all networks", sFilter);
+    AddCommandHelp("ListServers", "",
+                   t_s("List all servers of current IRC network",
+                       "helpcmd|ListServers|desc"));
+
+    AddCommandHelp(
+        "AddNetwork", t_s("<name>", "helpcmd|AddNetwork|args"),
+        t_s("Add a network to your user", "helpcmd|AddNetwork|desc"));
+    AddCommandHelp(
+        "DelNetwork", t_s("<name>", "helpcmd|DelNetwork|args"),
+        t_s("Delete a network from your user", "helpcmd|DelNetwork|desc"));
+    AddCommandHelp("ListNetworks", "",
+                   t_s("List all networks", "helpcmd|ListNetworks|desc"));
     if (m_pUser->IsAdmin()) {
-        AddCommandHelp(Table, "MoveNetwork",
-                       "<old user> <old network> <new user> [new network]",
-                       "Move an IRC network from one user to another", sFilter);
+        AddCommandHelp("MoveNetwork",
+                       t_s("<old user> <old network> <new user> [new network]",
+                           "helpcmd|MoveNetwork|args"),
+                       t_s("Move an IRC network from one user to another",
+                           "helpcmd|MoveNetwork|desc"));
     }
-    AddCommandHelp(Table, "JumpNetwork", "<network>",
-                   "Jump to another network (Alternatively, you can connect to "
-                   "ZNC several times, using `user/network` as username)",
-                   sFilter);
-
-    AddCommandHelp(Table, "AddServer", "<host> [[+]port] [pass]",
-                   "Add a server to the list of alternate/backup servers of "
-                   "current IRC network.",
-                   sFilter);
-    AddCommandHelp(Table, "DelServer", "<host> [port] [pass]",
-                   "Remove a server from the list of alternate/backup servers "
-                   "of current IRC network",
-                   sFilter);
-
-    AddCommandHelp(Table, "AddTrustedServerFingerprint", "<fi:ng:er>",
-                   "Add a trusted server SSL certificate fingerprint (SHA-256) "
-                   "to current IRC network.",
-                   sFilter);
     AddCommandHelp(
-        Table, "DelTrustedServerFingerprint", "<fi:ng:er>",
-        "Delete a trusted server SSL certificate from current IRC network.",
-        sFilter);
+        "JumpNetwork", t_s("<network>", "helpcmd|JumpNetwork|args"),
+        t_s("Jump to another network (Alternatively, you can connect to ZNC "
+            "several times, using `user/network` as username)",
+            "helpcmd|JumpNetwork|desc"));
+
+    AddCommandHelp("AddServer",
+                   t_s("<host> [[+]port] [pass]", "helpcmd|AddServer|args"),
+                   t_s("Add a server to the list of alternate/backup servers "
+                       "of current IRC network.",
+                       "helpcmd|AddServer|desc"));
+    AddCommandHelp("DelServer",
+                   t_s("<host> [port] [pass]", "helpcmd|DelServer|args"),
+                   t_s("Remove a server from the list of alternate/backup "
+                       "servers of current IRC network",
+                       "helpcmd|DelServer|desc"));
+
     AddCommandHelp(
-        Table, "ListTrustedServerFingerprints", "",
-        "List all trusted server SSL certificates of current IRC network.",
-        sFilter);
-
-    AddCommandHelp(Table, "EnableChan", "<#chans>", "Enable channels", sFilter);
-    AddCommandHelp(Table, "DisableChan", "<#chans>", "Disable channels",
-                   sFilter);
-    AddCommandHelp(Table, "Attach", "<#chans>", "Attach to channels", sFilter);
-    AddCommandHelp(Table, "Detach", "<#chans>", "Detach from channels",
-                   sFilter);
-    AddCommandHelp(Table, "Topics", "", "Show topics in all your channels",
-                   sFilter);
-
-    AddCommandHelp(Table, "PlayBuffer", "<#chan|query>",
-                   "Play back the specified buffer", sFilter);
-    AddCommandHelp(Table, "ClearBuffer", "<#chan|query>",
-                   "Clear the specified buffer", sFilter);
-    AddCommandHelp(Table, "ClearAllBuffers", "",
-                   "Clear all channel and query buffers", sFilter);
-    AddCommandHelp(Table, "ClearAllChannelBuffers", "",
-                   "Clear the channel buffers", sFilter);
-    AddCommandHelp(Table, "ClearAllQueryBuffers", "", "Clear the query buffers",
-                   sFilter);
-    AddCommandHelp(Table, "SetBuffer", "<#chan|query> [linecount]",
-                   "Set the buffer count", sFilter);
+        "AddTrustedServerFingerprint",
+        t_s("<fi:ng:er>", "helpcmd|AddTrustedServerFingerprint|args"),
+        t_s("Add a trusted server SSL certificate fingerprint (SHA-256) to "
+            "current IRC network.",
+            "helpcmd|AddTrustedServerFingerprint|desc"));
+    AddCommandHelp(
+        "DelTrustedServerFingerprint",
+        t_s("<fi:ng:er>", "helpcmd|DelTrustedServerFingerprint|args"),
+        t_s("Delete a trusted server SSL certificate from current IRC network.",
+            "helpcmd|DelTrustedServerFingerprint|desc"));
+    AddCommandHelp(
+        "ListTrustedServerFingerprints", "",
+        t_s("List all trusted server SSL certificates of current IRC network.",
+            "helpcmd|ListTrustedServerFingerprints|desc"));
+
+    AddCommandHelp("EnableChan", t_s("<#chans>", "helpcmd|EnableChan|args"),
+                   t_s("Enable channels", "helpcmd|EnableChan|desc"));
+    AddCommandHelp("DisableChan", t_s("<#chans>", "helpcmd|DisableChan|args"),
+                   t_s("Disable channels", "helpcmd|DisableChan|desc"));
+    AddCommandHelp("Attach", t_s("<#chans>", "helpcmd|Attach|args"),
+                   t_s("Attach to channels", "helpcmd|Attach|desc"));
+    AddCommandHelp("Detach", t_s("<#chans>", "helpcmd|Detach|args"),
+                   t_s("Detach from channels", "helpcmd|Detach|desc"));
+    AddCommandHelp(
+        "Topics", "",
+        t_s("Show topics in all your channels", "helpcmd|Topics|desc"));
+
+    AddCommandHelp(
+        "PlayBuffer", t_s("<#chan|query>", "helpcmd|PlayBuffer|args"),
+        t_s("Play back the specified buffer", "helpcmd|PlayBuffer|desc"));
+    AddCommandHelp(
+        "ClearBuffer", t_s("<#chan|query>", "helpcmd|ClearBuffer|args"),
+        t_s("Clear the specified buffer", "helpcmd|ClearBuffer|desc"));
+    AddCommandHelp("ClearAllBuffers", "",
+                   t_s("Clear all channel and query buffers",
+                       "helpcmd|ClearAllBuffers|desc"));
+    AddCommandHelp("ClearAllChannelBuffers", "",
+                   t_s("Clear the channel buffers",
+                       "helpcmd|ClearAllChannelBuffers|desc"));
+    AddCommandHelp(
+        "ClearAllQueryBuffers", "",
+        t_s("Clear the query buffers", "helpcmd|ClearAllQueryBuffers|desc"));
+    AddCommandHelp("SetBuffer",
+                   t_s("<#chan|query> [linecount]", "helpcmd|SetBuffer|args"),
+                   t_s("Set the buffer count", "helpcmd|SetBuffer|desc"));

     if (m_pUser->IsAdmin() || !m_pUser->DenySetBindHost()) {
-        AddCommandHelp(Table, "SetBindHost", "<host (IP preferred)>",
-                       "Set the bind host for this connection", sFilter);
-        AddCommandHelp(Table, "SetUserBindHost", "<host (IP preferred)>",
-                       "Set the default bind host for this user", sFilter);
-        AddCommandHelp(Table, "ClearBindHost", "",
-                       "Clear the bind host for this connection", sFilter);
-        AddCommandHelp(Table, "ClearUserBindHost", "",
-                       "Clear the default bind host for this user", sFilter);
+        AddCommandHelp("SetBindHost",
+                       t_s("<host (IP preferred)>", "helpcmd|SetBindHost|args"),
+                       t_s("Set the bind host for this network",
+                           "helpcmd|SetBindHost|desc"));
+        AddCommandHelp(
+            "SetUserBindHost",
+            t_s("<host (IP preferred)>", "helpcmd|SetUserBindHost|args"),
+            t_s("Set the default bind host for this user",
+                "helpcmd|SetUserBindHost|desc"));
+        AddCommandHelp("ClearBindHost", "",
+                       t_s("Clear the bind host for this network",
+                           "helpcmd|ClearBindHost|desc"));
+        AddCommandHelp("ClearUserBindHost", "",
+                       t_s("Clear the default bind host for this user",
+                           "helpcmd|ClearUserBindHost|desc"));
     }

-    AddCommandHelp(Table, "ShowBindHost", "",
-                   "Show currently selected bind host", sFilter);
-    AddCommandHelp(Table, "Jump", "[server]",
-                   "Jump to the next or the specified server", sFilter);
-    AddCommandHelp(Table, "Disconnect", "[message]", "Disconnect from IRC",
-                   sFilter);
-    AddCommandHelp(Table, "Connect", "", "Reconnect to IRC", sFilter);
-    AddCommandHelp(Table, "Uptime", "",
-                   "Show for how long ZNC has been running", sFilter);
+    AddCommandHelp(
+        "ShowBindHost", "",
+        t_s("Show currently selected bind host", "helpcmd|ShowBindHost|desc"));
+    AddCommandHelp(
+        "Jump", t_s("[server]", "helpcmd|Jump|args"),
+        t_s("Jump to the next or the specified server", "helpcmd|Jump|desc"));
+    AddCommandHelp("Disconnect", t_s("[message]", "helpcmd|Disconnect|args"),
+                   t_s("Disconnect from IRC", "helpcmd|Disconnect|desc"));
+    AddCommandHelp("Connect", "",
+                   t_s("Reconnect to IRC", "helpcmd|Connect|desc"));
+    AddCommandHelp(
+        "Uptime", "",
+        t_s("Show for how long ZNC has been running", "helpcmd|Uptime|desc"));

     if (!m_pUser->DenyLoadMod()) {
-        AddCommandHelp(Table, "LoadMod",
-                       "[--type=global|user|network] <module>", "Load a module",
-                       sFilter);
-        AddCommandHelp(Table, "UnloadMod",
-                       "[--type=global|user|network] <module>",
-                       "Unload a module", sFilter);
-        AddCommandHelp(Table, "ReloadMod",
-                       "[--type=global|user|network] <module>",
-                       "Reload a module", sFilter);
+        AddCommandHelp("LoadMod",
+                       t_s("[--type=global|user|network] <module>",
+                           "helpcmd|LoadMod|args"),
+                       t_s("Load a module", "helpcmd|LoadMod|desc"));
+        AddCommandHelp("UnloadMod",
+                       t_s("[--type=global|user|network] <module>",
+                           "helpcmd|UnloadMod|args"),
+                       t_s("Unload a module", "helpcmd|UnloadMod|desc"));
+        AddCommandHelp("ReloadMod",
+                       t_s("[--type=global|user|network] <module>",
+                           "helpcmd|ReloadMod|args"),
+                       t_s("Reload a module", "helpcmd|ReloadMod|desc"));
         if (m_pUser->IsAdmin()) {
-            AddCommandHelp(Table, "UpdateMod", "<module>",
-                           "Reload a module everywhere", sFilter);
+            AddCommandHelp(
+                "UpdateMod", t_s("<module>", "helpcmd|UpdateMod|args"),
+                t_s("Reload a module everywhere", "helpcmd|UpdateMod|desc"));
         }
     }

-    AddCommandHelp(Table, "ShowMOTD", "", "Show ZNC's message of the day",
-                   sFilter);
+    AddCommandHelp(
+        "ShowMOTD", "",
+        t_s("Show ZNC's message of the day", "helpcmd|ShowMOTD|desc"));

     if (m_pUser->IsAdmin()) {
-        AddCommandHelp(Table, "SetMOTD", "<message>",
-                       "Set ZNC's message of the day", sFilter);
-        AddCommandHelp(Table, "AddMOTD", "<message>",
-                       "Append <message> to ZNC's MOTD", sFilter);
-        AddCommandHelp(Table, "ClearMOTD", "", "Clear ZNC's MOTD", sFilter);
-        AddCommandHelp(Table, "ListPorts", "", "Show all active listeners",
-                       sFilter);
         AddCommandHelp(
-            Table, "AddPort",
-            "<[+]port> <ipv4|ipv6|all> <web|irc|all> [bindhost [uriprefix]]",
-            "Add another port for ZNC to listen on", sFilter);
-        AddCommandHelp(Table, "DelPort", "<port> <ipv4|ipv6|all> [bindhost]",
-                       "Remove a port from ZNC", sFilter);
+            "SetMOTD", t_s("<message>", "helpcmd|SetMOTD|args"),
+            t_s("Set ZNC's message of the day", "helpcmd|SetMOTD|desc"));
         AddCommandHelp(
-            Table, "Rehash", "",
-            "Reload global settings, modules, and listeners from znc.conf",
-            sFilter);
-        AddCommandHelp(Table, "SaveConfig", "",
-                       "Save the current settings to disk", sFilter);
-        AddCommandHelp(Table, "ListUsers", "",
-                       "List all ZNC users and their connection status",
-                       sFilter);
-        AddCommandHelp(Table, "ListAllUserNetworks", "",
-                       "List all ZNC users and their networks", sFilter);
-        AddCommandHelp(Table, "ListChans", "[user <network>]",
-                       "List all channels", sFilter);
-        AddCommandHelp(Table, "ListClients", "[user]",
-                       "List all connected clients", sFilter);
-        AddCommandHelp(Table, "Traffic", "",
-                       "Show basic traffic stats for all ZNC users", sFilter);
-        AddCommandHelp(Table, "Broadcast", "[message]",
-                       "Broadcast a message to all ZNC users", sFilter);
-        AddCommandHelp(Table, "Shutdown", "[message]",
-                       "Shut down ZNC completely", sFilter);
-        AddCommandHelp(Table, "Restart", "[message]", "Restart ZNC", sFilter);
+            "AddMOTD", t_s("<message>", "helpcmd|AddMOTD|args"),
+            t_s("Append <message> to ZNC's MOTD", "helpcmd|AddMOTD|desc"));
+        AddCommandHelp("ClearMOTD", "",
+                       t_s("Clear ZNC's MOTD", "helpcmd|ClearMOTD|desc"));
+        AddCommandHelp(
+            "ListPorts", "",
+            t_s("Show all active listeners", "helpcmd|ListPorts|desc"));
+        AddCommandHelp("AddPort",
+                       t_s("<[+]port> <ipv4|ipv6|all> <web|irc|all> [bindhost "
+                           "[uriprefix]]",
+                           "helpcmd|AddPort|args"),
+                       t_s("Add another port for ZNC to listen on",
+                           "helpcmd|AddPort|desc"));
+        AddCommandHelp(
+            "DelPort",
+            t_s("<port> <ipv4|ipv6|all> [bindhost]", "helpcmd|DelPort|args"),
+            t_s("Remove a port from ZNC", "helpcmd|DelPort|desc"));
+        AddCommandHelp(
+            "Rehash", "",
+            t_s("Reload global settings, modules, and listeners from znc.conf",
+                "helpcmd|Rehash|desc"));
+        AddCommandHelp("SaveConfig", "",
+                       t_s("Save the current settings to disk",
+                           "helpcmd|SaveConfig|desc"));
+        AddCommandHelp("ListUsers", "",
+                       t_s("List all ZNC users and their connection status",
+                           "helpcmd|ListUsers|desc"));
+        AddCommandHelp("ListAllUserNetworks", "",
+                       t_s("List all ZNC users and their networks",
+                           "helpcmd|ListAllUserNetworks|desc"));
+        AddCommandHelp("ListChans",
+                       t_s("[user <network>]", "helpcmd|ListChans|args"),
+                       t_s("List all channels", "helpcmd|ListChans|desc"));
+        AddCommandHelp(
+            "ListClients", t_s("[user]", "helpcmd|ListClients|args"),
+            t_s("List all connected clients", "helpcmd|ListClients|desc"));
+        AddCommandHelp("Traffic", "",
+                       t_s("Show basic traffic stats for all ZNC users",
+                           "helpcmd|Traffic|desc"));
+        AddCommandHelp("Broadcast", t_s("[message]", "helpcmd|Broadcast|args"),
+                       t_s("Broadcast a message to all ZNC users",
+                           "helpcmd|Broadcast|desc"));
+        AddCommandHelp(
+            "Shutdown", t_s("[message]", "helpcmd|Shutdown|args"),
+            t_s("Shut down ZNC completely", "helpcmd|Shutdown|desc"));
+        AddCommandHelp("Restart", t_s("[message]", "helpcmd|Restart|args"),
+                       t_s("Restart ZNC", "helpcmd|Restart|desc"));
     }

     if (Table.empty()) {
-        PutStatus("No matches for '" + sFilter + "'");
+        PutStatus(t_f("No matches for '{1}'")(sFilter));
     } else {
         PutStatus(Table);
     }


Follow the change ExecutionContext -> IncrementalExecutor.

--- interpreter/cling/test/SourceCall/unresolved.C
+++ interpreter/cling/test/SourceCall/unresolved.C
@@ -18,26 +18,26 @@

 int i = 42;
 i = functionWithoutDefinition();
-// CHECK: ExecutionContext: use of undefined symbol 'functionWithoutDefinition'!
-// CHECK: ExecutionContext::executeFunction: symbol 'functionWithoutDefinition' unresolved while linking function
+// CHECK: IncrementalExecutor: use of undefined symbol 'functionWithoutDefinition'!
+// CHECK: IncrementalExecutor::executeFunction: symbol 'functionWithoutDefinition' unresolved while linking function
 i = foo();
-// CHECK: ExecutionContext: use of undefined symbol '{{.*}}foo{{.*}}'!
-// CHECK: ExecutionContext::executeFunction: symbol '{{.*}}foo{{.*}}' unresolved while linking function
+// CHECK: IncrementalExecutor: use of undefined symbol '{{.*}}foo{{.*}}'!
+// CHECK: IncrementalExecutor::executeFunction: symbol '{{.*}}foo{{.*}}' unresolved while linking function

 extern "C" int printf(const char* fmt, ...);
 printf("got i=%d\n", i); // CHECK: got i=42
 int a = 12// CHECK: (int) 12

 foo()
-// CHECK: ExecutionContext::executeFunction: symbol '{{.*}}foo{{.*}}' unresolved
+// CHECK: IncrementalExecutor::executeFunction: symbol '{{.*}}foo{{.*}}' unresolved
 functionWithoutDefinition();
-// CHECK: ExecutionContext::executeFunction: symbol 'functionWithoutDefinition' unresolved while linking function
+// CHECK: IncrementalExecutor::executeFunction: symbol 'functionWithoutDefinition' unresolved while linking function

 bar();
-// CHECK: ExecutionContext: use of undefined symbol '{{.*}}foo{{.*}}'!
-// CHECK: ExecutionContext::executeFunction: symbol '{{.*}}foo{{.*}}' unresolved while linking function
+// CHECK: IncrementalExecutor: use of undefined symbol '{{.*}}foo{{.*}}'!
+// CHECK: IncrementalExecutor::executeFunction: symbol '{{.*}}foo{{.*}}' unresolved while linking function
 bar();
-// CHECK: ExecutionContext: calling unresolved symbol, see previous error message!
+// CHECK: IncrementalExecutor: calling unresolved symbol, see previous error message!

 i = 13 //CHECK: (int) 13
 .q


2012/04/09

--- commandline_options.cpp
+++ commandline_options.cpp
@@ -1,6 +1,7 @@
 #include <iostream>
+#include <algorithm>
+#include <locale>
 #include <cstdlib>
-#include <locale>
 #include "commandline_options.hpp"

 namespace kp19pp{
@@ -98,6 +99,7 @@
             if(c == '/' || c == '\\'){ break; }
             ret += c;
         }
+        std::reverse(ret.begin(), ret.end());
         return ret;
     }


Fix stack-stomping on 32-bit platforms

Fix stack-stomping on 32-bit platforms

Stack arrays of handles were being stored as 32-bit and indexed as
64-bit. We really need to distinguish between llvm_type_of and
llvm_storage_type_of

--- src/CodeGen_Posix.cpp
+++ src/CodeGen_Posix.cpp
@@ -123,7 +123,9 @@
             // stack pointer, but this makes llvm generate streams of
             // spill/reloads.
             int64_t stack_size = (stack_bytes + type.bytes() - 1) / type.bytes();
-            allocation.ptr = create_alloca_at_entry(llvm_type_of(type), stack_size, false, name);
+            // Handles are stored as uint64s
+            llvm::Type *t = llvm_type_of(type.is_handle() ? UInt(64, type.lanes()) : type);
+            allocation.ptr = create_alloca_at_entry(t, stack_size, false, name);
             allocation.stack_bytes = stack_bytes;
         }
     } else {


Make using directive a class member.

Make using directive a class member.

--- graf2d/gpadv7/v7/inc/ROOT/TPadDisplayItem.hxx
+++ graf2d/gpadv7/v7/inc/ROOT/TPadDisplayItem.hxx
@@ -25,27 +25,28 @@
 namespace ROOT {
 namespace Experimental {

-// list of snapshot for primitives in pad
-
-using TDisplayItemsVector = std::vector<std::unique_ptr<TDisplayItem>>;
-
 /// Display item for the pad
 /// Includes different graphical properties of the pad itself plus
 /// list of created items for all primitives

 class TPadDisplayItem : public TDisplayItem {
+public:
+   // list of snapshot for primitives in pad
+   using PadPrimitives_t = std::vector<std::unique_ptr<TDisplayItem>>;
+
+
 protected:
    const TFrame *fFrame{nullptr};   ///< temporary pointer on frame object
    const TPadDrawingOpts *fDrawOpts{nullptr}; ///< temporary pointer on pad drawing options
    const TPadExtent *fSize{nullptr};  ///< temporary pointer on pad size attributes
-   TDisplayItemsVector fPrimitives; ///< display items for all primitives in the pad
+   PadPrimitives_t fPrimitives; ///< display items for all primitives in the pad
 public:
    TPadDisplayItem() = default;
    virtual ~TPadDisplayItem() {}
    void SetFrame(const TFrame *f) { fFrame = f; }
    void SetDrawOpts(const TPadDrawingOpts *opts) { fDrawOpts = opts; }
    void SetSize(const TPadExtent *sz) { fSize = sz; }
-   TDisplayItemsVector &GetPrimitives() { return fPrimitives; }
+   PadPrimitives_t &GetPrimitives() { return fPrimitives; }
    void Add(std::unique_ptr<TDisplayItem> &&item) { fPrimitives.push_back(std::move(item)); }
    void Clear()
    {


find "getopt.h" in current directory for ms vc 9.0 complier

git-svn-id: 6625e4d6743179724b113c04fbf297d122273a36@2333 108fab2b-820f-0410-9f2c-e5cc2c41d7be

--- src/CommandOption.hpp
+++ src/CommandOption.hpp
@@ -56,7 +56,7 @@
 #elif defined (_AIX)
 #include "getopt.h"
 #else
-#include <getopt.h>
+#include "getopt.h"
 #endif

 #include <string>


Change default aggregate messages to 20

Change default aggregate messages to 20

--- src/Configuration.cpp
+++ src/Configuration.cpp
@@ -80,7 +80,7 @@

     "communication" : {
         "max-msg-size" : 512,
-        "max-aggregate" : 10
+        "max-aggregate" : 20
     }
 },


Discover dock widgets automatically

Discover dock widgets automatically

--- src/appleseed.studio/mainwindow/mainwindow.cpp
+++ src/appleseed.studio/mainwindow/mainwindow.cpp
@@ -391,10 +391,10 @@
     m_action_fullscreen = m_ui->menu_view->addAction("Fullscreen");
     m_action_fullscreen->setCheckable(true);
     m_action_fullscreen->setShortcut(Qt::Key_F11);
-    connect(m_ui->project_explorer->toggleViewAction(), SIGNAL(triggered()), SLOT(slot_check_fullscreen()));
-    connect(m_ui->attribute_editor->toggleViewAction(), SIGNAL(triggered()), SLOT(slot_check_fullscreen()));
-    connect(m_ui->log->toggleViewAction(), SIGNAL(triggered()), SLOT(slot_check_fullscreen()));
-    connect(m_ui->python_console->toggleViewAction(), SIGNAL(triggered()), SLOT(slot_check_fullscreen()));
+
+    for (const auto dock_widget : findChildren<QDockWidget*>())
+        connect(dock_widget->toggleViewAction(), SIGNAL(triggered()), SLOT(slot_check_fullscreen()));
+
     connect(m_action_fullscreen, SIGNAL(triggered()), SLOT(slot_fullscreen()));

     //


default argument -gpu is now -1 (search for 1st free/unused GPU)

--- motioncorr_v2.1/src/dosefgpu_driftcorr.cpp
+++ motioncorr_v2.1/src/dosefgpu_driftcorr.cpp
@@ -518,7 +518,7 @@
 	if(narg==1)
 	{
 		printf("Dose Fractionation Tool:\n");
-		printf("Drift correction v2.1 (Nov 21, 2013)\n\n");
+		printf("Drift correction v2.1-as1 (Aug 29th, 2016)\n\n");
 		printf("    Input: InputStack.mrc [OPTION VALUE] ...\n");
 		printf("          *Note: If OPTION isn't specified, the default value will be used.\n\n");
 		printf("           OPTION     VALUE(Default)    Introduction  \n");
@@ -531,7 +531,7 @@
 		printf("           -ned       0                 Last frame (0-base) used in alignment. 0: Use maximum value.\n");
 		printf("           -nss       0                 First frame (0-base) used for final sum.\n");
 		printf("           -nes       0                 Last frame (0-base) used for final sum. 0: Use maximum value.\n");
-		printf("           -gpu       0                 GPU device ID.\n");
+		printf("           -gpu      -1                 GPU device ID (-1: search for first free GPU)\n");
 		printf("           -bft       150               BFactor in pix^2.\n");
 		printf("           -pbx       96                Box dimension for searching CC peak.\n");
 		printf("           -fod       2                 Number of frame offset for frame comparision.\n");


Don't add the project to Open Recent menu if it failed to save

--- src/appleseed.studio/mainwindow/mainwindow.cpp
+++ src/appleseed.studio/mainwindow/mainwindow.cpp
@@ -282,8 +282,9 @@
     if (m_project_file_watcher)
         start_monitoring_project_file();

+    if (successful)
+        update_recent_files_menu(filepath);
     update_workspace();
-    update_recent_files_menu(filepath);

     return successful;
 }


rstan: not reset the seed after initialization

--- rstan/rstan/inst/include/rstan/stan_fit.hpp
+++ rstan/rstan/inst/include/rstan/stan_fit.hpp
@@ -497,8 +497,8 @@
         rstan::io::rcout << "params_i[" << i << "]=" << params_i[i] << std::endl;
       */
       // reset the seed
-      base_rng.seed(random_seed);
-      base_rng.discard(DISCARD_STRIDE * (chain_id - 1));
+      // base_rng.seed(random_seed);
+      // base_rng.discard(DISCARD_STRIDE * (chain_id - 1));

       std::fstream sample_stream;
       bool append_samples = args.get_append_samples();


Reenable --simd-object after M38 rebasing.

BUG=XWALK-2448

--- runtime/browser/xwalk_browser_main_parts.cc
+++ runtime/browser/xwalk_browser_main_parts.cc
@@ -110,7 +110,6 @@
   command_line->AppendSwitch(switches::kAllowFileAccessFromFiles);

   // Enable SIMD.JS API by default.
-  /*
   std::string js_flags("--simd_object");
   if (command_line->HasSwitch(switches::kJavaScriptFlags)) {
     js_flags += " ";
@@ -118,7 +117,6 @@
         command_line->GetSwitchValueASCII(switches::kJavaScriptFlags);
   }
   command_line->AppendSwitchASCII(switches::kJavaScriptFlags, js_flags);
-  */

   startup_url_ = GetURLFromCommandLine(*command_line);
 }


Fix interoperability test compilation on FreeBSD

Summary:
While building the 8.0 releases on FreeBSD, I encountered the following
error in the regression tests, where ompt/misc/interoperability.cpp
failed to compile, with:

```
projects/openmp/runtime/test/ompt/misc/interoperability.cpp:7:10: fatal error: 'alloca.h' file not found
#include <alloca.h>
         ^~~~~~~~~~
```

Like on NetBSD, alloca(3) is defined in <stdlib.h> instead.

Reviewers: emaste, jlpeyton, krytarowski, mgorny, protze.joachim

Reviewed By: jlpeyton

Subscribers: jdoerfert, openmp-commits

Tags: #openmp

Differential Revision: https://reviews.llvm.org/D59736

git-svn-id: f99161ee8ccfe2101cbe1bdda2220bce2ed25485@356936 91177308-0d34-0410-b5e6-96231b3b80d8

--- runtime/test/ompt/misc/interoperability.cpp
+++ runtime/test/ompt/misc/interoperability.cpp
@@ -3,7 +3,7 @@

 #include <iostream>
 #include <thread>
-#if !defined(__NetBSD__)
+#if !defined(__FreeBSD__) && !defined(__NetBSD__)
 #include <alloca.h>
 #else
 #include <cstdlib>


update new version (for tested code)

update new version (for tested code)


Use IID_PPV_ARGS() macro for passing arguments to heap creation methods

--- src/D3D12MemAlloc.cpp
+++ src/D3D12MemAlloc.cpp
@@ -3750,7 +3750,7 @@
     heapDesc.Alignment = HeapFlagsToAlignment(m_HeapFlags);
     heapDesc.Flags = m_HeapFlags;

-    HRESULT hr = m_Allocator->GetDevice()->CreateHeap(&heapDesc, __uuidof(*m_Heap), (void**)&m_Heap);
+    HRESULT hr = m_Allocator->GetDevice()->CreateHeap(&heapDesc, IID_PPV_ARGS(&m_Heap));
     if(SUCCEEDED(hr))
     {
         m_Allocator->m_Budget.m_BlockBytes[HeapTypeToIndex(m_HeapProps.Type)] += m_Size;
@@ -5140,7 +5140,7 @@
     heapDesc.Flags = committedAllocParams.m_HeapFlags;

     ID3D12Heap* heap = nullptr;
-    HRESULT hr = m_Device->CreateHeap(&heapDesc, __uuidof(*heap), (void**)&heap);
+    HRESULT hr = m_Device->CreateHeap(&heapDesc, IID_PPV_ARGS(&heap));
     if(SUCCEEDED(hr))
     {
         const BOOL wasZeroInitialized = TRUE;
@@ -5183,7 +5183,7 @@
     heapDesc.Flags = committedAllocParams.m_HeapFlags;

     ID3D12Heap* heap = nullptr;
-    HRESULT hr = m_Device4->CreateHeap1(&heapDesc, pProtectedSession, __uuidof(*heap), (void**)&heap);
+    HRESULT hr = m_Device4->CreateHeap1(&heapDesc, pProtectedSession, IID_PPV_ARGS(&heap));
     if(SUCCEEDED(hr))
     {
         const BOOL wasZeroInitialized = TRUE;


Remove comments made while testing git subtree.

--- src/core/signalcenter.cpp
+++ src/core/signalcenter.cpp
@@ -1,10 +1,5 @@
 #include "signalcenter.h"
 #include "dispatchentry.h"
-
-// TEST: git subtree commit in upstream repo
-// TEST 2: git subtree commit made in application repo
-// TEST 3: git subtree commit made in application repo and pushed with git subtree push
-// TEST 4: yet another git subtree commit made in application repo and pushed with git subtree push

 /*!


INTEGRATION: CWS ooo19126 (1.2.162); FILE MERGED 2005/09/05 17:44:40 rt 1.2.162.1: #i54170# Change license header: remove SISSL

--- sal/qa/ByteSequence/rtl_old_testbyteseq.cxx
+++ sal/qa/ByteSequence/rtl_old_testbyteseq.cxx
@@ -1,61 +1,35 @@
 /*************************************************************************
+ *
+ *  OpenOffice.org - a multi-platform office productivity suite
  *
  *  $RCSfile: rtl_old_testbyteseq.cxx,v $
  *
- *  $Revision: 1.2 $
+ *  $Revision: 1.3 $
  *
- *  last change: $Author: rt $ $Date: 2004-05-03 08:55:07 $
+ *  last change: $Author: rt $ $Date: 2005-09-08 15:15:15 $
  *
- *  The Contents of this file are made available subject to the terms of
- *  either of the following licenses
- *
- *         - GNU Lesser General Public License Version 2.1
- *         - Sun Industry Standards Source License Version 1.1
- *
- *  Sun Microsystems Inc., October, 2000
- *
- *  GNU Lesser General Public License Version 2.1
- *  =============================================
- *  Copyright 2000 by Sun Microsystems, Inc.
- *  901 San Antonio Road, Palo Alto, CA 94303, USA
- *
- *  This library is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Lesser General Public
- *  License version 2.1, as published by the Free Software Foundation.
- *
- *  This library is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- *  Lesser General Public License for more details.
- *
- *  You should have received a copy of the GNU Lesser General Public
- *  License along with this library; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- *  MA  02111-1307  USA
+ *  The Contents of this file are made available subject to
+ *  the terms of GNU Lesser General Public License Version 2.1.
  *
  *
- *  Sun Industry Standards Source License Version 1.1
- *  =================================================
- *  The contents of this file are subject to the Sun Industry Standards
- *  Source License Version 1.1 (the "License"); You may not use this file
- *  except in compliance with the License. You may obtain a copy of the
- *  License at http://www.openoffice.org/license.html.
+ *    GNU Lesser General Public License Version 2.1
+ *    =============================================
+ *    Copyright 2005 by Sun Microsystems, Inc.
+ *    901 San Antonio Road, Palo Alto, CA 94303, USA
  *
- *  Software provided under this License is provided on an "AS IS" basis,
- *  WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
- *  WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
- *  MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
- *  See the License for the specific provisions governing your rights and
- *  obligations concerning the Software.
+ *    This library is free software; you can redistribute it and/or
+ *    modify it under the terms of the GNU Lesser General Public
+ *    License version 2.1, as published by the Free Software Foundation.
  *
- *  The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *    This library is distributed in the hope that it will be useful,
+ *    but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ *    Lesser General Public License for more details.
  *
- *  Copyright: 2000 by Sun Microsystems, Inc.
- *
- *  All Rights Reserved.
- *
- *  Contributor(s): _______________________________________
- *
+ *    You should have received a copy of the GNU Lesser General Public
+ *    License along with this library; if not, write to the Free Software
+ *    Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ *    MA  02111-1307  USA
  *
  ************************************************************************/
 // LLA:


license change

license change

git-svn-id: 1af002208e930b4d920e7c2b948d1e98a012c795@3192 a9d63959-f2ad-4865-b262-bf0e56cfafb6

--- common/src/pcl_base.cpp
+++ common/src/pcl_base.cpp
@@ -1,7 +1,9 @@
 /*
  * Software License Agreement (BSD License)
  *
- *  Copyright (c) 2010, Willow Garage, Inc.
+ *  Point Cloud Library (PCL) - www.pointclouds.org
+ *  Copyright (c) 2010-2011, Willow Garage, Inc.
+ *
  *  All rights reserved.
  *
  *  Redistribution and use in source and binary forms, with or without
@@ -34,12 +36,6 @@
  * $Id$
  *
  */
-
-/**
-
-\author Radu Bogdan Rusu
-
-**/

 #include "pcl/pcl_base.h"


EON Rewrite (Release)

EON Rewrite (Release)

--- src/EON/Extractor.hpp
+++ src/EON/Extractor.hpp
@@ -464,7 +464,7 @@
 		}

 	public:
-		template<class Converter, class ResultPolicy>
+		template<class ResultPolicy, class Converter>
 		static auto Extract(const Selector& selector, Converter fnConvert,
 							ResultPolicy& result, const EONObject& scope) -> typename ResultPolicy::ResultType
 		{
@@ -481,7 +481,7 @@
 				return result.Failed(selector.Path());
 		}

-		template<class Converter, class ResultPolicy>
+		template<class ResultPolicy, class Converter>
 		static auto Extract(const Selector& selector, eAttribute attr, Converter fnConvert,
 							ResultPolicy& result, const EONObject& scope) -> typename ResultPolicy::ResultType
 		{
@@ -498,7 +498,7 @@
 				return result.Failed(selector.Path());
 		}

-		template<class E, class Converter, class ResultPolicy>
+		template<class E, class ResultPolicy, class Converter>
 		static auto Extract(const Selector& selector, const Parser<E>& parser, Converter fnConvert,
 							ResultPolicy& result, const EONObject& scope) -> typename ResultPolicy::ResultType
 		{


Move warning pragmas outside the function body

--- src/bindings/python/vistk/pipeline/version.cxx
+++ src/bindings/python/vistk/pipeline/version.cxx
@@ -75,20 +75,20 @@
   ;
 }

-bool
-compile
-::check(version_t major_, version_t minor_, version_t patch_)
-{
-  // If any of the version components are 0, we get compare warnings. Turn
-  // them off here.
+// If any of the version components are 0, we get compare warnings. Turn
+// them off here.
 #ifdef __GNUC__
 #pragma GCC diagnostic push
 #pragma GCC diagnostic ignored "-Wtype-limits"
 #endif

+bool
+compile
+::check(version_t major_, version_t minor_, version_t patch_)
+{
   return VISTK_VERSION_CHECK(major_, minor_, patch_);
+}

 #ifdef __GNUC__
 #pragma GCC diagnostic pop
 #endif
-}


Appropriate error handling on EditableFloor

Signed-off-by: Ícaro Pires <da6655275d47bfa360965307fe4b4b480d5e69b1@gmail.com>

--- src/EditableFloor.cpp
+++ src/EditableFloor.cpp
@@ -59,13 +59,19 @@
       platform_sprite(Sprite(CROSSINGABLE_PLATFORM_PATH)),
       selected_sprite(Sprite(SELECTED_CROSSINGABLE_PLATFORM_PATH)) {
 #ifndef NDEBUG
-    std::string log_message = "Starting EditableFloor constructor with x: ";
-    log_message += std::to_string(x) + ", y: " + std::to_string(y);
-    log_message += ", crotation: " + std::to_string(crotation);
-    log_message +=
-        ", cplatfrom: " + std::to_string(static_cast<int>(cplatform));
-
-    LOG(DEBUG) << log_message;
+    try {
+        std::string log_message = "Starting EditableFloor constructor with x: ";
+        log_message += std::to_string(x) + ", y: " + std::to_string(y);
+        log_message += ", crotation: " + std::to_string(crotation);
+        log_message +=
+            ", cplatfrom: " + std::to_string(static_cast<int>(cplatform));
+
+        LOG(DEBUG) << log_message;
+    } catch (std::bad_alloc &error) {
+        string str_error(error.what());
+        string log_message = "Couldn't convert to string: " + str_error + '\n';
+        LOG(FATAL) << log_message;
+    }
 #endif

     box = Rectangle(x, y, standard_sprite.get_width(),
@@ -90,13 +96,19 @@
                              bool cplatform)
     : EditableFloor(x, y, crotation, cplatform) {
 #ifndef NDEBUG
-    std::string log_message = "Starting EditableFloor constructor with x: ";
-    log_message += std::to_string(x) + ", y: " + std::to_string(y);
-    log_message += ", width:" + std::to_string(width);
-    log_message += ", crotation: " + std::to_string(crotation);
-    log_message +=
-        ", cplatfrom: " + std::to_string(static_cast<int>(cplatform));
-    LOG(DEBUG) << log_message;
+    try {
+        std::string log_message = "Starting EditableFloor constructor with x: ";
+        log_message += std::to_string(x) + ", y: " + std::to_string(y);
+        log_message += ", width:" + std::to_string(width);
+        log_message += ", crotation: " + std::to_string(crotation);
+        log_message +=
+            ", cplatfrom: " + std::to_string(static_cast<int>(cplatform));
+        LOG(DEBUG) << log_message;
+    } catch (std::bad_alloc &error) {
+        string str_error(error.what());
+        string log_message = "Couldn't convert to string: " + str_error + '\n';
+        LOG(FATAL) << log_message;
+    }

     if (x <= BACKGROUND_WIDTH) {
         /* Nothing to do. */
@@ -135,8 +147,15 @@
     LOG(DEBUG) << "Starting EditableFloor get_information";

     char info_c[DEBUG_SIZE];
-    snprintf(info_c, sizeof(info_c), "%f %f %f %f %d", box.x, box.y, box.width,
-             rotation * PI_DEGREES / PI, static_cast<int>(is_crossingable));
+    int snprint_return = snprintf(
+        info_c, sizeof(info_c), "%f %f %f %f %d", box.x, box.y, box.width,
+        rotation * PI_DEGREES / PI, static_cast<int>(is_crossingable));
+
+    if (snprint_return == 5) {
+        /* Nothing to do. */
+    } else {
+        LOG(ERROR) << "Could not get the complete information";
+    }

     string info(info_c);

@@ -309,8 +328,7 @@
  * @param moved will become true if platform move
  * @param delta_space how much platform will move
  */
-void EditableFloor::handle_box_moving(bool &moved,
-                                      float delta_space) {  // NOLINT
+void EditableFloor::handle_box_moving(bool &moved, float delta_space) {
     // LOG(DEBUG) << "Starting EditableFloor handle_box_moving method";

     InputManager *input_manager = InputManager::get_instance();
@@ -344,8 +362,7 @@
  * @param moved will become true if platform move
  * @param delta_space how much platform will move
  */
-void EditableFloor::handle_box_resizing(bool &moved,
-                                        float delta_space) {  // NOLINT
+void EditableFloor::handle_box_resizing(bool &moved, float delta_space) {
     // LOG(DEBUG) << "Starting EditableFloor handle_box_resizing method";

     /**
@@ -366,7 +383,7 @@
     InputManager *input_manager = InputManager::get_instance();

     /**
-     * Increase floor width.
+     * Resizing platform.
      */
     if (input_manager->is_key_down(InputManager::K_INC_W)) {
         standard_sprite.update_scale_x(RESIZING_SPEED * delta_space);
@@ -375,14 +392,7 @@

         box.width = standard_sprite.get_width();
         moved = true;
-    } else {
-        /* Nothing to do. */
-    }
-
-    /**
-     * Decrease floor width.
-     */
-    if (input_manager->is_key_down(InputManager::K_DEC_W)) {
+    } else if (input_manager->is_key_down(InputManager::K_DEC_W)) {
         standard_sprite.update_scale_x(-RESIZING_SPEED * delta_space);
         platform_sprite.update_scale_x(-RESIZING_SPEED * delta_space);
         selected_sprite.update_scale_x(-RESIZING_SPEED * delta_space);
@@ -429,9 +439,8 @@
  * @param moved if platform was moved, it will change behavior
  * @param acceleration acceleration that will be changed
  */
-void EditableFloor::handle_acceleration_increasing(
-    bool &moved,
-    float &acceleration) {  // NOLINT
+void EditableFloor::handle_acceleration_increasing(bool &moved,
+                                                   float &acceleration) {
     // LOG(DEBUG) << "Starting EditableFloor handle_acceleration_increasing
     // method";


For fee-rigid constraints, the rigid body might not exist in the data manager yet. Get position and rotation from the body itself

--- src/chrono_parallel/physics/ChFEAContainer.cpp
+++ src/chrono_parallel/physics/ChFEAContainer.cpp
@@ -54,12 +54,13 @@
     // point is the nodal point
     int body_a = body->GetId();
     int body_b = node;
-   // printf("Add Rigid fea: %d %d %d\n", num_rigid_constraints, body_a, body_b);
-    custom_vector<real3>& pos_rigid = data_manager->host_data.pos_rigid;
-    custom_vector<quaternion>& rot_rigid = data_manager->host_data.rot_rigid;
-    custom_vector<real3>& pos_node_fea = data_manager->host_data.pos_rigid;
-
-    constraint_position.push_back(TransformParentToLocal(pos_rigid[body_a], rot_rigid[body_a], pos_node_fea[body_b]));
+
+    custom_vector<real3>& pos_node_fea = data_manager->host_data.pos_node_fea;
+
+    real3 pos_rigid = real3(body->GetPos().x, body->GetPos().y, body->GetPos().z);
+    quaternion rot_rigid = quaternion(body->GetRot().e0, body->GetRot().e1, body->GetRot().e2, body->GetRot().e3);
+
+    constraint_position.push_back(TransformParentToLocal(pos_rigid, rot_rigid, pos_node_fea[body_b]));
     constraint_bodies.push_back(_make_int2(body_a, body_b));

     num_rigid_constraints++;


include capital letters in stats regex for uuid

--- src/clustering/administration/stats/request.cc
+++ src/clustering/administration/stats/request.cc
@@ -245,7 +245,7 @@
 std::set<std::vector<std::string> > stats_request_t::global_stats_filter() {
     return std::set<std::vector<std::string> >(
         { {"query_engine"},
-          {"[0-9a-f-]+", "serializers" } });
+          {"[0-9A-Fa-f-]+", "serializers" } });
 }

 std::vector<std::pair<server_id_t, peer_id_t> > stats_request_t::all_peers(


Hostboot - Only init PLLs on functional portions of chip

SW196844

Change-Id: I28e7b18cce88abaff0de54e8ff01341ed2d3c49b
Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/5970
Tested-by: Jenkins Server
Reviewed-by: A. Patrick Williams III <c87e37b1a4035affd737b461af89fb722d635f4d@us.ibm.com>

--- src/usr/hwpf/hwp/nest_chiplets/nest_chiplets.C
+++ src/usr/hwpf/hwp/nest_chiplets/nest_chiplets.C
@@ -129,13 +129,46 @@
                 "Running proc_a_x_pci_dmi_pll_initf HWP on "
                 "target HUID %.8X", TARGETING::get_huid(l_proc_target));

+        bool l_startXbusPll = false;
+        bool l_startAbusPll = false;
+        bool l_startPCIEPll = false;
+        bool l_startDMIPll = false;
+
+        TARGETING::TargetHandleList l_xbus;
+        getChildChiplets( l_xbus, l_proc_target, TYPE_XBUS );
+        if (l_xbus.size() > 0)
+        {
+            l_startXbusPll = true;
+        }
+
+        TARGETING::TargetHandleList l_abus;
+        getChildChiplets( l_abus, l_proc_target, TYPE_ABUS );
+        if (l_abus.size() > 0)
+        {
+            l_startAbusPll = true;
+        }
+
+        TARGETING::TargetHandleList l_pci;
+        getChildChiplets( l_pci, l_proc_target, TYPE_PCI );
+        if (l_pci.size() > 0)
+        {
+            l_startPCIEPll = true;
+        }
+
+        TARGETING::TargetHandleList l_mcs;
+        getChildChiplets( l_mcs, l_proc_target, TYPE_MCS );
+        if (l_mcs.size() > 0)
+        {
+            l_startDMIPll = true;
+        }
+
         //  call proc_a_x_pci_dmi_pll_initf
         FAPI_INVOKE_HWP(l_err, proc_a_x_pci_dmi_pll_initf,
                         l_fapi_proc_target,
-                        true,   // xbus
-                        true,   // abus
-                        true,   // pcie
-                        true);  // dmi
+                        l_startXbusPll,   // xbus
+                        l_startAbusPll,   // abus
+                        l_startPCIEPll,   // pcie
+                        l_startDMIPll);   // dmi

         if (l_err)
         {
@@ -206,13 +239,46 @@
                 "Running proc_a_x_pci_dmi_pll_setup HWP on "
                 "target HUID %.8X", TARGETING::get_huid(l_proc_target));

+        bool l_startXbusPll = false;
+        bool l_startAbusPll = false;
+        bool l_startPCIEPll = false;
+        bool l_startDMIPll = false;
+
+        TARGETING::TargetHandleList l_xbus;
+        getChildChiplets( l_xbus, l_proc_target, TYPE_XBUS );
+        if (l_xbus.size() > 0)
+        {
+            l_startXbusPll = true;
+        }
+
+        TARGETING::TargetHandleList l_abus;
+        getChildChiplets( l_abus, l_proc_target, TYPE_ABUS );
+        if (l_abus.size() > 0)
+        {
+            l_startAbusPll = true;
+        }
+
+        TARGETING::TargetHandleList l_pci;
+        getChildChiplets( l_pci, l_proc_target, TYPE_PCI );
+        if (l_pci.size() > 0)
+        {
+            l_startPCIEPll = true;
+        }
+
+        TARGETING::TargetHandleList l_mcs;
+        getChildChiplets( l_mcs, l_proc_target, TYPE_MCS );
+        if (l_mcs.size() > 0)
+        {
+            l_startDMIPll = true;
+        }
+
         //  call proc_a_x_pci_dmi_pll_setup
         FAPI_INVOKE_HWP(l_err, proc_a_x_pci_dmi_pll_setup,
                         l_fapi_proc_target,
-                        true,   // xbus
-                        true,   // abus
-                        true,   // pcie
-                        true);  // dmi
+                        l_startXbusPll,   // xbus
+                        l_startAbusPll,   // abus
+                        l_startPCIEPll,   // pcie
+                        l_startDMIPll);   // dmi

         if (l_err)
         {


Attribute Sync Documentation

Attribute Sync Documentation

Add a descriptive comment for performing notifyResourceReady.

Change-Id: Id519c859b4ad8d17fd64c8be3f8fbcf46bfdd778
Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/110723
Reviewed-by: Michael Baiocchi <a81f28e8886c5e2bd4bbd867228778c3b7b19dea@us.ibm.com>
Reviewed-by: Roland Veloz <768fb49134ab823c765de70e7067d9f65f5d0a3e@us.ibm.com>
Tested-by: Jenkins Server <8e3f934e4c44875bc48d33da3ea13d93ba9a233f@us.ibm.com>
Tested-by: Jenkins OP Build CI <e610bd72261d3c0a48f1e8ae36832ab00774d426@us.ibm.com>
Tested-by: Jenkins OP HW <0eb0fff262f74a65a832afbcc7b153e391c9a3fd@us.ibm.com>
Tested-by: FSP CI Jenkins <aa9e4d9ac7cd25905e9c0dd36d4150516e73dd86@us.ibm.com>
Tested-by: Jenkins Combined Simics CI <8312af3886dfc9bb930f549023677220805b137e@us.ibm.com>
Tested-by: Hostboot CI <52521565bd8ea18a2b112942dce4f4220a97c2c8@us.ibm.com>
Reviewed-by: Daniel M Crowell <912029ca9254ac7b5854e56910561d682e1fa2d0@us.ibm.com>

--- src/usr/isteps/istep06/host_discover_targets.C
+++ src/usr/isteps/istep06/host_discover_targets.C
@@ -825,6 +825,16 @@
     }
 #endif // CONFIG_PLDM

+    // Send AttrRP notification that we have completed host_discover_targets
+    // (which completes presence detection).
+    //
+    // We can now OPEN the attribute sync window to allow RECONFIG loops to
+    // sync attributes down to the SP.
+    //
+    // This prevents performing an attribute sync which may possibly have
+    // CLEARED EECACHE.  This may inappropriately identify the primary PROC
+    // as -NOT- functional which would inhibit forward progression.
+
     l_err = TARGETING::AttrRP::notifyResourceReady(
               TARGETING::AttrRP::RESOURCE::SYNC_WINDOW_OPEN);
     if (l_err)


Increase note height to 9px.

Increase note height to 9px.

--- src/Gui/PianoRoll.cpp
+++ src/Gui/PianoRoll.cpp
@@ -34,7 +34,7 @@
 #include <QMenu>
 #include <math.h> // for pow()

-#define NOTE_HEIGHT 7
+#define NOTE_HEIGHT 9 /* pixels */

 /* Static vars. */
 bool PianoRoll::canMoveItems;


Skip null pointers

Skip null pointers

--- himan-plugins/source/compiled_plugin_base.cpp
+++ himan-plugins/source/compiled_plugin_base.cpp
@@ -406,6 +406,7 @@
 		itsConfiguration->Statistics()->UsedThreadCount(itsThreadCount);
 		itsTimer->Stop();
 		itsConfiguration->Statistics()->AddToInitTime(itsTimer->GetTime());
+		// Start process timing
 		itsTimer->Start();
 	}
 }
@@ -482,6 +483,11 @@

 	for (++it; it != grids.end(); ++it)
 	{
+		if (!*it)
+		{
+			continue;
+		}
+
 		if (*first != **it)
 		{
 			return false;


graphics: use min0 draw option also in 3D algorithms

--- hist/histpainter/src/TPainter3dAlgorithms.cxx
+++ hist/histpainter/src/TPainter3dAlgorithms.cxx
@@ -2191,12 +2191,12 @@
    vv[2] = Hparam.factor*gCurrentHist->GetBinContent(ixt, iyt);

    // In linear scale, 3D boxes all start from 0.
-   if (Hparam.zmin<0 && !Hoption.Logz && gStyle->GetHistMinimumZero()) {
+   if (Hparam.zmin<0 && !Hoption.Logz && Hoption.MinimumZero) {
       if (vv[2]<0) {
          vv[1] = vv[2];
          vv[2] = 0;
       } else {
-         vv[1]=0;
+         vv[1] = 0;
       }
    }


LockFile: corrected immutability error message (was using path instead of m_path).

--- src/Hord/LockFile.cpp
+++ src/Hord/LockFile.cpp
@@ -42,7 +42,7 @@
 		HORD_THROW_FMT(
 			ErrorCode::lockfile_immutable,
 			s_err_immutable,
-			m_path
+			path
 		);
 	} else {
 		m_path.assign(std::move(path));


Better type matching (and error reporting) for GLSL shader inputs

--- panda/src/glstuff/glShaderContext_src.cxx
+++ panda/src/glstuff/glShaderContext_src.cxx
@@ -689,6 +689,26 @@
                 case GL_FLOAT_MAT3: bind._dim[1] = 9; break;
                 case GL_FLOAT_MAT4: bind._dim[1] = 16; break;
               }
+              switch (param_type) {
+              case GL_BOOL:
+              case GL_BOOL_VEC2:
+              case GL_BOOL_VEC3:
+              case GL_BOOL_VEC4:
+              case GL_INT:
+              case GL_INT_VEC2:
+              case GL_INT_VEC3:
+              case GL_INT_VEC4:
+                bind._type = Shader::SPT_int;
+                break;
+              case GL_FLOAT:
+              case GL_FLOAT_VEC2:
+              case GL_FLOAT_VEC3:
+              case GL_FLOAT_VEC4:
+              case GL_FLOAT_MAT3:
+              case GL_FLOAT_MAT4:
+                bind._type = Shader::SPT_float;
+                break;
+              }
               bind._arg = InternalName::make(param_name);
               bind._dim[0] = 1;
               bind._dep[0] = Shader::SSD_general | Shader::SSD_shaderinputs;
@@ -767,6 +787,26 @@
               case GL_FLOAT_MAT3: bind._dim[1] = 9; break;
               case GL_FLOAT_MAT4: bind._dim[1] = 16; break;
             }
+            switch (param_type) {
+            case GL_BOOL:
+            case GL_BOOL_VEC2:
+            case GL_BOOL_VEC3:
+            case GL_BOOL_VEC4:
+            case GL_INT:
+            case GL_INT_VEC2:
+            case GL_INT_VEC3:
+            case GL_INT_VEC4:
+              bind._type = Shader::SPT_int;
+              break;
+            case GL_FLOAT:
+            case GL_FLOAT_VEC2:
+            case GL_FLOAT_VEC3:
+            case GL_FLOAT_VEC4:
+            case GL_FLOAT_MAT3:
+            case GL_FLOAT_MAT4:
+              bind._type = Shader::SPT_float;
+              break;
+            }
             bind._arg = InternalName::make(param_name);
             bind._dim[0] = param_size;
             bind._dep[0] = Shader::SSD_general | Shader::SSD_shaderinputs;
@@ -1002,46 +1042,97 @@
   }

   // Iterate through _ptr parameters
-  for (int i=0; i<(int)_shader->_ptr_spec.size(); i++) {
-    const Shader::ShaderPtrSpec& spec = _shader->_ptr_spec[i];
+  for (int i = 0; i < (int)_shader->_ptr_spec.size(); ++i) {
+    Shader::ShaderPtrSpec &spec = _shader->_ptr_spec[i];

     if (altered & (spec._dep[0] | spec._dep[1])) {
-      Shader::ShaderPtrData* ptr_data =
-        const_cast< Shader::ShaderPtrData*>(_glgsg->fetch_ptr_parameter(spec));
+      const Shader::ShaderPtrData* ptr_data = _glgsg->fetch_ptr_parameter(spec);
       if (ptr_data == NULL) { //the input is not contained in ShaderPtrData
         release_resources();
         return;
       }

       GLint p = _glsl_parameter_map[spec._id._seqno];
-      switch (ptr_data->_type) {
+      switch (spec._type) {
       case Shader::SPT_float:
-        switch (spec._dim[1]) {
+        {
+          float *data = NULL;
+
+          switch (ptr_data->_type) {
+          case Shader::SPT_int:
+            // Convert int data to float data.
+            data = (float*) alloca(sizeof(float) * spec._dim[0] * spec._dim[1]);
+            for (int i = 0; i < (spec._dim[0] * spec._dim[1]); ++i) {
+              data[i] = (int)(((float*)ptr_data->_ptr)[i]);
+            }
+            break;
+
+          case Shader::SPT_double:
+            // Downgrade double data to float data.
+            data = (float*) alloca(sizeof(float) * spec._dim[0] * spec._dim[1]);
+            for (int i = 0; i < (spec._dim[0] * spec._dim[1]); ++i) {
+              data[i] = (float)(((double*)ptr_data->_ptr)[i]);
+            }
+            break;
+
+          case Shader::SPT_float:
+            data = (float*)ptr_data->_ptr;
+            break;
+
+          default:
+            nassertd(false) continue;
+          }
+
+          switch (spec._dim[1]) {
           case 1: _glgsg->_glUniform1fv(p, spec._dim[0], (float*)ptr_data->_ptr); continue;
           case 2: _glgsg->_glUniform2fv(p, spec._dim[0], (float*)ptr_data->_ptr); continue;
           case 3: _glgsg->_glUniform3fv(p, spec._dim[0], (float*)ptr_data->_ptr); continue;
           case 4: _glgsg->_glUniform4fv(p, spec._dim[0], (float*)ptr_data->_ptr); continue;
           case 9: _glgsg->_glUniformMatrix3fv(p, spec._dim[0], GL_FALSE, (float*)ptr_data->_ptr); continue;
           case 16: _glgsg->_glUniformMatrix4fv(p, spec._dim[0], GL_FALSE, (float*)ptr_data->_ptr); continue;
+          }
+          nassertd(false) continue;
         }
+        break;
+
       case Shader::SPT_int:
-        switch (spec._dim[1]) {
+        if (ptr_data->_type != Shader::SPT_int) {
+          GLCAT.error()
+            << "Cannot pass floating-point data to integer shader input '" << spec._id._name << "'\n";
+
+          // Deactivate it to make sure the user doesn't get flooded with this error.
+          spec._dep[0] = 0;
+          spec._dep[1] = 0;
+
+        } else {
+          switch (spec._dim[1]) {
           case 1: _glgsg->_glUniform1iv(p, spec._dim[0], (int*)ptr_data->_ptr); continue;
           case 2: _glgsg->_glUniform2iv(p, spec._dim[0], (int*)ptr_data->_ptr); continue;
           case 3: _glgsg->_glUniform3iv(p, spec._dim[0], (int*)ptr_data->_ptr); continue;
           case 4: _glgsg->_glUniform4iv(p, spec._dim[0], (int*)ptr_data->_ptr); continue;
+          }
+          nassertd(false) continue;
         }
+        break;
+
       case Shader::SPT_double:
         GLCAT.error() << "Passing double-precision shader inputs to GLSL shaders is not currently supported\n";
+
+        // Deactivate it to make sure the user doesn't get flooded with this error.
+        spec._dep[0] = 0;
+        spec._dep[1] = 0;
+
       default:
         continue;
       }
     }
   }

-  for (int i=0; i<(int)_shader->_mat_spec.size(); i++) {
-    if (altered & (_shader->_mat_spec[i]._dep[0] | _shader->_mat_spec[i]._dep[1])) {
-      const LMatrix4 *val = _glgsg->fetch_specified_value(_shader->_mat_spec[i], altered);
+  for (int i = 0; i < (int)_shader->_mat_spec.size(); ++i) {
+    Shader::ShaderMatSpec &spec = _shader->_mat_spec[i];
+
+    if (altered & (spec._dep[0] | spec._dep[1])) {
+      const LMatrix4 *val = _glgsg->fetch_specified_value(spec, altered);
       if (!val) continue;
 #ifndef STDFLOAT_DOUBLE
       // In this case, the data is already single-precision.
@@ -1052,8 +1143,8 @@
       const PN_float32 *data = valf.get_data();
 #endif

-      GLint p = _glsl_parameter_map[_shader->_mat_spec[i]._id._seqno];
-      switch (_shader->_mat_spec[i]._piece) {
+      GLint p = _glsl_parameter_map[spec._id._seqno];
+      switch (spec._piece) {
       case Shader::SMP_whole: _glgsg->_glUniformMatrix4fv(p, 1, GL_FALSE, data); continue;
       case Shader::SMP_transpose: _glgsg->_glUniformMatrix4fv(p, 1, GL_TRUE, data); continue;
       case Shader::SMP_col0: _glgsg->_glUniform4f(p, data[0], data[4], data[ 8], data[12]); continue;
@@ -1400,8 +1491,9 @@
   nassertv(texattrib != (TextureAttrib *)NULL);

   for (int i = 0; i < (int)_shader->_tex_spec.size(); ++i) {
-    const InternalName *id = _shader->_tex_spec[i]._name;
-    int texunit = _shader->_tex_spec[i]._stage;
+    const Shader::ShaderTexSpec &spec = _shader->_tex_spec[i];
+    const InternalName *id = spec._name;
+    int texunit = spec._stage;

     Texture *tex = NULL;
     int view = _glgsg->get_current_tex_view_offset();
@@ -1422,8 +1514,15 @@
       view += stage->get_tex_view_offset();
     }

-    if (tex == NULL || tex->get_texture_type() != _shader->_tex_spec[i]._desired_type) {
+    if (tex == NULL) {
       continue;
+    }
+
+    if (tex->get_texture_type() != spec._desired_type) {
+      GLCAT.error()
+        << "Sampler type of GLSL shader input '" << *id << "' does not "
+           "match type of texture " << *tex << ".\n";
+      //TODO: also check whether shadow sampler textures have shadow filter enabled.
     }

     CLP(TextureContext) *gtc = DCAST(CLP(TextureContext), tex->prepare_now(view, _glgsg->_prepared_objects, _glgsg));
@@ -1431,7 +1530,7 @@
       continue;
     }

-    GLint p = _glsl_parameter_map[_shader->_tex_spec[i]._id._seqno];
+    GLint p = _glsl_parameter_map[spec._id._seqno];

 #ifndef OPENGLES
     // If it was recently written to, we will have to issue a memory barrier soon.


Oops, I checked in too much

Oops, I checked in too much

--- panda/src/glstuff/glShaderContext_src.cxx
+++ panda/src/glstuff/glShaderContext_src.cxx
@@ -587,7 +587,6 @@
                 case GL_FLOAT_MAT3: bind._dim[1] = 9; break;
                 case GL_FLOAT_MAT4: bind._dim[1] = 16; break;
               }
-              bind._type = Shader::SPT_int;
               bind._arg = InternalName::make(param_name);
               bind._dim[0] = 1;
               bind._dep[0] = Shader::SSD_general | Shader::SSD_shaderinputs;
@@ -666,23 +665,6 @@
               case GL_FLOAT_MAT3: bind._dim[1] = 9; break;
               case GL_FLOAT_MAT4: bind._dim[1] = 16; break;
             }
-            switch (param_type) {
-              case GL_BOOL:
-              case GL_BOOL_VEC2:
-              case GL_BOOL_VEC3:
-              case GL_BOOL_VEC4:
-                bind._type = Shader::SPT_unknown;
-                break;
-              case GL_INT:
-              case GL_INT_VEC2:
-              case GL_INT_VEC3:
-              case GL_INT_VEC4:
-                bind._type = Shader::SPT_int;
-                break;
-              default:
-                bind._type = Shader::SPT_float;
-                break;
-            }
             bind._arg = InternalName::make(param_name);
             bind._dim[0] = param_size;
             bind._dep[0] = Shader::SSD_general | Shader::SSD_shaderinputs;


Fixed an out-of-bounds error

Fixed an out-of-bounds error

--- panda/src/glstuff/glShaderContext_src.cxx
+++ panda/src/glstuff/glShaderContext_src.cxx
@@ -359,6 +359,9 @@
         const ShaderInput *input = gsg->_target._shader->get_input(id);
         tex = input->get_texture();
       } else {
+        if (_cg_texbind[i].stage >= gsg->_target._texture->get_num_on_stages()) {
+          continue;
+        }
         TextureStage *stage = gsg->_target._texture->get_on_stage(_cg_texbind[i].stage);
         tex = gsg->_target._texture->get_on_texture(stage);
       }


Extended zero-dimensional persistent homology calculation with functors

In time, the functor shall replace the additional information that I am
presently storing during the calculation.

This will result in a cleaner interface and speed up the algorithm when
additional information is *not* required, e.g. when no centrality value
should be calculated for clique communities.

--- persistentHomology/ConnectedComponents.hh
+++ persistentHomology/ConnectedComponents.hh
@@ -7,6 +7,8 @@

 #include "topology/SimplicialComplex.hh"
 #include "topology/UnionFind.hh"
+
+#include "utilities/EmptyFunctor.hh"

 #include <algorithm>
 #include <tuple>
@@ -100,14 +102,15 @@
 template <
   class Simplex,
   class PairingCalculationTraits = traits::NoPersistencePairingCalculation< PersistencePairing<typename Simplex::VertexType> >,
-  class ElementCalculationTraits = traits::NoDiagonalElementCalculation
+  class ElementCalculationTraits = traits::NoDiagonalElementCalculation,
+  class Functor = aleph::utilities::EmptyFunctor
 >
   std::tuple<
     PersistenceDiagram<typename Simplex::DataType>,
     PersistencePairing<typename Simplex::VertexType>,
     std::unordered_map<typename Simplex::VertexType, unsigned>
   >
-calculateZeroDimensionalPersistenceDiagram( const topology::SimplicialComplex<Simplex>& K )
+calculateZeroDimensionalPersistenceDiagram( const topology::SimplicialComplex<Simplex>& K, Functor functor = Functor() )
 {
   using DataType   = typename Simplex::DataType;
   using VertexType = typename Simplex::VertexType;
@@ -131,6 +134,8 @@
   {
     cs[vertex] = 1;
     cc[vertex] = { vertex };
+
+    functor.initialize( vertex );
   }

   for( auto&& simplex : K )
@@ -177,6 +182,11 @@
     cc[olderComponent].insert( cc[olderComponent].end(),
                                cc[youngerComponent].begin(), cc[youngerComponent].end() );

+    functor( youngerComponent,
+             olderComponent,
+             creation,
+             destruction );
+
     for( auto&& vertex : cc[youngerComponent] )
       ap[vertex] += DataType( destruction - creation );

@@ -205,6 +215,9 @@

     pd.add( creator.data()                                );
     ct.add( static_cast<VertexType>( K.index( creator ) ) );
+
+    functor( root,
+             creator.data() );
   }

   return std::make_tuple( pd, pp, cs );


Fix the submission attributes

Fix the submission attributes

--- src/condor_contrib/aviary/src/HadoopObject.cpp
+++ src/condor_contrib/aviary/src/HadoopObject.cpp
@@ -308,9 +308,14 @@
     ::SetAttribute(cluster, proc, ATTR_JOB_REMOTE_USER_CPU, "0.0"); // float
     ::SetAttribute(cluster, proc, ATTR_JOB_PRIO, "0");              // int
     ::SetAttribute(cluster, proc, ATTR_IMAGE_SIZE, "0");            // int
-    ::SetAttributeInt(cluster, proc, ATTR_JOB_UNIVERSE, CONDOR_UNIVERSE_VANILLA );
+    ::SetAttributeInt(cluster, proc, ATTR_JOB_UNIVERSE, CONDOR_UNIVERSE_VANILLA );
+
+    // more stuff - without these our idle stats are whack
+    ::SetAttribute(cluster, proc, ATTR_MAX_HOSTS, "1");
+    ::SetAttribute(cluster, proc, ATTR_MIN_HOSTS, "1");
+
     ::SetAttribute(cluster, proc, ATTR_CURRENT_HOSTS, "0"); // int
-
+
         // LATE SET: These attributes are set late, after the incoming
     // ad, so they override whatever the incoming ad set.
     char buf[22]; // 22 is max size for an id, 2^32 + . + 2^32 + \0


Remove unused include

Remove unused include

--- src/controllers/highlights/HighlightPhrase.hpp
+++ src/controllers/highlights/HighlightPhrase.hpp
@@ -5,7 +5,6 @@

 #include <QRegularExpression>
 #include <QString>
-#include <memory>
 #include <pajlada/settings/serialize.hpp>

 namespace chatterino {


Remove debug log.

Remove debug log.

--- src/JSMacroPlugin.cpp
+++ src/JSMacroPlugin.cpp
@@ -140,7 +140,6 @@
 //---------------------------------------------------------------------------------------------------------------------

 static void WriteFile(const v8::FunctionCallbackInfo<v8::Value>& args) {
-	std::ofstream &f = *(std::ofstream*)args.Data().As<External>()->Value();
 	std::stringstream ss;
 	bool first = true;
 	for (int i = 0; i < args.Length(); i++) {
@@ -154,12 +153,9 @@
 		v8::String::Utf8Value str(args[i]);
 		ss << (*str ? *str : "[NOT_STRING]");
 	}
-	f << ss.str() << std::endl;

 	JSMacroPlugin *plugin = static_cast<JSMacroPlugin*>(GetPluginClass());
 	plugin->AddMessage(ss.str(), 0);
-
-	f.flush();
 }

 static void LoadScript(const FunctionCallbackInfo<Value>& args) {
@@ -250,10 +246,9 @@
 static Local<ObjectTemplate> NewProcessObject(Isolate* isolate) {
 	auto obj = ObjectTemplate::New(isolate);

-	Handle<External> selfRef = External::New(isolate, (void*)(new std::ofstream("C:/tmp/console.log.txt", std::ios::app)));
 	auto fileObj = ObjectTemplate::New(isolate);
 	fileObj->Set(String::NewFromUtf8(isolate, "write", NewStringType::kNormal).ToLocalChecked(),
-		FunctionTemplate::New(isolate, WriteFile, selfRef));
+		FunctionTemplate::New(isolate, WriteFile));

 	obj->Set(UTF8("version"), UTF8("v0.1.0"), PropertyAttribute::ReadOnly);
 	obj->Set(UTF8("stdout"), fileObj);


fixed bug of access to size of response data

--- examples/CSmartCard.cpp
+++ examples/CSmartCard.cpp
@@ -121,7 +121,7 @@

 	// print response
 	fprintf(stderr, "<< ");
-	for(int i=0; i<(int)cOutput; i++)
+	for(int i=0; i<(int)*cOutput; i++)
 		fprintf(stderr,"%.2x ", pOutput[i]);
 	fprintf(stderr,"\r\n");


test different compressed formats

test different compressed formats

--- src/OpenGLTexture.cpp
+++ src/OpenGLTexture.cpp
@@ -8,7 +8,7 @@
 #if defined __APPLE__
 #include <OpenGLES/ES3/gl.h>
 #include <OpenGLES/ES3/glext.h>
-#elsif defined GL_ES
+#elif (defined GL_ES)
 #include <GLES3/gl3.h>
 #include <EGL/egl.h>
 #include <EGL/eglext.h>
@@ -50,8 +50,14 @@
   case COMPRESSED_RGBA: return GL_RGBA8;
 #else
   case COMPRESSED_RG: return GL_COMPRESSED_RG11_EAC;
-  case COMPRESSED_RGB: return GL_COMPRESSED_RGB8_ETC2;
-  case COMPRESSED_RGBA: return GL_COMPRESSED_RGBA8_ETC2_EAC;
+  case COMPRESSED_RGB:
+      assert(0);
+      return GL_COMPRESSED_RGB8_ETC2;
+      // return GL_COMPRESSED_RGB_PVRTC_2BPPV1_IMG;
+  case COMPRESSED_RGBA:
+      // assert(0);
+      // return GL_COMPRESSED_RGBA8_ETC2_EAC;
+      return GL_COMPRESSED_RGBA_ASTC_4x4_KHR;
 #endif
   case LUMINANCE_ALPHA: return GL_RG8;
   }


Added some #includes for portable snprintf().

--- src/OstringStream.cpp
+++ src/OstringStream.cpp
@@ -22,6 +22,8 @@
 #define HAVE_SNPRINTF
 #define PREFER_PORTABLE_SNPRINTF

+#include <stdlib.h>
+#include <stdarg.h>
 #include "snprintf.c"
 #define VSNPRINTF portable_snprintf


Add erase to vector example

Add erase to vector example

--- examples/cpp/vector.cpp
+++ examples/cpp/vector.cpp
@@ -8,8 +8,8 @@

 int main(void)
 {
-	std::vector<int> v1 = {-1, 3, 5, -8, 0};
-	std::vector<int> v2;
+	std::vector<int> v1 = {-1, 3, 5, -8, 0}; //initialize with list
+	std::vector<int> v2; //don't initialize
 	auto v3(v1); //initialize v3 via copy

 	/**
@@ -93,6 +93,7 @@
 	v2.resize(10, -1); //resize to 10. New elements initialized with -1

 	v2.pop_back(); //removes last element
+	v2.erase(v2.begin()); //removes first element

 	std::cout << std::endl << "v2 resized: " << std::endl;
 	for (const auto & t : v2)


Added get/set for SoSFNode fields.

Added get/set for SoSFNode fields.

--- src/PySceneObject.cpp
+++ src/PySceneObject.cpp
@@ -14,9 +14,6 @@
 #include <Inventor/nodes/SoCamera.h>
 #include <Inventor/engines/SoEngine.h>
 #include <Inventor/fields/SoFields.h>
-#include <Inventor/fields/SoSFPlane.h>
-#include <Inventor/fields/SoSFMatrix.h>
-#include <Inventor/fields/SoSFRotation.h>
 #include <Inventor/actions/SoSearchAction.h>
 #include <Inventor/actions/SoWriteAction.h>
 #include <Inventor/actions/SoGLRenderAction.h>
@@ -645,9 +642,25 @@
 	initNumpy();
 	PyObject *result = NULL;

-	// special case for single matrix: return as [4][4] rather than [16]
-	if (field->isOfType(SoSFMatrix::getClassTypeId()))
-	{
+	if (field->isOfType(SoSFNode::getClassTypeId()))
+	{
+        SoSFNode *nodeField = (SoSFNode*) field;
+        SoNode *node = nodeField->getValue();
+        if (node)
+        {
+            PyObject *found = createWrapper(node->getTypeId().getName().getString());
+            if (found)
+            {
+                setInstance((Object*) found, node);
+                return found;
+            }
+        }
+        Py_INCREF(Py_None);
+        return Py_None;
+	}
+	else if (field->isOfType(SoSFMatrix::getClassTypeId()))
+	{
+        // special case for single matrix: return as [4][4] rather than [16]
 		npy_intp dims[] = { 4, 4 };
 		PyArrayObject *arr = (PyArrayObject*) PyArray_SimpleNewFromData(2, dims, NPY_FLOAT32, (void*) ((SoSFMatrix *) field)->getValue().getValue());
 		return PyArray_Return(arr);
@@ -767,7 +780,23 @@
 	initNumpy();
 	int result = 0;

-	if (field->isOfType(SoSFString::getClassTypeId()))
+	if (field->isOfType(SoSFNode::getClassTypeId()))
+	{
+        SoSFNode *nodeField = (SoSFNode*) field;
+        if (PyNode_Check(value))
+		{
+			Object *child = (Object *) value;
+			if (child->inventorObject && child->inventorObject->isOfType(SoNode::getClassTypeId()))
+			{
+                nodeField->setValue((SoNode*) child->inventorObject);
+			}
+		}
+        else
+        {
+            nodeField->setValue(0);
+        }
+	}
+	else if (field->isOfType(SoSFString::getClassTypeId()))
 	{
 		PyObject *str = PyObject_Str(value);
 		if (str)


Fix for internal_pointer()

Fix for internal_pointer()

--- src/PySceneObject.cpp
+++ src/PySceneObject.cpp
@@ -1408,11 +1408,18 @@
 }

+static void unref_fieldcontainer(PyObject* object)
+{
+    ((SoFieldContainer*)PyCapsule_GetPointer(object, "SoFieldContainer"))->unref();
+}
+
+
 PyObject* PySceneObject::internal_pointer(Object* self)
 {
 	if (self->inventorObject)
 	{
-        return PyCapsule_New((void*) self->inventorObject, NULL, NULL);
+        self->inventorObject->ref();
+        return PyCapsule_New((void*) self->inventorObject, "SoFieldContainer", unref_fieldcontainer);
 	}

 	Py_INCREF(Py_None);


Replace QMessageBox::warning by QGCApplication::criticalMessageBoxOnMainThread and removed unnecessary copying action

--- src/QGCApplication.cc
+++ src/QGCApplication.cc
@@ -498,12 +498,20 @@
             if(QFile::exists(saveFilename) && !QFile::remove(saveFilename)){
                 // if the file cannot be removed, prompt user and ask new path
                 saveError = true;
+<<<<<<< Updated upstream
                 QMessageBox::warning (MainWindow::instance(), "File Error","Could not overwrite existing file.\nPlease provide a different file name to save to.");
                 QFile::copy(tempLogfile, saveFilename);
             } else if(!QFile::copy(tempLogfile, saveFilename)) {
                 // if file could not be copied, prompt user and ask new path
                 saveError = true;
                 QMessageBox::warning (MainWindow::instance(), "File Error","Could not create file.\nPlease provide a different file name to save to.");
+=======
+                QGCApplication::criticalMessageBoxOnMainThread("File Error","Could not overwrite existing file.\nPlease provide a different file name to save to.");
+            } else if(!QFile::copy(tempLogfile, saveFilename)) {
+                // if file could not be copied, prompt user and ask new path
+                saveError = true;
+                QGCApplication::criticalMessageBoxOnMainThread("File Error","Could not create file.\nPlease provide a different file name to save to.");
+>>>>>>> Stashed changes
             }
         }
     } while(saveError); // if the file could not be overwritten, ask for new file


Formatting.

Formatting.

--- src/ScintillaBase.cxx
+++ src/ScintillaBase.cxx
@@ -689,6 +689,7 @@

 	case SCI_GETPROPERTYINT:
 		return props.GetInt(reinterpret_cast<const char *>(wParam), lParam);
+
 	case SCI_SETKEYWORDS:
 		if (wParam < numWordLists) {
 			keyWordLists[wParam]->Clear();


fix range

fix range

--- src/StratumSession.cc
+++ src/StratumSession.cc
@@ -565,7 +565,7 @@

 uint8_t StratumSession::allocShortJobId() {
   // return range: [0, 9]
-  if (shortJobIdIdx_ == 16) {
+  if (shortJobIdIdx_ == 10) {
     shortJobIdIdx_ = 0;
   }
   return shortJobIdIdx_++;


fix short job Id range

fix short job Id range

--- src/StratumSession.cc
+++ src/StratumSession.cc
@@ -565,7 +565,7 @@

 uint8_t StratumSession::allocShortJobId() {
   // return range: [0, 9]
-  if (shortJobIdIdx_ == 16) {
+  if (shortJobIdIdx_ == 9) {
     shortJobIdIdx_ = 0;
   }
   return shortJobIdIdx_++;


config: added HORD_FMT_SCOPED_* and HORD_THROW_ERROR_F macros.

--- include/Hord/config.hpp
+++ include/Hord/config.hpp
@@ -51,6 +51,10 @@
 	@note <Hord/String.hpp> and <Hord/Error.hpp> are required to use
 	these.

+	@note <ceformat/Format.hpp> is required for
+	the @c HORD_FMT_SCOPED_* macros, and <ceformat/print.hpp> is
+	required for #HORD_THROW_ERROR_F.
+
 	@note All throw macros except for #HORD_THROW_ERROR_S encapsulate
 	the final message in #HORD_STR_LIT (that is, @a m__ needn't be
 	#HORD_STR_LIT-ized).
@@ -80,13 +84,13 @@
 #endif

 /**
-	Returns the string literal of @c HORD_SCOPE_CLASS_IDENT__.
+	Returns the string literal of #HORD_SCOPE_CLASS_IDENT__.
 */
 #define HORD_SCOPE_CLASS \
 	HORD_STRINGIFY(HORD_SCOPE_CLASS_IDENT__)

 /**
-	Returns the string literal of @c HORD_SCOPE_FUNC_IDENT__.
+	Returns the string literal of #HORD_SCOPE_FUNC_IDENT__.
 */
 #define HORD_SCOPE_FUNC \
 	HORD_STRINGIFY(HORD_SCOPE_FUNC_IDENT__)
@@ -99,8 +103,14 @@

 /** @cond INTERNAL */
 #define HORD_MSG_SCOPED_IMPL__(s__, m__) \
-		HORD_STR_LIT(s__ ": " m__)
+	HORD_STR_LIT(s__ ": " m__)
+
+#define HORD_FMT_SCOPED_IMPL__(ident__, f__)	\
+	static constexpr ceformat::Format const	\
+	ident__{f__}
 /** @endcond */
+
+// class scope

 /**
 	Build message string literal with class scope.
@@ -111,6 +121,17 @@
 	HORD_MSG_SCOPED_IMPL__(HORD_SCOPE_CLASS, m__)

 /**
+	Define format message with class scope.
+
+	@param ident__ Identifier for format message.
+	@param f__ Format message.
+*/
+#define HORD_FMT_SCOPED_CLASS(ident__, f__) \
+	HORD_FMT_SCOPED_IMPL__(ident__, HORD_MSG_SCOPED_CLASS(f__))
+
+// function scope
+
+/**
 	Build message string literal with function scope.

 	@param m__ Message.
@@ -119,12 +140,32 @@
 	HORD_MSG_SCOPED_IMPL__(HORD_SCOPE_FUNC, m__)

 /**
+	Define format message with function scope.
+
+	@param ident__ Identifier for format message.
+	@param f__ Format message.
+*/
+#define HORD_FMT_SCOPED_FUNC(ident__, f__) \
+	HORD_FMT_SCOPED_IMPL__(ident__, HORD_MSG_SCOPED_FUNC(f__))
+
+// fully-qualified scope
+
+/**
 	Build message string literal with fully-qualified scope.

 	@param m__ Message.
 */
 #define HORD_MSG_SCOPED_FQN(m__) \
 	HORD_MSG_SCOPED_IMPL__(HORD_SCOPE_FQN, m__)
+
+/**
+	Define format message with fully-qualified scope.
+
+	@param ident__ Identifier for format message.
+	@param f__ Format message.
+*/
+#define HORD_FMT_SCOPED_FQN(ident__, f__) \
+	HORD_FMT_SCOPED_IMPL__(ident__, HORD_MSG_SCOPED_FQN(f__))

 /** @cond INTERNAL */
 #define HORD_THROW_ERROR_IMPL__(e__, m__)	\
@@ -153,6 +194,19 @@
 	HORD_THROW_ERROR_IMPL__(e__, m__)

 /**
+	Throw error with format message.
+
+	@param e__ ErrorCode.
+	@param f__ @c ceformat::Format message.
+	@param ... Arguments.
+*/
+#define HORD_THROW_ERROR_F(e__, f__, ...)	\
+	HORD_THROW_ERROR_IMPL__(				\
+		e__,								\
+		ceformat::print<f__>(__VA_ARGS__)	\
+	)
+
+/**
 	Throw error with class scope.

 	@param e__ ErrorCode.


FIX (#3149): use testing macros consistently

--- Core/Code/Testing/mitkImageWriterTest.cpp
+++ Core/Code/Testing/mitkImageWriterTest.cpp
@@ -22,7 +22,7 @@
 #include <iostream>

 /**
-*  Simple example for a test for the (non-existent) class "ImageWriter".
+*  test for "ImageWriter".
 *
 *  argc and argv are the command line parameters which were passed to
 *  the ADD_TEST command in the CMakeLists.txt file. For the automatic
@@ -46,57 +46,52 @@
     // do not write to std::cout and do not return from this function yourself!

     // load image
-    std::cout << "Loading file: " << std::flush;
-  if(argc==0)
-  {
-    std::cout<<"no file specified [FAILED]"<<std::endl;
-    return EXIT_FAILURE;
-  }
+
+  MITK_TEST_CONDITION_REQUIRED(argc != 0, "File to load has been specified");
+
+
   mitk::Image::Pointer image = NULL;
   mitk::DataTreeNodeFactory::Pointer factory = mitk::DataTreeNodeFactory::New();
+
   try
   {
-    std::cout<<argv[1]<<std::endl;
+    MITK_TEST_OUTPUT(<< "Loading file: " << argv[1]);
     factory->SetFileName( argv[1] );
     factory->Update();
-
-    if(factory->GetNumberOfOutputs()<1)
-    {
-      std::cout<<"file could not be loaded [FAILED]"<<std::endl;
-      return EXIT_FAILURE;
-    }
+    MITK_TEST_CONDITION_REQUIRED(factory->GetNumberOfOutputs() > 0, "file loaded");
+
     mitk::DataTreeNode::Pointer node = factory->GetOutput( 0 );
     image = dynamic_cast<mitk::Image*>(node->GetData());
     if(image.IsNull())
     {
-      std::cout<<"file "<< argv[1]<< "is not an image - test will not be applied [PASSED]"<<std::endl;
+      std::cout<<"file "<< argv[1]<< "is not an image - test will not be applied."<<std::endl;
       std::cout<<"[TEST DONE]"<<std::endl;
       return EXIT_SUCCESS;
-    }
+    }
   }
-  catch ( itk::ExceptionObject & ex )
+  catch (itk::ExceptionObject & ex)
   {
-    std::cout << "Exception: " << ex << "[FAILED]" << std::endl;
-    return EXIT_FAILURE;
+    MITK_TEST_FAILED_MSG(<< "Exception during file loading: " << ex.GetDescription());
   }
+

   MITK_TEST_CONDITION_REQUIRED(image.IsNotNull(),"loaded image not NULL")

-    try{
-      // test for exception handling
-      MITK_TEST_FOR_EXCEPTION_BEGIN(itk::ExceptionObject)
-      myImageWriter->SetInput(image);
-      myImageWriter->SetFileName("/usr/bin");
-      myImageWriter->Update();
-      MITK_TEST_FOR_EXCEPTION_END(itk::ExceptionObject)
+
+  // test for exception handling
+  try
+  {
+    MITK_TEST_FOR_EXCEPTION_BEGIN(itk::ExceptionObject)
+    myImageWriter->SetInput(image);
+    myImageWriter->SetFileName("/usr/bin");
+    myImageWriter->Update();
+    MITK_TEST_FOR_EXCEPTION_END(itk::ExceptionObject)
   }
   catch(...) {
     //this means that a wrong exception (i.e. no itk:Exception) has been thrown
-    std::cout << "Wrong exception (i.e. no itk:Exception) caught during write [FAILED]" << std::endl;
-    return EXIT_FAILURE;
+    MITK_TEST_FAILED_MSG(<< "Wrong exception (i.e. no itk:Exception) caught during write");
   }

   // always end with this!
-  MITK_TEST_END()
+  MITK_TEST_END();
 }
-


added 0,0 to GetVtkImageData

added 0,0 to GetVtkImageData

--- Core/Code/Rendering/mitkImageVtkMapper2D.cpp
+++ Core/Code/Rendering/mitkImageVtkMapper2D.cpp
@@ -72,7 +72,7 @@
   if ( input.IsNull() ) return ;

-  vtkSmartPointer<vtkImageData> image = input->GetVtkImageData();
+  vtkSmartPointer<vtkImageData> image = input->GetVtkImageData(0,0);
 //  image->SetScalarTypeToUnsignedChar();
 //  vtkSmartPointer<vtkImageShiftScale> imageShiftSacle = vtkImageShiftScale::New();
 //  imageShiftSacle->SetOutputScalarTypeToUnsignedChar();


Add some really really simple code for computing sign-bit propagation.

This will certainly be enhanced in the future.

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

--- lib/CodeGen/SelectionDAG/TargetLowering.cpp
+++ lib/CodeGen/SelectionDAG/TargetLowering.cpp
@@ -995,6 +995,101 @@
   KnownOne = 0;
 }

+/// ComputeNumSignBits - Return the number of times the sign bit of the
+/// register is replicated into the other bits.  We know that at least 1 bit
+/// is always equal to the sign bit (itself), but other cases can give us
+/// information.  For example, immediately after an "SRA X, 2", we know that
+/// the top 3 bits are all equal to each other, so we return 3.
+unsigned TargetLowering::ComputeNumSignBits(SDOperand Op, unsigned Depth) const{
+  MVT::ValueType VT = Op.getValueType();
+  assert(MVT::isInteger(VT) && "Invalid VT!");
+  unsigned VTBits = MVT::getSizeInBits(VT);
+  unsigned Tmp, Tmp2;
+
+  if (Depth == 6)
+    return 1;  // Limit search depth.
+
+  switch (Op.getOpcode()) {
+  default:
+    // Allow the target to implement this method for its nodes.
+    if (Op.getOpcode() >= ISD::BUILTIN_OP_END) {
+  case ISD::INTRINSIC_WO_CHAIN:
+  case ISD::INTRINSIC_W_CHAIN:
+  case ISD::INTRINSIC_VOID:
+      unsigned NumBits = ComputeNumSignBitsForTargetNode(Op, Depth);
+      if (NumBits > 1) return NumBits;
+    }
+
+    // FIXME: Should use computemaskedbits to look at the top bits.
+    return 1;
+
+  case ISD::AssertSext:
+    Tmp = MVT::getSizeInBits(cast<VTSDNode>(Op.getOperand(1))->getVT());
+    return VTBits-Tmp+1;
+  case ISD::AssertZext:
+    Tmp = MVT::getSizeInBits(cast<VTSDNode>(Op.getOperand(1))->getVT());
+    return VTBits-Tmp;
+
+  case ISD::SIGN_EXTEND_INREG:
+    // Max of the input and what this extends.
+    Tmp = MVT::getSizeInBits(cast<VTSDNode>(Op.getOperand(1))->getVT());
+    Tmp = VTBits-Tmp+1;
+
+    Tmp2 = ComputeNumSignBits(Op.getOperand(0), Depth+1);
+    return std::max(Tmp, Tmp2);
+
+  case ISD::SRA:
+    Tmp = ComputeNumSignBits(Op.getOperand(0), Depth+1);
+    // SRA X, C   -> adds C sign bits.
+    if (ConstantSDNode *C = dyn_cast<ConstantSDNode>(Op.getOperand(1))) {
+      Tmp += C->getValue();
+      if (Tmp > VTBits) Tmp = VTBits;
+    }
+    return Tmp;
+
+  case ISD::ADD:
+  case ISD::SUB:
+    // Add and sub can have at most one carry bit.  Thus we know that the output
+    // is, at worst, one more bit than the inputs.
+    Tmp = ComputeNumSignBits(Op.getOperand(0), Depth+1);
+    if (Tmp == 1) return 1;
+    Tmp2 = ComputeNumSignBits(Op.getOperand(1), Depth+1);
+    if (Tmp2 == 1) return 1;
+    return std::min(Tmp, Tmp2)-1;
+
+  //case ISD::ZEXTLOAD:   // 16 bits known
+  //case ISD::SEXTLOAD:   // 17 bits known
+  //case ISD::Constant:
+  //case ISD::SIGN_EXTEND:
+  //
+  }
+
+#if 0
+  // fold (sext_in_reg (setcc x)) -> setcc x iff (setcc x) == 0 or -1
+  if (N0.getOpcode() == ISD::SETCC &&
+      TLI.getSetCCResultContents() ==
+      TargetLowering::ZeroOrNegativeOneSetCCResult)
+    return N0;
+#endif
+}
+
+
+
+/// ComputeNumSignBitsForTargetNode - This method can be implemented by
+/// targets that want to expose additional information about sign bits to the
+/// DAG Combiner.
+unsigned TargetLowering::ComputeNumSignBitsForTargetNode(SDOperand Op,
+                                                         unsigned Depth) const {
+  assert((Op.getOpcode() >= ISD::BUILTIN_OP_END ||
+          Op.getOpcode() == ISD::INTRINSIC_WO_CHAIN ||
+          Op.getOpcode() == ISD::INTRINSIC_W_CHAIN ||
+          Op.getOpcode() == ISD::INTRINSIC_VOID) &&
+         "Should use ComputeNumSignBits if you don't know whether Op"
+         " is a target node!");
+  return 1;
+}
+
+
 SDOperand TargetLowering::
 PerformDAGCombine(SDNode *N, DAGCombinerInfo &DCI) const {
   // Default implementation: no optimization.


[TargetLowering] In BuildSDIV, add the MULHS/SMUL_LOHI to the Created vector.

BuildUDIV was already correct.

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

--- lib/CodeGen/SelectionDAG/TargetLowering.cpp
+++ lib/CodeGen/SelectionDAG/TargetLowering.cpp
@@ -3494,6 +3494,9 @@
                               DAG.getConstant(magics.m, dl, VT)).getNode(), 1);
   else
     return SDValue();       // No mulhs or equvialent
+
+  Created.push_back(Q.getNode());
+
   // If d > 0 and m < 0, add the numerator
   if (Divisor.isStrictlyPositive() && magics.m.isNegative()) {
     Q = DAG.getNode(ISD::ADD, dl, VT, Q, N->getOperand(0));