Update tiramisu_function.cpp

Update tiramisu_function.cpp

--- src/tiramisu_function.cpp
+++ src/tiramisu_function.cpp
@@ -132,11 +132,16 @@
  * Automatic_communication fonction verifies if the user wants to manage the copies manually or not.
  * By default, the data management will be done automatically, and the copies will be inserted
  * in the begining and at the end of the gpu funcion.
+ * The inputs of the function will be copied to the device before the computations, and the
+ * outputs of the functions will be copied back to the host at the end.
+ * We have two cases copies to constant memory and the default case which is copies to the global memory.
  */
 const int  &function::Automatic_communication(tiramisu::computation* c1, tiramisu::computation* c2) const
 {
+    assert(c1 != nullptr && "C1 = NULL ");
+    assert(c2 != nullptr && "C2 = NULL ");
     assert(c1->get_predecessor() == nullptr && "C1 must be the computation that hasn't a predessessor ");
-    assert(c2->get_successor() == nullptr && "C1 must be the computation that hasn't a successor ");
+    assert(c2->get_successor() == nullptr && "C2 must be the computation that hasn't a successor ");
     std::map<std::string, tiramisu::buffer*> buff = this->get_buffers();
     std::map<std::string, tiramisu::buffer*> mp = this->mapping;
     std::map<std::string, tiramisu::buffer*>::iterator it ;
@@ -144,74 +149,47 @@
     int i = 1;
     tiramisu::computation* first_cpt = c1;
     tiramisu::computation* last_cpt = c2;
-    tiramisu::buffer* gpu_buffer;
-    for (it = buff.begin(); it != buff.end(); ++it)
-    {
-      name = it->second->get_name();
-      if ((it->second->get_argument_type() != tiramisu::a_temporary ) && (mp.find(name) != mp.end()))
-        {
-            gpu_buffer = buff.find(mp.find(name)->second->get_name())->second;
+    for (it = mp.begin(); it != mp.end(); ++it)
+    {
+      name = it->first;
+      assert(it->second->get_argument_type() == tiramisu::a_temporary  && "Mapping field should contain a string corresponding to the name of a cpu buffer and a ptr to the corresponding gpu buffer ");
+      if (it->second->automatic_gpu_copy == true)
+        {
             cpt_name= "cpt" + std::to_string(i);
             i++;
-            switch (gpu_buffer->location)
+            switch (it->second->location)
             {
                 case cuda_ast::memory_location::constant :
-                if ((it->second->get_argument_type() == tiramisu::a_input) && (gpu_buffer->automatic_gpu_copy == true))
+                if (buff.find(name)->second->get_argument_type() == tiramisu::a_input)
                 {
                     tiramisu::computation* c =  new tiramisu::computation(cpt_name, {},
-                    memcpy((*(it->second)), *(buff.find(mp.find(name)->second->get_name())->second)));
+                    memcpy(*(buff.find(name)->second),(*(it->second))));
                     (*c).then((*first_cpt), computation::root);
                     first_cpt = c;
                 }
-                else
+                break;
+                default:
+                if (buff.find(name)->second->get_argument_type() == tiramisu::a_input)
                 {
-                   if (gpu_buffer->automatic_gpu_copy == false)
-                   {
-                        DEBUG(3, tiramisu::str_dump("Communication should be done manually"));
-                   }
+                    tiramisu::computation* c =  new tiramisu::computation(cpt_name, {},
+                    memcpy(*(buff.find(name)->second),(*(it->second))));
+                    (*c).then((*first_cpt), computation::root);
+                    first_cpt = c;
                 }
-
-                break;
-                default:  // location is the gloabl memory
-                if ((it->second->get_argument_type() == tiramisu::a_input) && (gpu_buffer->automatic_gpu_copy == true))
+                if (buff.find(name)->second->get_argument_type() == tiramisu::a_output)
                 {
-                        tiramisu::computation* c =  new tiramisu::computation(cpt_name, {},
-                        memcpy((*(it->second)), *(buff.find(mp.find(name)->second->get_name())->second)));
-                        (*c).then((*first_cpt), computation::root);
-                        first_cpt = c;                }
-                else
-                {
-                   if (gpu_buffer->automatic_gpu_copy == false)
-                   {
-                       DEBUG(3, tiramisu::str_dump("Communication should be done manually"));
-                   }
-                }
-                if ((it->second->get_argument_type() == tiramisu::a_output) && (gpu_buffer->automatic_gpu_copy == true))
-                {
-                        tiramisu::computation* c =  new tiramisu::computation(cpt_name, {},
-                        memcpy(*(buff.find(mp.find(name)->second->get_name())->second), (*(it->second))));
-                        (*last_cpt).then((*c), computation::root);
-                        last_cpt = c;
-                }
-                else
-                {
-                   if (gpu_buffer->automatic_gpu_copy == false)
-                   {
-                       DEBUG(3, tiramisu::str_dump("Communication should be done manually"));
-                   }
+                    tiramisu::computation* c =  new tiramisu::computation(cpt_name, {},
+                    memcpy((*(it->second)),*(buff.find(name)->second)));
+                    (*last_cpt).then((*c), computation::root);
+                    last_cpt = c;
                 }
                 break;
             }
         } else
-            if (mp.find(name) == mp.end())
-               {
-                    DEBUG(3, tiramisu::str_dump("Corresponding CPU buffer not found!"));
-               }
+            DEBUG(3, tiramisu::str_dump("Communication should be done manually !"));
     }
     return 0;
 }
-
-

 // TODO: get_live_in_computations() does not consider the case of "maybe"
 // live-out (non-affine control flow, ...).


add -quick option to condor_who for use in test suite #4147 -quick modifies -daemons so the result is quick (and possibly stale). ===VersionHistory:None=== not a user visible option.

--- src/condor_who/who.cpp
+++ src/condor_who/who.cpp
@@ -71,12 +71,15 @@
 typedef std::map<std::string, pid_t> MAP_STRING_TO_PID;
 typedef std::map<pid_t, std::string> MAP_STRING_FROM_PID;
 typedef std::map<std::string, std::vector<std::string> > TABULAR_MAP;
+typedef std::map<std::string, std::string> MAP_STRING_TO_STRING;

 //char	*param();
 static void query_log_dir(const char * log_dir, LOG_INFO_MAP & info);
 static void print_log_info(LOG_INFO_MAP & info);
-static void print_daemon_info(LOG_INFO_MAP & info);
+static void print_daemon_info(LOG_INFO_MAP & info, bool fQuick);
 static void scan_logs_for_info(LOG_INFO_MAP & info, MAP_STRING_TO_PID & job_to_pid, bool fAddressesOnly);
+static void scan_a_log_for_info(LOG_INFO_MAP & info, MAP_STRING_TO_PID & job_to_pid, LOG_INFO_MAP::const_iterator & it);
+
 static void query_daemons_for_pids(LOG_INFO_MAP & info);
 static void ping_all_known_addrs(LOG_INFO_MAP & info);
 static char * get_daemon_param(const char * addr, const char * param_name);
@@ -98,6 +101,8 @@
 	bool   show_full_ads;
 	bool   show_job_ad;     // debugging
 	bool   scan_pids;       // query all schedds found via ps/tasklist
+	bool   quick_scan;      // do only the scanning that can be done quickly (i.e. no talking to daemons)
+	bool   timed_scan;
 	bool   ping_all_addrs;	 //
 	int    test_backward;   // test backward reading code.
 	vector<pid_t> query_pids;
@@ -106,6 +111,8 @@
 	vector<const char *> constraint;

 	// hold temporary results.
+	MAP_STRING_TO_STRING file_to_daemon; // map condor_xxxx_yyyy to daemon name XxxxxYyyy
+	MAP_STRING_TO_STRING log_to_daemon;  // map XxxYyyLog to daemon name XxxYyy
 	MAP_STRING_TO_PID   job_to_pid;
 	MAP_STRING_FROM_PID pid_to_program;	// pid to program/command line
 	MAP_STRING_FROM_PID pid_to_addr; // pid to sinful address
@@ -123,8 +130,22 @@
 	App.show_full_ads = false;
 	App.show_job_ad = false;     // debugging
 	App.scan_pids = false;
+	App.quick_scan = false;
 	App.ping_all_addrs = false;
 	App.test_backward = false;
+
+	// map Log name to daemon name for those that don't match the rule : 'remove Log'
+	App.log_to_daemon["Sched"] = "Schedd";
+	App.log_to_daemon["Start"] = "Startd";
+	App.log_to_daemon["Match"] = "Negotiator";
+	App.log_to_daemon["Cred"]  = "Credd";
+	App.log_to_daemon["Kbd"] = "Kbdd";
+
+	// map executable name to daemon name for those that don't match the rule : 'remove condor_ and lowercase'
+	App.file_to_daemon["shared_port"] = "SharedPort";
+	App.file_to_daemon["job_router"]  = "JobRouter";
+	App.file_to_daemon["ckpt_server"] = "CkptServer";
+
 }

 	// Tell folks how to use this program
@@ -983,6 +1004,10 @@
 				App.verbose = true;
 			} else if (IsArg(parg, "daemons", 3)) {
 				App.show_daemons = true;
+			} else if (IsArg(parg, "quick", 4)) {
+				App.quick_scan = true;
+			} else if (IsArg(parg, "timed", 5)) {
+				App.timed_scan = true;
 			} else if (IsArg(parg, "address", 4)) {
 				if ( ! argv[ixArg+1] || *argv[ixArg+1] == '-') {
 					fprintf(stderr, "Error: Argument %s requires a host address\n", argv[ixArg]);
@@ -1272,6 +1297,7 @@
 int
 main( int argc, char *argv[] )
 {
+	time_t begin_time = time(NULL);
 	InitAppGlobals(argv[0]);

 #if !defined(WIN32)
@@ -1317,7 +1343,12 @@
 		for (size_t ii = 0; ii < App.query_log_dirs.size(); ++ii) {
 			LOG_INFO_MAP info;
 			query_log_dir(App.query_log_dirs[ii], info);
-			scan_logs_for_info(info, App.job_to_pid, fAddressesOnly);
+			if (App.quick_scan) {
+				LOG_INFO_MAP::const_iterator it = info.find("Master");
+				if (it != info.end()) { scan_a_log_for_info(info, App.job_to_pid, it); }
+			} else {
+				scan_logs_for_info(info, App.job_to_pid, fAddressesOnly);
+			}

 			// if we got a STARTD address, push it's address onto the list
 			// that we want to query.
@@ -1330,17 +1361,25 @@
 			}

 			if(App.ping_all_addrs) { ping_all_known_addrs(info); }
-			// fill in missing PIDS for daemons by sending them DC_CONFIG_VAL commands
-			query_daemons_for_pids(info);
+
+			if ( ! App.quick_scan) {
+				// fill in missing PIDS for daemons by sending them DC_CONFIG_VAL commands
+				query_daemons_for_pids(info);
+			}

 			if (App.diagnostic || App.verbose) {
 				printf("\nLOG directory \"%s\"\n", App.query_log_dirs[ii]);
 				print_log_info(info);
 			} else if (App.show_daemons) {
 				printf("\nLOG directory \"%s\"\n", App.query_log_dirs[ii]);
-				print_daemon_info(info);
-			}
-		}
+				print_daemon_info(info, App.quick_scan);
+			}
+		}
+	}
+
+	if (App.show_daemons && App.quick_scan) {
+		if (App.timed_scan) { printf("%d seconds\n", (int)(time(NULL) - begin_time)); }
+		exit(0);
 	}

 	// build a table of info from the output of ps or tasklist
@@ -1390,7 +1429,7 @@
 							if (App.diagnostic || App.verbose) {
 								print_log_info(info);
 							} else if (App.show_daemons) {
-								print_daemon_info(info);
+								print_daemon_info(info, false);
 							}
 							free(logdir);
 						}
@@ -1401,6 +1440,7 @@
 	}

 	if (App.show_daemons) {
+		if (App.timed_scan) { printf("%d seconds\n", (int)(time(NULL) - begin_time)); }
 		exit(0);
 	}

@@ -1750,7 +1790,12 @@
 						std::string daemon = line.substr(ix2, ix3-ix2);
 						std::string pid = line.substr(ix3+cch3, ix4-ix3-cch3);
 						lower_case(daemon);
-						daemon[0] = toupper(daemon[0]);
+						MAP_STRING_TO_STRING::const_iterator alt = App.file_to_daemon.find(daemon);
+						if (alt != App.file_to_daemon.end()) {
+							daemon = alt->second;
+						} else {
+							daemon[0] = toupper(daemon[0]);
+						}
 						if (info.find(daemon) != info.end()) {
 							LOG_INFO * pliTemp = info[daemon];
 							if (pliTemp->pid.empty()) {
@@ -1778,7 +1823,12 @@
 						if (ix4 > ix3 && ix4 < ix2) {
 							std::string daemon = line.substr(ix3+cch3,ix4-ix3-cch3);
 							lower_case(daemon);
-							daemon[0] = toupper(daemon[0]);
+							MAP_STRING_TO_STRING::const_iterator alt = App.file_to_daemon.find(daemon);
+							if (alt != App.file_to_daemon.end()) {
+								daemon = alt->second;
+							} else {
+								daemon[0] = toupper(daemon[0]);
+							}
 							if (info.find(daemon) != info.end()) {
 								LOG_INFO * pliD = info[daemon];
 								if (pliD->pid.empty()) {
@@ -1981,19 +2031,27 @@
 			//if (App.diagnostic) printf("\t\tAddress file: %s\n", name.c_str());
 		} else if (ends_with(file, "Log", &pu)) {
 			name.insert(0, file, pu-file);
+			MAP_STRING_TO_STRING::const_iterator alt = App.log_to_daemon.find(name);
+			if (alt != App.log_to_daemon.end()) { name = alt->second; }
+			/*
 			if (name == "Sched") name = "Schedd"; // the schedd log is called SchedLog
 			if (name == "Start") name = "Startd"; // the startd log is called StartLog
 			if (name == "Match") name = "Negotiator"; // the Match log is a secondary Negotiator log
 			if (name == "Cred") name = "Credd"; // the credd log is called CredLog
 			if (name == "Kbd") name = "Kbdd"; // the kbdd log is called KbdLog
+			*/
 			filetype = 2; // log
 		} else if (ends_with(file, "Log.old", &pu)) {
 			name.insert(0, file, pu-file);
+			MAP_STRING_TO_STRING::const_iterator alt = App.log_to_daemon.find(name);
+			if (alt != App.log_to_daemon.end()) { name = alt->second; }
+			/*
 			if (name == "Sched") name = "Schedd"; // the schedd log is called SchedLog
 			if (name == "Start") name = "Startd"; // the startd log is called StartLog
 			if (name == "Match") name = "Negotiator"; // the Match log is a secondary Negotiator log
 			if (name == "Cred") name = "Credd";
 			if (name == "Kbd") name = "Kbdd";
+			*/
 			filetype = 3; // previous.log
 		} else if (starts_with(file, "StarterLog.", &pu)) {
 			const char * pname = pu;
@@ -2046,11 +2104,16 @@
 	}
 }

-void print_daemon_info(LOG_INFO_MAP & info)
+void print_daemon_info(LOG_INFO_MAP & info, bool fQuick)
 {
 	printf("\n");
-	printf("%-12s %-6s %-6s %-6s %-6s %-24s %s\n", "Daemon", "Alive", "PID", "PPID", "Exit", "Addr", "Executable");
-	printf("%-12s %-6s %-6s %-6s %-6s %-24s %s\n", "------", "-----", "---", "----", "----", "----", "----------");
+	if (fQuick) {
+		printf("%-12s %-6s %-6s %s\n", "Daemon", "PID", "Exit", "Addr");
+		printf("%-12s %-6s %-6s %s\n", "------", "---", "----", "----");
+	} else {
+		printf("%-12s %-6s %-6s %-6s %-6s %-24s %s\n", "Daemon", "Alive", "PID", "PPID", "Exit", "Addr", "Executable");
+		printf("%-12s %-6s %-6s %-6s %-6s %-24s %s\n", "------", "-----", "---", "----", "----", "----", "----------");
+	}
 	for (LOG_INFO_MAP::const_iterator it = info.begin(); it != info.end(); ++it)
 	{
 		LOG_INFO * pli = it->second;
@@ -2071,7 +2134,7 @@

 		char * pexe = NULL;
 		char * ppid = NULL;
-		if ( ! pli->addr.empty() && ! pli->pid.empty() && pli->exit_code.empty()) {
+		if ( ! fQuick && ! pli->addr.empty() && ! pli->pid.empty() && pli->exit_code.empty()) {
 			ppid = get_daemon_param(pli->addr.c_str(), "PPID");
 			if (ppid) {
 				active = true;
@@ -2079,13 +2142,17 @@
 			}
 		}

-		printf("%-12s %-6s %-6s %-6s %-6s %-24s %s\n",
-			it->first.c_str(),
-			active ? "yes" : "no",
-			pid, ppid ? ppid : "no", exit,
-			pli->addr.c_str(),
-			pexe ? pexe : pli->exe_path.c_str()
-		);
+		if (fQuick) {
+			printf("%-12s %-6s %-6s %s\n", it->first.c_str(), pid, exit, pli->addr.c_str());
+		} else {
+			printf("%-12s %-6s %-6s %-6s %-6s %-24s %s\n",
+				it->first.c_str(),
+				active ? "yes" : "no",
+				pid, ppid ? ppid : "no", exit,
+				pli->addr.c_str(),
+				pexe ? pexe : pli->exe_path.c_str()
+			);
+		}

 		if (pexe) free(pexe);
 		if (ppid) free(ppid);


Disable option to import bookmarks on ChromeOS from wrench menu.

BUG=chromium-os:15889
TEST=Click on Wrench Menu, and look at the Bookmarks submenu. There should not be an option to Import Bookmarks and Settings.
Review URL: http://codereview.chromium.org/7044135

git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@88858 0039d316-1c4b-4281-b951-d872f2087c98

--- chrome/browser/ui/toolbar/wrench_menu_model.cc
+++ chrome/browser/ui/toolbar/wrench_menu_model.cc
@@ -200,7 +200,9 @@
 void BookmarkSubMenuModel::Build(Browser* browser) {
   AddCheckItemWithStringId(IDC_SHOW_BOOKMARK_BAR, IDS_SHOW_BOOKMARK_BAR);
   AddItemWithStringId(IDC_SHOW_BOOKMARK_MANAGER, IDS_BOOKMARK_MANAGER);
+#if !defined(OS_CHROMEOS)
   AddItemWithStringId(IDC_IMPORT_SETTINGS, IDS_IMPORT_SETTINGS_TITLE);
+#endif
 #if defined(OS_MACOSX) || defined(TOOLKIT_VIEWS)
   AddSeparator();
 #else


chromeos: Add halo to secure/VPN network badge.

This switches to a lock new image from kenmoore@ that
includes a white halo so it'll remain visible when using
dark themes.  The new image is a bit larger than the old
one, so I'm also updating the badging code to ensure that
badges don't get clipped.

BUG=chromium-os:21110
TEST=manual: made code always display vpn badge and checked that it looks fine against default and Johnny Cash themes

Review URL: http://codereview.chromium.org/8136020

git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@104069 0039d316-1c4b-4281-b951-d872f2087c98

--- chrome/browser/chromeos/status/network_menu_icon.cc
+++ chrome/browser/chromeos/status/network_menu_icon.cc
@@ -4,7 +4,8 @@

 #include "chrome/browser/chromeos/status/network_menu_icon.h"

-#include <math.h>
+#include <algorithm>
+#include <cmath>

 #include "base/utf_string_conversions.h"
 #include "chrome/browser/chromeos/cros/cros_library.h"
@@ -15,6 +16,9 @@
 #include "ui/gfx/canvas_skia.h"
 #include "ui/gfx/skbitmap_operations.h"

+using std::max;
+using std::min;
+
 namespace chromeos {

 namespace {
@@ -33,7 +37,8 @@
 const int kNumArcsImages = 5;
 SkBitmap kArcsImagesAnimating[kNumArcsImages - 1];

-// Badge offsets.
+// Badge offsets.  If a badge is large enough that it won't fit within the icon
+// when using the right or bottom offset, it gets shifted inwards so it will.
 const int kBadgeLeftX = 0;
 const int kBadgeRightX = 14;
 const int kBadgeTopY = 0;
@@ -50,7 +55,7 @@
     float findex = (static_cast<float>(strength) / 100.0f) *
         nextafter(static_cast<float>(count), 0);
     int index = 1 + static_cast<int>(findex);
-    index = std::max(std::min(index, count), 1);
+    index = max(min(index, count), 1);
     return index;
   }
 }
@@ -480,7 +485,7 @@
   }
   int index = static_cast<int>(
       animation * nextafter(static_cast<float>(image_count), 0));
-  index = std::max(std::min(index, image_count - 1), 0);
+  index = max(min(index, image_count - 1), 0);

   // Lazily cache images.
   if (images[index].empty()) {
@@ -618,20 +623,20 @@
   canvas.DrawBitmapInt(icon, 0, 0);

   if (top_left_badge) {
-    canvas.DrawBitmapInt(
-        *top_left_badge, kBadgeLeftX, kBadgeTopY);
+    canvas.DrawBitmapInt(*top_left_badge, kBadgeLeftX, kBadgeTopY);
   }
   if (top_right_badge) {
-    canvas.DrawBitmapInt(
-        *top_right_badge, kBadgeRightX, kBadgeTopY);
+    int x = min(kBadgeRightX, icon.width() - top_right_badge->width());
+    canvas.DrawBitmapInt(*top_right_badge, x, kBadgeTopY);
   }
   if (bottom_left_badge) {
-    canvas.DrawBitmapInt(
-        *bottom_left_badge, kBadgeLeftX, kBadgeBottomY);
+    int y = min(kBadgeBottomY, icon.height() - bottom_left_badge->height());
+    canvas.DrawBitmapInt(*bottom_left_badge, kBadgeLeftX, y);
   }
   if (bottom_right_badge) {
-    canvas.DrawBitmapInt(
-        *bottom_right_badge, kBadgeRightX, kBadgeBottomY);
+    int x = min(kBadgeRightX, icon.width() - bottom_right_badge->width());
+    int y = min(kBadgeBottomY, icon.height() - bottom_right_badge->height());
+    canvas.DrawBitmapInt(*bottom_right_badge, x, y);
   }

   return canvas.ExtractBitmap();


Cloud Print Proxy error handling.

Cloud Print Proxy error handling.

StartDoc returns <= 0 on failure, including when the user cancels out
of the save dialog on Windows 7.

BUG=none
TEST=Print to the Windows XPS printer, when the proxy brings up the save dialog, cancel.  Proxy should stay running.

Review URL: http://codereview.chromium.org/3546001

git-svn-id: http://src.chromium.org/svn/trunk/src@60875 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

Former-commit-id: 3d3286ce798da7fa7fd3d92fd7b56b86a1c2b46d

--- chrome/service/cloud_print/print_system_win.cc
+++ chrome/service/cloud_print/print_system_win.cc
@@ -411,7 +411,7 @@
         std::wstring doc_name = UTF8ToWide(job_title);
         di.lpszDocName = doc_name.c_str();
         job_id_ = StartDoc(dc, &di);
-        if (SP_ERROR == job_id_)
+        if (job_id_ <= 0)
           return false;

         printer_dc_.Set(dc);


Release FunctionLibraryRuntime::Handle in IsCompilableCall.

PiperOrigin-RevId: 209105961

--- tensorflow/compiler/jit/mark_for_compilation_pass.cc
+++ tensorflow/compiler/jit/mark_for_compilation_pass.cc
@@ -39,6 +39,7 @@
 #include "tensorflow/core/graph/algorithm.h"
 #include "tensorflow/core/graph/control_flow.h"
 #include "tensorflow/core/kernels/bounds_check.h"
+#include "tensorflow/core/lib/gtl/cleanup.h"
 #include "tensorflow/core/lib/strings/strcat.h"
 #include "tensorflow/core/lib/strings/stringprintf.h"
 #include "tensorflow/core/public/version.h"
@@ -142,6 +143,10 @@
             << ": could not instantiate: " << status;
     return false;
   }
+
+  auto release_handle_on_return = gtl::MakeCleanup(
+      [&] { TF_CHECK_OK(lib_runtime->ReleaseHandle(handle)); });
+
   const FunctionBody* fbody = lib_runtime->GetFunctionBody(handle);
   CHECK(fbody);
   const FunctionDef& fdef = fbody->fdef;


Removed dead code from Robot.ccp namely commented motor code and STOPANDTHINK

--- 2012/software/roxi/Robot.cpp
+++ 2012/software/roxi/Robot.cpp
@@ -15,7 +15,7 @@
 #define PRINTFRAMERATE 0

-//#define STOPANDTHINK
+

 /*********** GLUT callbacks and functions ***********************/
 pthread_t Robot::robotThread; // for pthread_create
@@ -205,20 +205,6 @@
 	/* setup slam processing module */
 	mapper.init();

-	/* connect to motors */
-	if (useMotors)
-	{
-		//deprecated - old motors
-		#if 0
-		motors.set_max_speed(motorsMaxSpeed);
-		if (0!=motors.SetupSerial())
-		{
-			printf("Motors Connect Fail !\n");
-			return 0; // fail
-		}
-		#endif
-	}
-
 	/* success */
 	return 1;
 }
@@ -449,58 +435,13 @@
 		}
 	}

-#ifdef STOPANDTHINK
-	/* periodically stop and think */
-	static int hack = 0;
-	int hackstop = 76; //80;
-
-	if ( hack > hackstop )
-	{
-		heading_main.x = 0;
-		heading_main.y = 0;
-		//hack = 0;
-		printf("\n\n\n\tSTOP HACK\t\n\n\n");
-		//motors.set_motors(-20, -20);
-		//motors.set_motors(hack/8, hack/8);
-		{
-			boost::mutex::scoped_lock lock(velmutex);
-			yvel = 0;
-			xvel = 0;
-			//osmcd->set_motors(hack, hack);//will get picked up on next update
-		}
-		if (hack > hackstop+14 )
-		{
-			hack = 0;
-			printf("\n\n\n\tRESUME!!!!!!\t\n\n\n");
-		}
-		++hack;
-		if (!ON_RAMP)
-		{
-			return;// causes robot to go backwards, otherwise it just stops on ramp
-		}
-	}
-	++hack;
-
-//	if(DO_STOPANDTHINK)
-//	{
-//		heading_main.x = 0;
-//		heading_main.y = 0;
-//		DO_STOPANDTHINK = 0;
-//		printf("\n\n\n\tSTOP HACK\t\n\n\n");
-//		motors.set_motors(0, 0);
-//		printf("\n\n\n\tRESUME!!!!!!\t\n\n\n");
-//    }
-#endif

 	/*Save raw image last*/
 	static int imgnum = 0;
-#ifdef STOPANDTHINK
-	if (saveRawVideo && (hack%2==0) )
-#else
+
 	if (saveRawVideo )
-#endif
 	{

 		std::stringstream fname;


Mark DevToolsSanityTest.TestStepIn as flaky on CrOS.

BUG=43479
TEST=none
Review URL: http://codereview.chromium.org/2013007

git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@46637 0039d316-1c4b-4281-b951-d872f2087c98

--- chrome/browser/debugger/devtools_sanity_unittest.cc
+++ chrome/browser/debugger/devtools_sanity_unittest.cc
@@ -378,8 +378,14 @@
   RunTest("testStepOut", kDebuggerStepTestPage);
 }

+#if defined(OS_CHROMEOS)
+#define MAYBE_TestStepIn FLAKY_TestStepIn
+#else
+#define MAYBE_TestStepIn TestStepIn
+#endif
+
 // Tests step in functionality in the debugger.
-IN_PROC_BROWSER_TEST_F(DevToolsSanityTest, TestStepIn) {
+IN_PROC_BROWSER_TEST_F(DevToolsSanityTest, MAYBE_TestStepIn) {
   RunTest("testStepIn", kDebuggerStepTestPage);
 }


boosted_trees: infer the output shapes of Quantiles Op from the input shapes.

PiperOrigin-RevId: 188750079

--- tensorflow/contrib/boosted_trees/ops/quantile_ops.cc
+++ tensorflow/contrib/boosted_trees/ops/quantile_ops.cc
@@ -272,6 +272,20 @@
     .Input("sparse_indices: num_sparse_features * int64")
     .Output("dense_quantiles: num_dense_features * int32")
     .Output("sparse_quantiles: num_sparse_features * int32")
+    .SetShapeFn([](InferenceContext* c) {
+      int num_dense_features;
+      TF_RETURN_IF_ERROR(c->GetAttr("num_dense_features", &num_dense_features));
+      int num_sparse_features;
+      TF_RETURN_IF_ERROR(
+          c->GetAttr("num_sparse_features", &num_sparse_features));
+      // Set output shapes (dense_quantiles and sparse_quantiles) by the
+      // relevant inputs (dense_values and sparse_values). Note that the output
+      // has an additional dimension for dimension_ids.
+      for (int i = 0; i < num_dense_features + num_sparse_features; ++i) {
+        c->set_output(i, c->MakeShape({c->Dim(c->input(i), 0), 2}));
+      }
+      return Status::OK();
+    })
     .Doc(R"doc(
 Computes quantile for each a given list of dense and sparse feature values using
 the given buckets.


Extending the flaky test flag for the InspectSharedWorker interactive test to Linux and Chrome OS.

BUG=89845
TEST=none

TBR=yurys

Review URL: http://codereview.chromium.org/7491008

git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@93610 0039d316-1c4b-4281-b951-d872f2087c98

--- chrome/browser/debugger/devtools_sanity_unittest.cc
+++ chrome/browser/debugger/devtools_sanity_unittest.cc
@@ -435,7 +435,7 @@
   CloseDevToolsWindow();
 }

-#if defined(OS_WINDOWS)
+#if defined(OS_WINDOWS) || defined(OS_LINUX) || defined(OS_CHROMEOS)
 // Flakily fails: http://crbug.com/89845
 #define MAYBE_InspectSharedWorker FLAKY_InspectSharedWorker
 #else


OpenCC CLI: if -i and -o are *literally* the same, create a temporary file for input

--- src/tools/CommandLine.cpp
+++ src/tools/CommandLine.cpp
@@ -64,7 +64,7 @@
   fclose(fout);
 }

-void Convert() {
+void Convert(string inputFileName) {
   const int BUFFER_SIZE = 1024 * 1024;
   static bool bufferInitialized = false;
   static string buffer;
@@ -81,9 +81,21 @@
     bufferSizeAvailble = BUFFER_SIZE;
   }

-  FILE* fin = fopen(inputFileName.Get().c_str(), "r");
+  bool needToRemove = false;
+  if (!outputFileName.IsNull() && inputFileName == outputFileName.Get()) {
+    // Special case: input == output
+    const string tempFileName = std::tmpnam(nullptr);
+    std::ifstream src(inputFileName, std::ios::binary);
+    std::ofstream dst(tempFileName, std::ios::binary);
+    dst << src.rdbuf();
+    dst.close();
+    inputFileName = tempFileName;
+    needToRemove = true;
+  }
+
+  FILE* fin = fopen(inputFileName.c_str(), "r");
   if (!fin) {
-    throw FileNotFound(inputFileName.Get());
+    throw FileNotFound(inputFileName);
   }
   FILE* fout = GetOutputStream();
   while (!feof(fin)) {
@@ -123,6 +135,10 @@
     }
   }
   fclose(fout);
+  if (needToRemove) {
+    // Remove temporary file.
+    std::remove(inputFileName.c_str());
+  }
 }

 int main(int argc, const char* argv[]) {
@@ -135,12 +151,12 @@
     TCLAP::ValueArg<string> configArg(
         "c", "config", "Configuration file", false /* required */,
         "s2t.json" /* default */, "file" /* type */, cmd);
-    TCLAP::ValueArg<string> outputArg("o", "output", "Write converted text to",
-                                      false /* required */, "" /* default */,
-                                      "file" /* type */, cmd);
-    TCLAP::ValueArg<string> inputArg("i", "input", "Read original text from",
-                                     false /* required */, "" /* default */,
-                                     "file" /* type */, cmd);
+    TCLAP::ValueArg<string> outputArg(
+        "o", "output", "Write converted text to <file>.", false /* required */,
+        "" /* default */, "file" /* type */, cmd);
+    TCLAP::ValueArg<string> inputArg(
+        "i", "input", "Read original text from <file>.", false /* required */,
+        "" /* default */, "file" /* type */, cmd);
     TCLAP::ValueArg<bool> noFlushArg(
         "", "noflush", "Disable flush for every line", false /* required */,
         false /* default */, "bool" /* type */, cmd);
@@ -159,7 +175,7 @@
     if (lineByLine) {
       ConvertLineByLine();
     } else {
-      Convert();
+      Convert(inputFileName.Get());
     }
   } catch (TCLAP::ArgException& e) {
     std::cerr << "error: " << e.error() << " for arg " << e.argId()


Mark ExtensionApiTest.ExecuteScript DISABLED because it's not only flaky,
but crashy and it has been ignored for weeks!

It's EXTREMELY flaky, #1 flaky test of all time with over 600 flips
in the last three weeks. This test seriously needs some love.

TBR=rafaelw
TEST=none
BUG=28630

Review URL: http://codereview.chromium.org/574030

git-svn-id: http://src.chromium.org/svn/trunk/src@38355 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

Former-commit-id: 3972e4921c74503f7cf51f22ccea2d7ed7b2efa2

--- chrome/browser/extensions/execute_script_apitest.cc
+++ chrome/browser/extensions/execute_script_apitest.cc
@@ -5,9 +5,9 @@
 #include "chrome/browser/extensions/extension_apitest.h"
 #include "net/base/mock_host_resolver.h"

-// This test failed at times on the Vista dbg builder and has been marked as
-// flaky for now. Bug http://code.google.com/p/chromium/issues/detail?id=28630
-IN_PROC_BROWSER_TEST_F(ExtensionApiTest, FLAKY_ExecuteScript) {
+// EXTREMELY flaky, crashy, and bad. See http://crbug.com/28630 and don't dare
+// to re-enable without a real fix or at least adding more debugging info.
+IN_PROC_BROWSER_TEST_F(ExtensionApiTest, DISABLED_ExecuteScript) {
   // We need a.com to be a little bit slow to trigger a race condition.
   host_resolver()->AddRuleWithLatency("a.com", "127.0.0.1", 500);
   host_resolver()->AddRule("b.com", "127.0.0.1");


Disable ExtensionApiTest.TabMuted as it's flaky.

BUG=521410
TBR=miu@chromium.org

Review URL: https://codereview.chromium.org/1291623003

Cr-Commit-Position: 972c6d2dc6dd5efdad1377c0d224e03eb8f276f7@{#343612}

--- chrome/browser/extensions/extension_tabs_apitest.cc
+++ chrome/browser/extensions/extension_tabs_apitest.cc
@@ -61,7 +61,8 @@
   ASSERT_TRUE(RunExtensionSubtest("tabs/basics", "audible.html")) << message_;
 }

-IN_PROC_BROWSER_TEST_F(ExtensionApiTest, TabMuted) {
+// http://crbug.com/521410
+IN_PROC_BROWSER_TEST_F(ExtensionApiTest, DISABLED_TabMuted) {
   ASSERT_TRUE(RunExtensionSubtest("tabs/basics", "muted.html")) << message_;
 }


Mark ExtensionApiTest.Tabs flaky on win and linux.

BUG=58269
TEST=NONE

Review URL: http://codereview.chromium.org/3526023

git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@61777 0039d316-1c4b-4281-b951-d872f2087c98

--- chrome/browser/extensions/extension_tabs_apitest.cc
+++ chrome/browser/extensions/extension_tabs_apitest.cc
@@ -14,7 +14,9 @@
 // http://crbug.com/53779
 #define MAYBE_Tabs FAILS_Tabs
 #else
-#define MAYBE_Tabs Tabs
+// It's flaky on win and linux.
+// http://crbug.com/58269
+#define MAYBE_Tabs FLAKY_Tabs
 #endif

 // TabOnRemoved is flaky on chromeos and linux views debug build.


Protect the kSyncRemainingRollbackTries pref.

BUG=387933

Review URL: https://codereview.chromium.org/347103005

git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@279230 0039d316-1c4b-4281-b951-d872f2087c98

--- chrome/browser/prefs/chrome_pref_service_factory.cc
+++ chrome/browser/prefs/chrome_pref_service_factory.cc
@@ -40,6 +40,7 @@
 #include "chrome/common/pref_names.h"
 #include "components/pref_registry/pref_registry_syncable.h"
 #include "components/search_engines/search_engines_pref_names.h"
+#include "components/sync_driver/pref_names.h"
 #include "content/public/browser/browser_context.h"
 #include "content/public/browser/browser_thread.h"
 #include "extensions/browser/pref_names.h"
@@ -180,10 +181,15 @@
     PrefHashFilter::ENFORCE_ON_LOAD,
     PrefHashFilter::TRACKING_STRATEGY_ATOMIC
   },
+  {
+    17, sync_driver::prefs::kSyncRemainingRollbackTries,
+    PrefHashFilter::ENFORCE_ON_LOAD,
+    PrefHashFilter::TRACKING_STRATEGY_ATOMIC
+  },
 };

 // The count of tracked preferences IDs across all platforms.
-const size_t kTrackedPrefsReportingIDsCount = 17;
+const size_t kTrackedPrefsReportingIDsCount = 18;
 COMPILE_ASSERT(kTrackedPrefsReportingIDsCount >= arraysize(kTrackedPrefs),
                need_to_increment_ids_count);


Stopped sending cookie for downloading spellcheck dictionaries.

BUG=118956
TEST=manual

Review URL: http://codereview.chromium.org/9764011

git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@128154 0039d316-1c4b-4281-b951-d872f2087c98

--- chrome/browser/spellchecker/spellcheck_host_impl.cc
+++ chrome/browser/spellchecker/spellcheck_host_impl.cc
@@ -285,7 +285,8 @@
   fetcher_.reset(content::URLFetcher::Create(url, content::URLFetcher::GET,
                                 weak_ptr_factory_.GetWeakPtr()));
   fetcher_->SetRequestContext(request_context_getter_);
-  fetcher_->SetLoadFlags(net::LOAD_DO_NOT_SAVE_COOKIES);
+  fetcher_->SetLoadFlags(
+      net::LOAD_DO_NOT_SEND_COOKIES | net::LOAD_DO_NOT_SAVE_COOKIES);
   tried_to_download_ = true;
   fetcher_->Start();
   request_context_getter_ = NULL;


Disable LoginPromptBrowserTest.IncorrectConfirmation

BUG=69266
TEST=None

Review URL: http://codereview.chromium.org/6401005

git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@72904 0039d316-1c4b-4281-b951-d872f2087c98

--- chrome/browser/ui/login/login_prompt_browsertest.cc
+++ chrome/browser/ui/login/login_prompt_browsertest.cc
@@ -331,7 +331,7 @@
 // there are multiple authenticated resources.
 // Marked as flaky.  See http://crbug.com/69266 and http://crbug.com/68860
 // TODO(asanka): Remove logging when timeout issues are resolved.
-IN_PROC_BROWSER_TEST_F(LoginPromptBrowserTest, FLAKY_IncorrectConfirmation) {
+IN_PROC_BROWSER_TEST_F(LoginPromptBrowserTest, DISABLED_IncorrectConfirmation) {
   ASSERT_TRUE(test_server()->Start());
   GURL test_page = test_server()->GetURL(kSingleRealmTestPage);


MultipleRealmConfirmation hangs on vista tests.
TEST=none
BUG=70960

Review URL: http://codereview.chromium.org/6268017

git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@72700 0039d316-1c4b-4281-b951-d872f2087c98

--- chrome/browser/ui/login/login_prompt_browsertest.cc
+++ chrome/browser/ui/login/login_prompt_browsertest.cc
@@ -271,7 +271,14 @@

 // Similar to the MultipleRealmCancellation test above, but tests
 // whether supplying credentials work as exepcted.
-IN_PROC_BROWSER_TEST_F(LoginPromptBrowserTest, MultipleRealmConfirmation) {
+#if defined(OS_WIN)
+// See http://crbug.com/70960
+#define MAYBE_MultipleRealmConfirmation DISABLED_MultipleRealmConfirmation
+#else
+#define MAYBE_MultipleRealmConfirmation MultipleRealmConfirmation
+#endif
+IN_PROC_BROWSER_TEST_F(LoginPromptBrowserTest,
+                       MAYBE_MultipleRealmConfirmation) {
   ASSERT_TRUE(test_server()->Start());
   GURL test_page = test_server()->GetURL(kMultiRealmTestPage);


Fix ifdef in constrained window... need to fall back to constrainedwindowframeview if not in new dialog mode.
Prevents crash in browser tests.

BUG=none
TEST=browser tests
TBR=sky
Review URL: http://codereview.chromium.org/9114067

git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@117180 0039d316-1c4b-4281-b951-d872f2087c98

--- chrome/browser/ui/views/constrained_window_views.cc
+++ chrome/browser/ui/views/constrained_window_views.cc
@@ -47,6 +47,8 @@
 #endif

 #if defined(USE_AURA)
+#include "base/command_line.h"
+#include "ash/ash_switches.h"
 #include "ash/shell.h"
 #endif

@@ -607,10 +609,12 @@

 views::NonClientFrameView* ConstrainedWindowViews::CreateNonClientFrameView() {
 #if defined(USE_AURA)
-  return ash::Shell::GetInstance()->CreateDefaultNonClientFrameView(this);
-#else
+  if (CommandLine::ForCurrentProcess()->HasSwitch(
+          ash::switches::kAuraGoogleDialogFrames)) {
+    return ash::Shell::GetInstance()->CreateDefaultNonClientFrameView(this);
+  }
+#endif
   return new ConstrainedWindowFrameView(this);
-#endif
 }

 ////////////////////////////////////////////////////////////////////////////////


Fix missing const-reference on parameter.

This issue was found by a linter.

R=pam@chromium.org

BUG=

Review URL: https://chromiumcodereview.appspot.com/22968005

git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@218284 0039d316-1c4b-4281-b951-d872f2087c98

--- chrome/browser/ui/webui/bidi_checker_web_ui_test.cc
+++ chrome/browser/ui/webui/bidi_checker_web_ui_test.cc
@@ -156,8 +156,8 @@
 //==============================

 static void SetupHistoryPageTest(Browser* browser,
-                                 const std::string page_url,
-                                 const std::string page_title) {
+                                 const std::string& page_url,
+                                 const std::string& page_title) {
   HistoryService* history_service = HistoryServiceFactory::GetForProfile(
       browser->profile(), Profile::IMPLICIT_ACCESS);
   const GURL history_url = GURL(page_url);


Disable crashing WebUIBidiCheckerBrowserTestFakeBidi.TestNewTabPageRTL

TBR=ofri

BUG=97453

Review URL: http://codereview.chromium.org/7976031

git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@102141 0039d316-1c4b-4281-b951-d872f2087c98

--- chrome/browser/ui/webui/bidi_checker_web_ui_test.cc
+++ chrome/browser/ui/webui/bidi_checker_web_ui_test.cc
@@ -42,6 +42,8 @@
 #define MAYBE_TestSettingsPageRTL TestSettingsPageRTL
 #endif

+// Disabled, http://crbug.com/97453
+#define MAYBE_TestNewTabPageRTL DISABLED_TestNewTabPageRTL

 static const FilePath::CharType* kWebUIBidiCheckerLibraryJS =
     FILE_PATH_LITERAL("third_party/bidichecker/bidichecker_packaged.js");


Check HRESULT

Check HRESULT

--- 3RVX/MeterWnd/LayeredWnd.cpp
+++ 3RVX/MeterWnd/LayeredWnd.cpp
@@ -290,12 +290,14 @@
 LRESULT LayeredWnd::WndProc(UINT message, WPARAM wParam, LPARAM lParam) {
     if (_glassMask && message == WM_DWMCOMPOSITIONCHANGED) {
         BOOL compositionEnabled = FALSE;
-        DwmIsCompositionEnabled(&compositionEnabled);
-
-        if (compositionEnabled) {
-            EnableGlass(_glassMask);
-        } else {
-            DisableGlass();
+        HRESULT hr = DwmIsCompositionEnabled(&compositionEnabled);
+
+        if (SUCCEEDED(hr)) {
+            if (compositionEnabled) {
+                EnableGlass(_glassMask);
+            } else {
+                DisableGlass();
+            }
         }
     }


Removed logic that was disabling other types of network connections during mobile activation.

BUG=chromium-os:16123
TEST=make sure modem activation, re-up can be performed while both connected and disconnected from wifi/ethernet connection
Review URL: http://codereview.chromium.org/7330009

git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@111279 0039d316-1c4b-4281-b951-d872f2087c98

--- chrome/browser/ui/webui/chromeos/mobile_setup_ui.cc
+++ chrome/browser/ui/webui/chromeos/mobile_setup_ui.cc
@@ -296,15 +296,15 @@
                    const std::string& error_description);
   // Prepares network devices for cellular activation process.
   void SetupActivationProcess(chromeos::CellularNetwork* network);
-  // Disables ethernet and wifi newtorks since they interefere with
-  // detection of restricted pool on cellular side.
-  void DisableOtherNetworks();
   // Resets network devices after cellular activation process.
   // |network| should be NULL if the activation process failed.
   void CompleteActivation(chromeos::CellularNetwork* network);
-  // Control routines for handling other types of connections during
-  // cellular activation.
-  void ReEnableOtherConnections();
+  // Disables SSL certificate revocation checking mechanism. In the case
+  // where captive portal connection is the only one present, such revocation
+  // checks could prevent payment portal page from loading.
+  void DisableCertRevocationChecking();
+  // Reenables SSL certificate revocation checking mechanism.
+  void ReEnableCertRevocationChecking();
   // Return error message for a given code.
   std::string GetErrorMessage(const std::string& code);

@@ -329,10 +329,8 @@
   // Internal handler state.
   PlanActivationState state_;
   std::string service_path_;
-  // Flags that control if wifi and ethernet connection needs to be restored
+  // Flags that controls if cert_checks needs to be restored
   // after the activation of cellular network.
-  bool reenable_wifi_;
-  bool reenable_ethernet_;
   bool reenable_cert_check_;
   bool evaluating_;
   // True if we think that another tab is already running activation.
@@ -492,8 +490,6 @@
       tab_contents_(NULL),
       state_(PLAN_ACTIVATION_PAGE_LOADING),
       service_path_(service_path),
-      reenable_wifi_(false),
-      reenable_ethernet_(false),
       reenable_cert_check_(false),
       evaluating_(false),
       already_running_(false),
@@ -511,7 +507,7 @@
   lib->RemoveObserverForAllNetworks(this);
   if (lib->IsLocked())
     lib->Unlock();
-  ReEnableOtherConnections();
+  ReEnableCertRevocationChecking();
 }

 WebUIMessageHandler* MobileSetupHandler::Attach(WebUI* web_ui) {
@@ -915,9 +911,6 @@
     case PLAN_ACTIVATION_RECONNECTING_PAYMENT:
     case PLAN_ACTIVATION_RECONNECTING: {
       if (network->connected()) {
-        // Make sure other networks are not interfering with our detection of
-        // restricted pool.
-        DisableOtherNetworks();
         // Wait until the service shows up and gets activated.
         switch (network->activation_state()) {
           case chromeos::ACTIVATION_STATE_PARTIALLY_ACTIVATED:
@@ -962,9 +955,6 @@
     }
     case PLAN_ACTIVATION_RECONNECTING_OTASP: {
       if (network->connected()) {
-        // Make sure other networks are not interfering with our detection of
-        // restricted pool.
-        DisableOtherNetworks();
         // Wait until the service shows up and gets activated.
         switch (network->activation_state()) {
           case chromeos::ACTIVATION_STATE_PARTIALLY_ACTIVATED:
@@ -1134,7 +1124,7 @@
     network->SetAutoConnect(true);
   // Reactivate other types of connections if we have
   // shut them down previously.
-  ReEnableOtherConnections();
+  ReEnableCertRevocationChecking();
 }

 void MobileSetupHandler::UpdatePage(
@@ -1246,18 +1236,7 @@
   }
 }

-void MobileSetupHandler::ReEnableOtherConnections() {
-  chromeos::NetworkLibrary* lib = chromeos::CrosLibrary::Get()->
-      GetNetworkLibrary();
-  if (reenable_ethernet_) {
-    reenable_ethernet_ = false;
-    lib->EnableEthernetNetworkDevice(true);
-  }
-  if (reenable_wifi_) {
-    reenable_wifi_ = false;
-    lib->EnableWifiNetworkDevice(true);
-  }
-
+void MobileSetupHandler::ReEnableCertRevocationChecking() {
   PrefService* prefs = g_browser_process->local_state();
   if (reenable_cert_check_) {
     prefs->SetBoolean(prefs::kCertRevocationCheckingEnabled,
@@ -1266,12 +1245,8 @@
   }
 }

-void MobileSetupHandler::SetupActivationProcess(
-    chromeos::CellularNetwork* network) {
-  if (!network)
-    return;
-
-  // Disable SSL cert checks since we will be doing this in
+void MobileSetupHandler::DisableCertRevocationChecking() {
+  // Disable SSL cert checks since we might be performin activation in the
   // restricted pool.
   PrefService* prefs = g_browser_process->local_state();
   if (!reenable_cert_check_ &&
@@ -1280,29 +1255,20 @@
     reenable_cert_check_ = true;
     prefs->SetBoolean(prefs::kCertRevocationCheckingEnabled, false);
   }
-
+}
+
+void MobileSetupHandler::SetupActivationProcess(
+    chromeos::CellularNetwork* network) {
+  if (!network)
+    return;
+
+  DisableCertRevocationChecking();
   chromeos::NetworkLibrary* lib = chromeos::CrosLibrary::Get()->
       GetNetworkLibrary();
   // Disable autoconnect to cellular network.
   network->SetAutoConnect(false);

-  // Prevent any other network interference.
-  DisableOtherNetworks();
   lib->Lock();
-}
-
-void MobileSetupHandler::DisableOtherNetworks() {
-  chromeos::NetworkLibrary* lib = chromeos::CrosLibrary::Get()->
-      GetNetworkLibrary();
-  // Disable ethernet and wifi.
-  if (lib->ethernet_enabled()) {
-    reenable_ethernet_ = true;
-    lib->EnableEthernetNetworkDevice(false);
-  }
-  if (lib->wifi_enabled()) {
-    reenable_wifi_ = true;
-    lib->EnableWifiNetworkDevice(false);
-  }
 }

 bool MobileSetupHandler::GotActivationError(


fix crash when translate infobar is instantiated with Translating state

translate infobar was expected to always be instantiated with BeforeTranslate state, but if connection is slow and infobar remains at Translating state when user switches to another tab then switches back to the "Translating" tab, all controls need to be created.

BUG=36812
TEST=On a slow connection, open a page that shows translate infobar, click to translate; while it's still translating, switch to another tab then switch back to the translating tab, it shouldn't crash.

Review URL: http://codereview.chromium.org/661103

git-svn-id: http://src.chromium.org/svn/trunk/src@40055 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

Former-commit-id: 708c32f991dd20385ef70a958dc7293266916992

--- chrome/browser/views/infobars/translate_infobars.cc
+++ chrome/browser/views/infobars/translate_infobars.cc
@@ -299,6 +299,8 @@
       break;

     case TranslateInfoBarDelegate::kTranslating:
+      if (!label_1_)
+        CreateLabels();
       if (!translating_label_) {
         translating_label_ = new views::Label(
             l10n_util::GetString(IDS_TRANSLATE_INFOBAR_TRANSLATING));


Extending Singleton Template to admit Base Classes

--- ofxTableGestures/src/oscGestures/Singleton.hpp
+++ ofxTableGestures/src/oscGestures/Singleton.hpp
@@ -31,9 +31,9 @@
 #ifndef SINGLETON_H
 #define SINGLETON_H
 //Inspired by http://cc.byexamples.com/20080609/stl-singleton-template/
-
-template<typename T>
-class Singleton
+class VoidClass{};
+template<typename T, class Base=VoidClass>
+class Singleton : public Base
 {
     public:
         static T& Instance()


fix(Core/Movement): set proper flying animations for creatures with INHABIT_GROUND (#7589)

- Closes #7579

--- src/server/game/Entities/Creature/Creature.cpp
+++ src/server/game/Entities/Creature/Creature.cpp
@@ -3108,7 +3108,10 @@
         if (isInAir && !IsFalling())
         {
             if (info->InhabitType & INHABIT_GROUND)
+            {
                 SetCanFly(true);
+                SetByteValue(UNIT_FIELD_BYTES_1, UNIT_BYTES_1_OFFSET_ANIM_TIER, UNIT_BYTE1_FLAG_FLY);
+            }
             else
                 SetDisableGravity(true);

@@ -3119,6 +3122,11 @@
         {
             SetCanFly(false);
             SetDisableGravity(false);
+
+            if (info->InhabitType & INHABIT_GROUND)
+            {
+                SetByteValue(UNIT_FIELD_BYTES_1, UNIT_BYTES_1_OFFSET_ANIM_TIER, UNIT_BYTE1_FLAG_GROUND);
+            }

             if (IsAlive() && (CanHover() || HasAuraType(SPELL_AURA_HOVER)))
                 SetHover(true);


Fixes:    work on QT_NO_CAST_FROM_BYTEARRAY

--- src/shared/qtsingleapplication/qtlocalpeer.cpp
+++ src/shared/qtsingleapplication/qtlocalpeer.cpp
@@ -166,7 +166,7 @@
         return;
     }
     // ### async this
-    QString message(QString::fromUtf8(uMsg));
+    QString message = QString::fromUtf8(uMsg.constData(), uMsg.size());
     socket->write(ack, qstrlen(ack));
     socket->waitForBytesWritten(1000);
     delete socket;


Implement 0xCE instruction

Implement 0xCE instruction

--- src/cpu.cpp
+++ src/cpu.cpp
@@ -557,6 +557,8 @@
         } else {
           breakpoint_read_max_ = breakpoint_read_min_;
         }
+        printf("Set breakpoint on memory read range %#04x - %#04x\n",
+            breakpoint_read_min_, breakpoint_read_max_);
       } else if (std::string("break op").compare(line.substr(0, 8)) == 0) {
         breakpoint_opcode_ = stoi(line.substr(9), 0, 16);
       } else if (std::string("break prev").compare(line) == 0) {
@@ -943,6 +945,10 @@
       break;
     }
   case 0xcd: CallA16(true, memory); break;
+  case 0xce:
+    AddCarry8(a_, Read8(pc_, memory));
+    pc_++;
+    break;
   case 0xd0:
     if ((*f_ & CARRY_FLAG) == 0) {
       Return(memory);


(Any) : Rename Variant to Any to sync with Web IDL.

git-svn-id: 2070e50727ba6c631fe71555fe3356c84164f6d5@687 d15c3b8f-5b43-0410-be93-4d5a55ce2954

--- src/cxx.cpp
+++ src/cxx.cpp
@@ -278,7 +278,7 @@
         }
         else if (node->getName() == "any")
         {
-            fprintf(file, "Variant");
+            fprintf(file, "Any");
         }
         else if (node->getName() == "wchar")
         {


updated to AliTrackingAction changes; removed settings to AliHeader in EndOfEventAction() (not needed)

--- AliGeant4/AliEventAction.cxx
+++ AliGeant4/AliEventAction.cxx
@@ -9,9 +9,9 @@

 #include "AliEventAction.h"
 #include "AliEventActionMessenger.h"
-#include "AliRun.h"
 #include "AliTrackingAction.h"
 #include "AliGlobals.h"
+#include "AliRun.h"

 #include <G4Event.hh>
 #include <G4TrajectoryContainer.hh>
@@ -58,7 +58,6 @@
 // Draws trajectories.
 // ---

-
   // trajectories processing
   G4TrajectoryContainer* trajectoryContainer
     = event->GetTrajectoryContainer();
@@ -67,7 +66,7 @@
   if (trajectoryContainer)
   { nofTrajectories = trajectoryContainer->entries(); }

-  if (fVerboseLevel>0) {
+  if (fVerboseLevel>0 && nofTrajectories>0) {
     G4cout << "    " << nofTrajectories;
     G4cout << " trajectories stored." << G4endl;
   }
@@ -105,10 +104,8 @@

   G4int eventID = event->GetEventID();

-  // reset the counters (primary tracks, saved tracks)
-  AliTrackingAction* trackingAction
-    = AliTrackingAction::Instance();
-  trackingAction->PrepareNewEvent();
+  // reset the tracks counters
+  AliTrackingAction::Instance()->PrepareNewEvent();

   if (fVerboseLevel>0)
     G4cout << ">>> Event " << event->GetEventID() << G4endl;
@@ -121,36 +118,34 @@
 // Called by G4 kernel at the end of event.
 // ---

-  // save the last primary track store of
-  // the current event
-  AliTrackingAction* trackingAction
-    = AliTrackingAction::Instance();
-  trackingAction->SaveAndDestroyTrack();
+  // finish the last primary track of the current event
+  AliTrackingAction* trackingAction = AliTrackingAction::Instance();
+  trackingAction->FinishPrimaryTrack();

+  // verbose output
   if (fVerboseLevel>0) {
-    G4int nofPrimaryTracks = trackingAction->GetNofPrimaryTracks();
-    G4int nofTracks = trackingAction->GetNofTracks();
+    //G4int nofPrimaryTracks = trackingAction->GetNofPrimaryTracks();
+    G4int nofPrimaryTracks = gAlice->GetHeader()->GetNprimary();
+    G4int nofSavedTracks = gAlice->GetNtrack();
+    G4int nofAllTracks = trackingAction->GetNofTracks();
+
     G4cout  << "    " << nofPrimaryTracks <<
                " primary tracks processed." << G4endl;
-    G4cout  << "    " << nofTracks <<
+    G4cout  << "    " << nofSavedTracks <<
+               " tracks saved." << G4endl;
+    G4cout  << "    " << nofAllTracks <<
                " all tracks processed." << G4endl;
   }

   // display event
   DisplayEvent(event);

-  // aliroot
-  // store event header data
-  gAlice->GetHeader()->SetEvent(event->GetEventID());
-  gAlice->GetHeader()->SetNvertex(event->GetNumberOfPrimaryVertex());
-  gAlice->GetHeader()->SetNprimary(trackingAction->GetNofPrimaryTracks());
-  gAlice->GetHeader()->SetNtrack(trackingAction->GetNofSavedTracks());
-
+  // aliroot finish event
   gAlice->FinishEvent();

   if (fVerboseLevel>0) {
     // print time
     fTimer->Stop();
-    G4cout << "Time of this event = " << *fTimer << G4endl;
+    G4cout << "Time of this event: " << *fTimer << G4endl;
   }
  }


[Sema] Removing check for argument locator at subtype validation at matchFunctionRepresentations

--- lib/Sema/CSSimplify.cpp
+++ lib/Sema/CSSimplify.cpp
@@ -1560,8 +1560,7 @@
 /// Returns true if `constraint rep1 rep2` is satisfied.
 static bool matchFunctionRepresentations(FunctionTypeRepresentation rep1,
                                          FunctionTypeRepresentation rep2,
-                                         ConstraintKind kind,
-                                         ConstraintLocatorBuilder locator) {
+                                         ConstraintKind kind) {
   switch (kind) {
   case ConstraintKind::Bind:
   case ConstraintKind::BindParam:
@@ -1570,13 +1569,8 @@
     return rep1 == rep2;

   case ConstraintKind::Subtype: {
-    auto last = locator.last();
-    if (!(last && last->is<LocatorPathElt::FunctionArgument>()))
-      return true;
-
     return isSubtypeOf(rep1, rep2);
   }
-

   // [NOTE: diagnose-swift-to-c-convention-change]: @convention(swift) ->
   // @convention(c) conversions are permitted only in certain cases.
@@ -1916,7 +1910,7 @@

   if (!matchFunctionRepresentations(func1->getExtInfo().getRepresentation(),
                                     func2->getExtInfo().getRepresentation(),
-                                    kind, locator)) {
+                                    kind)) {
     return getTypeMatchFailure(locator);
   }


Bugfix: added missing `#include` line.

Bugfix: added missing `#include` line.

--- code/ylikuutio/command_line/command_line_master.cpp
+++ code/ylikuutio/command_line/command_line_master.cpp
@@ -19,6 +19,7 @@
 #include "code/ylikuutio/map/ylikuutio_map.hpp"

 // Include standard headers
+#include <cstddef>       // std::size_t
 #include <iostream>      // std::cout, std::cin, std::cerr
 #include <limits>        // std::numeric_limits
 #include <string>        // std::string


upgrade

upgrade

--- codebase/CVX_CLUSTERING_SHRINKED/cvx_clustering.cpp
+++ codebase/CVX_CLUSTERING_SHRINKED/cvx_clustering.cpp
@@ -181,7 +181,7 @@
         for (int i = 0; i < N; i ++) {
             set<pair<int, double> > temp;
             if (!isInActives[i]) {
-                temp.insert(pqueues[i].top());
+                actives[i].insert(pqueues[i].top());
                 pqueues[i].pop();
             }
             double new_grad;
@@ -196,13 +196,11 @@
         // cout << "within frank_wolf: next iteration" << endl;
         k ++;
     }
-
     // compute value of objective function
     double penalty = first_subproblm_obj (dist_mat, yone, zone, wone, rho, N);
     // report the #iter and objective function
     // cout << "[Frank-Wolfe] iteration: " << k << ", first_subpro_obj: " << penalty << endl;
 }
-

 double second_subproblem_obj (double ** ytwo, double ** z, double ** wtwo, double rho, int N, double* lambda) {


Make LLVM_ENABLE_CRASH_DUMPS set a variable default

That way users can set the default to true, but then disable core dumps
from certain apps that link support.

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

--- lib/Support/Process.cpp
+++ lib/Support/Process.cpp
@@ -83,12 +83,11 @@
  { ALLCOLORS("4",""), ALLCOLORS("4","1;") }
 };

-// This is set to true when Process::PreventCoreFiles() is called.
-static bool coreFilesPrevented = false;
+// A CMake option controls wheter we emit core dumps by default. An application
+// may disable core dumps by calling Process::PreventCoreFiles().
+static bool coreFilesPrevented = !LLVM_ENABLE_CRASH_DUMPS;

-bool Process::AreCoreFilesPrevented() {
-  return LLVM_ENABLE_CRASH_DUMPS ? coreFilesPrevented : false;
-}
+bool Process::AreCoreFilesPrevented() { return coreFilesPrevented; }

 // Include the platform-specific parts of this class.
 #ifdef LLVM_ON_UNIX


lsa: free segment in trim_emergency_reserve_to_max()

_emergency_reserve is an intrusive containers and it doesn't care about
segment lifetime.

Signed-off-by: Paweł Dziepak <e29bb3265626c60caf76d587cabdfcd8b379ef80@scylladb.com>

--- utils/logalloc.cc
+++ utils/logalloc.cc
@@ -255,7 +255,7 @@
 size_t segment_pool::trim_emergency_reserve_to_max() {
     size_t n_released = 0;
     while (_emergency_reserve.size() > _emergency_reserve_max) {
-        _emergency_reserve.pop();
+        delete _emergency_reserve.pop();
         ++n_released;
     }
     return n_released;


Android supports creating swap chains (#1332)

--- src/glcontext_egl.cpp
+++ src/glcontext_egl.cpp
@@ -380,6 +380,7 @@
 		return BX_ENABLED(0
 						| BX_PLATFORM_LINUX
 						| BX_PLATFORM_WINDOWS
+						| BX_PLATFORM_ANDROID
 						)
 			? BGFX_CAPS_SWAP_CHAIN
 			: 0


Always run the second pass of the phantom callbacks synchronously if --predictable or --optimize_for_size are set.

R=jochen@chromium.org

Review URL: https://codereview.chromium.org/1245093004

Cr-Commit-Position: 972c6d2dc6dd5efdad1377c0d224e03eb8f276f7@{#29771}

--- src/global-handles.cc
+++ src/global-handles.cc
@@ -840,7 +840,7 @@
     }
   }
   if (pending_phantom_callbacks_.length() > 0) {
-    if (synchronous_second_pass) {
+    if (FLAG_optimize_for_size || FLAG_predictable || synchronous_second_pass) {
       InvokeSecondPassPhantomCallbacks(&pending_phantom_callbacks_, isolate());
     } else {
       auto task = new PendingPhantomCallbacksSecondPassTask(


glsl: Copy ir_variable::assigned and ir_variable::used fields in ::clone method

Nothing currently relies on this, but one of the next patches will.

Signed-off-by: Ian Romanick <2b237cafb16dc45038e85df6c85e74e6d899eba9@intel.com>
Reviewed-by: Paul Berry <de21b9f22e6dd0bdf7890875d6e07ef4967c44ce@gmail.com>

--- src/glsl/ir_clone.cpp
+++ src/glsl/ir_clone.cpp
@@ -59,6 +59,8 @@
    var->explicit_binding = this->explicit_binding;
    var->has_initializer = this->has_initializer;
    var->depth_layout = this->depth_layout;
+   var->assigned = this->assigned;
+   var->used = this->used;

    var->num_state_slots = this->num_state_slots;
    if (this->state_slots) {


Fix vs2010 int to scalar warnings

Fix vs2010 int to scalar warnings

git-svn-id: e8541e15acce502a64c929015570ad1648e548cd@3032 2bbb7eff-a529-9590-31e7-b0007b416f81

--- src/gpu/GrContext.cpp
+++ src/gpu/GrContext.cpp
@@ -1683,10 +1683,11 @@
                 const GrRect* srcRects[GrDrawState::kNumStages] = {NULL};
                 srcRects[kPathMaskStage] = &maskRect;
                 stageMask |= 1 << kPathMaskStage;
-                GrRect dstRect = GrRect::MakeLTRB(pathBounds.fLeft,
-                                                  pathBounds.fTop,
-                                                  pathBounds.fRight,
-                                                  pathBounds.fBottom);
+                GrRect dstRect = GrRect::MakeLTRB(
+                    SK_Scalar1* pathBounds.fLeft,
+                    SK_Scalar1* pathBounds.fTop,
+                    SK_Scalar1* pathBounds.fRight,
+                    SK_Scalar1* pathBounds.fBottom);
                 target->drawRect(dstRect, NULL, stageMask, srcRects, NULL);
                 target->drawState()->setTexture(kPathMaskStage, NULL);
                 if (GrIsFillInverted(fill)) {
@@ -1939,7 +1940,9 @@
     sampleM.setIDiv(src->width(), src->height());
     drawState->setTexture(0, src);
     drawState->sampler(0)->reset(sampleM);
-    SkRect rect = SkRect::MakeXYWH(0, 0, src->width(), src->height());
+    SkRect rect = SkRect::MakeXYWH(0, 0,
+                                   SK_Scalar1 * src->width(),
+                                   SK_Scalar1 * src->height());
     fGpu->drawSimpleRect(rect, NULL, 1 << 0);
 }


Cleanup GetSteamFriendRelationship.

Cleanup GetSteamFriendRelationship.

--- src/greenworks_api.cc
+++ src/greenworks_api.cc
@@ -108,32 +108,6 @@
                     Nan::New(name).ToLocalChecked());
   account_type->Set(Nan::New("value").ToLocalChecked(), Nan::New(type_id));
   return account_type;
-}
-
-v8::Local<v8::Object> GetSteamFriendRelationship(int type_id) {
-  v8::Local<v8::Object> friend_relationship = Nan::New<v8::Object>();
-  EFriendRelationship type = static_cast<EFriendRelationship>(type_id);
-  if (type > k_EFriendRelationshipMax) {
-    Nan::ThrowTypeError("Bad argument");
-    return Nan::New<v8::Object>();
-  }
-  std::map<EFriendRelationship, std::string> friend_relationship_types = {
-    MAKE_ENUM_PAIR(k_EFriendRelationshipNone),
-    MAKE_ENUM_PAIR(k_EFriendRelationshipBlocked),
-    MAKE_ENUM_PAIR(k_EFriendRelationshipRequestRecipient),
-    MAKE_ENUM_PAIR(k_EFriendRelationshipFriend),
-    MAKE_ENUM_PAIR(k_EFriendRelationshipRequestInitiator),
-    MAKE_ENUM_PAIR(k_EFriendRelationshipIgnored),
-    MAKE_ENUM_PAIR(k_EFriendRelationshipIgnoredFriend),
-    MAKE_ENUM_PAIR(k_EFriendRelationshipSuggested),
-    MAKE_ENUM_PAIR(k_EFriendRelationshipMax)
-  };
-  std::string name = friend_relationship_types[type];
-  friend_relationship->Set(Nan::New("name").ToLocalChecked(),
-                           Nan::New(name).ToLocalChecked());
-  friend_relationship->Set(Nan::New("value").ToLocalChecked(),
-                           Nan::New(type_id));
-  return friend_relationship;
 }

 NAN_METHOD(RestartAppIfNecessary) {


util: optimizes HexStr

util: optimizes HexStr

In my benchmark, this rewrite improves runtime 27% (g++) to 46% (clang++) for the benchmark `HexStrBench`:

g++ 11.2.0
|             ns/byte |              byte/s |    err% |        ins/byte |        cyc/byte |    IPC |       bra/byte |   miss% |     total | benchmark
|--------------------:|--------------------:|--------:|----------------:|----------------:|-------:|---------------:|--------:|----------:|:----------
|                0.94 |    1,061,381,310.36 |    0.7% |           12.00 |            3.01 |  3.990 |           1.00 |    0.0% |      0.01 | `HexStrBench` master
|                0.68 |    1,465,366,544.25 |    1.7% |            6.00 |            2.16 |  2.778 |           1.00 |    0.0% |      0.01 | `HexStrBench` branch

clang++ 13.0.1
|             ns/byte |              byte/s |    err% |        ins/byte |        cyc/byte |    IPC |       bra/byte |   miss% |     total | benchmark
|--------------------:|--------------------:|--------:|----------------:|----------------:|-------:|---------------:|--------:|----------:|:----------
|                0.80 |    1,244,713,415.92 |    0.9% |           10.00 |            2.56 |  3.913 |           0.50 |    0.0% |      0.01 | `HexStrBench` master
|                0.43 |    2,324,188,940.72 |    0.2% |            4.00 |            1.37 |  2.914 |           0.25 |    0.0% |      0.01 | `HexStrBench` branch

Note that the idea for this change comes from denis2342 in PR 23364. This is a rewrite so no unaligned accesses occur.

Also, the lookup table is now calculated at compile time, which hopefully makes the code a bit easier to review.

Github-Pull: #24852
Rebased-From: 5e61532e72c1021fda9c7b213bd9cf397cb3a802

--- src/util/strencodings.cpp
+++ src/util/strencodings.cpp
@@ -9,6 +9,7 @@
 #include <tinyformat.h>

 #include <algorithm>
+#include <array>
 #include <cstdlib>
 #include <cstring>
 #include <limits>
@@ -508,17 +509,37 @@
     return str;
 }

+namespace {
+
+using ByteAsHex = std::array<char, 2>;
+
+constexpr std::array<ByteAsHex, 256> CreateByteToHexMap()
+{
+    constexpr char hexmap[16] = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f'};
+
+    std::array<ByteAsHex, 256> byte_to_hex{};
+    for (size_t i = 0; i < byte_to_hex.size(); ++i) {
+        byte_to_hex[i][0] = hexmap[i >> 4];
+        byte_to_hex[i][1] = hexmap[i & 15];
+    }
+    return byte_to_hex;
+}
+
+} // namespace
+
 std::string HexStr(const Span<const uint8_t> s)
 {
     std::string rv(s.size() * 2, '\0');
-    static constexpr char hexmap[16] = { '0', '1', '2', '3', '4', '5', '6', '7',
-                                         '8', '9', 'a', 'b', 'c', 'd', 'e', 'f' };
-    auto it = rv.begin();
+    static constexpr auto byte_to_hex = CreateByteToHexMap();
+    static_assert(sizeof(byte_to_hex) == 512);
+
+    char* it = rv.data();
     for (uint8_t v : s) {
-        *it++ = hexmap[v >> 4];
-        *it++ = hexmap[v & 15];
-    }
-    assert(it == rv.end());
+        std::memcpy(it, byte_to_hex[v].data(), 2);
+        it += 2;
+    }
+
+    assert(it == rv.data() + rv.size());
     return rv;
 }


ENH: Added new test for narrow band classes

--- Testing/Code/BasicFilters/itkBasicFiltersTests.cxx
+++ Testing/Code/BasicFilters/itkBasicFiltersTests.cxx
@@ -120,6 +120,8 @@
   REGISTER_TEST(itkMirrorPadImageTest );
   REGISTER_TEST(itkMultiplyImageFilterTest );
   REGISTER_TEST(itkNaryAddImageFilterTest );
+  REGISTER_TEST(itkNarrowBandImageFilterBaseTest );
+  REGISTER_TEST(itkNarrowBandTest );
   REGISTER_TEST(itkNeighborhoodConnectedImageFilterTest  );
   REGISTER_TEST(itkNeighborhoodOperatorImageFilterTest );
   REGISTER_TEST(itkNormalizeImageFilterTest  );


Fixed warning.

Fixed warning.

--- src/util/unicode_util.cpp
+++ src/util/unicode_util.cpp
@@ -2283,9 +2283,8 @@

 bool normalize( string const &in, normalization::type n, string *out ) {
   UErrorCode status = U_ZERO_ERROR;
-  UNormalizationMode icu_mode;
+  UNormalizationMode icu_mode = UNORM_NONE; // init here to suppress warning
   switch ( n ) {
-    case normalization::none: icu_mode = UNORM_NONE; break;
     case normalization::NFC : icu_mode = UNORM_NFC ; break;
     case normalization::NFD : icu_mode = UNORM_NFD ; break;
     case normalization::NFKC: icu_mode = UNORM_NFKC; break;


TypeUtilities only warn if type is not supported.

--- PythonWrapperGenerator/src/TypeUtilities.cpp
+++ PythonWrapperGenerator/src/TypeUtilities.cpp
@@ -94,5 +94,8 @@
 	{
 		return typePtrToString(ptrType->getPointeeType().getTypePtr());
 	}
-	Q_ASSERT(false); // Implement support for more cases if needed.
+	// Implement support for more cases if needed.
+	qWarning() << "###Unsupported type: ###";
+	type->dump();
+	return {};
 }


ENH: Full test coverage of CropLabelMapFilter. STYLE: better filter name.

--- Testing/Code/Review/itkCropLabelMapFilterTest1.cxx
+++ Testing/Code/Review/itkCropLabelMapFilterTest1.cxx
@@ -54,22 +54,26 @@
   I2LType::Pointer i2l = I2LType::New();
   i2l->SetInput( reader->GetOutput() );

-  typedef itk::CropLabelMapFilter< LabelMapType > ChangeType;
-  ChangeType::Pointer change = ChangeType::New();
-  change->SetInput( i2l->GetOutput() );
-  ChangeType::SizeType size;
+  typedef itk::CropLabelMapFilter< LabelMapType > CropType;
+  CropType::Pointer crop = CropType::New();
+  // test the behavior without input
+  TRY_EXPECT_EXCEPTION( crop->Update() );
+  crop->ResetPipeline();
+
+  crop->SetInput( i2l->GetOutput() );
+  CropType::SizeType size;
   size[0] = atoi( argv[3] );
   size[1] = atoi( argv[4] );

-  change->SetCropSize( size );
-  TEST_SET_GET_VALUE( size, change->GetUpperBoundaryCropSize() );
-  TEST_SET_GET_VALUE( size, change->GetLowerBoundaryCropSize() );
+  crop->SetCropSize( size );
+  TEST_SET_GET_VALUE( size, crop->GetUpperBoundaryCropSize() );
+  TEST_SET_GET_VALUE( size, crop->GetLowerBoundaryCropSize() );

-  itk::SimpleFilterWatcher watcher6(change, "filter");
+  itk::SimpleFilterWatcher watcher6(crop, "filter");

   typedef itk::LabelMapToLabelImageFilter< LabelMapType, ImageType> L2IType;
   L2IType::Pointer l2i = L2IType::New();
-  l2i->SetInput( change->GetOutput() );
+  l2i->SetInput( crop->GetOutput() );

   typedef itk::ImageFileWriter< ImageType > WriterType;
   WriterType::Pointer writer = WriterType::New();


Fixed metadata operations in SDBP.

Fixed metadata operations in SDBP.

--- src/Application/SDBP/SDBPRequestMessage.cpp
+++ src/Application/SDBP/SDBPRequestMessage.cpp
@@ -43,6 +43,18 @@
             else
                 return false;
             break;
+        case CLIENTREQUEST_DELETE_QUORUM:
+            read = buffer.Readf("%c:%U:%U",
+             &request->type, &request->commandID, &request->quorumID);
+            break;
+        case CLIENTREQUEST_ADD_NODE:
+            read = buffer.Readf("%c:%U:%U:%U",
+             &request->type, &request->commandID, &request->quorumID, &request->nodeID);
+            break;
+        case CLIENTREQUEST_REMOVE_NODE:
+            read = buffer.Readf("%c:%U:%U:%U",
+             &request->type, &request->commandID, &request->quorumID, &request->nodeID);
+            break;
         case CLIENTREQUEST_ACTIVATE_NODE:
             read = buffer.Readf("%c:%U:%U",
              &request->type, &request->commandID, &request->nodeID);
@@ -62,11 +74,11 @@
             read = buffer.Readf("%c:%U:%U",
              &request->type, &request->commandID, &request->databaseID);
             break;
-        case CLIENTREQUEST_SPLIT_SHARD:
-            read = buffer.Readf("%c:%U:%U:%#B",
-             &request->type, &request->commandID,
-             &request->shardID, &request->key);
-            break;
+//        case CLIENTREQUEST_SPLIT_SHARD:
+//            read = buffer.Readf("%c:%U:%U:%#B",
+//             &request->type, &request->commandID,
+//             &request->shardID, &request->key);
+//            break;

         /* Table management */
         case CLIENTREQUEST_CREATE_TABLE:
@@ -75,13 +87,18 @@
              &request->quorumID, &request->name);
             break;
         case CLIENTREQUEST_RENAME_TABLE:
-            read = buffer.Readf("%c:%U:%U:%U:%#B",
-             &request->type, &request->commandID, &request->databaseID,
+            read = buffer.Readf("%c:%U:%U:%#B",
+             &request->type, &request->commandID,
              &request->tableID, &request->name);
             break;
         case CLIENTREQUEST_DELETE_TABLE:
-            read = buffer.Readf("%c:%U:%U:%U",
-             &request->type, &request->commandID, &request->databaseID,
+            read = buffer.Readf("%c:%U:%U",
+             &request->type, &request->commandID,
+             &request->tableID);
+            break;
+        case CLIENTREQUEST_TRUNCATE_TABLE:
+            read = buffer.Readf("%c:%U:%U",
+             &request->type, &request->commandID,
              &request->tableID);
             break;

@@ -157,6 +174,18 @@
             for (it = request->nodes.First(); it != NULL; it = request->nodes.Next(it))
                 buffer.Appendf(":%U", *it);
             return true;
+        case CLIENTREQUEST_DELETE_QUORUM:
+            buffer.Appendf("%c:%U:%U",
+             request->type, request->commandID, request->quorumID);
+            return true;
+        case CLIENTREQUEST_ADD_NODE:
+            buffer.Appendf("%c:%U:%U:%U",
+             request->type, request->commandID, request->quorumID, request->nodeID);
+            return true;
+        case CLIENTREQUEST_REMOVE_NODE:
+            buffer.Appendf("%c:%U:%U:%U",
+             request->type, request->commandID, request->quorumID, request->nodeID);
+            return true;
         case CLIENTREQUEST_ACTIVATE_NODE:
             buffer.Appendf("%c:%U:%U",
              request->type, request->commandID, request->nodeID);
@@ -176,10 +205,10 @@
             buffer.Appendf("%c:%U:%U",
              request->type, request->commandID, request->databaseID);
             return true;
-        case CLIENTREQUEST_SPLIT_SHARD:
-            buffer.Appendf("%c:%U:%U:%#B",
-             request->type, request->commandID, request->shardID, &request->key);
-            return true;
+//        case CLIENTREQUEST_SPLIT_SHARD:
+//            buffer.Appendf("%c:%U:%U:%#B",
+//             request->type, request->commandID, request->shardID, &request->key);
+//            return true;

         /* Table management */
         case CLIENTREQUEST_CREATE_TABLE:
@@ -188,13 +217,18 @@
              request->quorumID, &request->name);
             return true;
         case CLIENTREQUEST_RENAME_TABLE:
-            buffer.Appendf("%c:%U:%U:%U:%#B",
-             request->type, request->commandID, request->databaseID,
+            buffer.Appendf("%c:%U:%U:%#B",
+             request->type, request->commandID,
              request->tableID, &request->name);
             return true;
         case CLIENTREQUEST_DELETE_TABLE:
-            buffer.Appendf("%c:%U:%U:%U",
-             request->type, request->commandID, request->databaseID,
+            buffer.Appendf("%c:%U:%U",
+             request->type, request->commandID,
+             request->tableID);
+            return true;
+        case CLIENTREQUEST_TRUNCATE_TABLE:
+            buffer.Appendf("%c:%U:%U",
+             request->type, request->commandID,
              request->tableID);
             return true;


postimage.ord service enable in the popup menu.

--- QScreenshot/ImageUploaders/ImageUploader.cpp
+++ QScreenshot/ImageUploaders/ImageUploader.cpp
@@ -20,7 +20,7 @@

 ServicesList ImageUploader::GetServices()
 {
-    return ServicesList { "ImageShack.us" };
+    return ServicesList { "ImageShack.us", "postimage.org" };
 }

 ImageUploader * ImageUploader::CreateInstance(const QString & strServiceName)


GLES2: keep HW mipmap path if we support NPOT

--- RenderSystems/GLES2/src/OgreGLES2Texture.cpp
+++ RenderSystems/GLES2/src/OgreGLES2Texture.cpp
@@ -149,10 +149,9 @@
         mGLSupport.getStateCacheManager()->bindGLTexture(texTarget, mTextureID);

         // If we can do automip generation and the user desires this, do so
-        mMipmapsHardwareGenerated =
-            Root::getSingleton().getRenderSystem()->getCapabilities()->hasCapability(RSC_AUTOMIPMAP) && !PixelUtil::isCompressed(mFormat);
-
-        if(!Bitwise::isPO2(mWidth) || !Bitwise::isPO2(mHeight))
+        mMipmapsHardwareGenerated = !PixelUtil::isCompressed(mFormat);
+
+        if(!nonPowerOfTwoSupported && (!Bitwise::isPO2(mWidth) || !Bitwise::isPO2(mHeight)))
             mMipmapsHardwareGenerated = false;

         // glGenerateMipmap require all mip levels to be prepared. So override how many this texture has.


GLES2: Resolve some GL errors by excluding cube maps from getting auto generated mipmaps

--HG--
branch : v1-8

--- RenderSystems/GLES2/src/OgreGLES2Texture.cpp
+++ RenderSystems/GLES2/src/OgreGLES2Texture.cpp
@@ -136,7 +136,8 @@
             Root::getSingleton().getRenderSystem()->getCapabilities()->hasCapability(RSC_AUTOMIPMAP) && !PixelUtil::isCompressed(mFormat);

         if ((mUsage & TU_AUTOMIPMAP) &&
-            mNumRequestedMipmaps && mMipmapsHardwareGenerated)
+            mNumRequestedMipmaps && mMipmapsHardwareGenerated &&
+            (mTextureType != TEX_TYPE_CUBE_MAP))
         {
             glGenerateMipmap(getGLES2TextureTarget());
             GL_CHECK_ERROR;


control/Client: omit the null terminator

--- src/control/Client.cxx
+++ src/control/Client.cxx
@@ -139,6 +139,6 @@
 BengControlClient::MakeTcacheInvalidate(TranslationCommand cmd,
 					const char *value) noexcept
 {
-	const std::span value_span{value, strlen(value) + 1};
+	const std::span value_span{value, strlen(value)};
 	return MakeTcacheInvalidate(cmd, std::as_bytes(value_span));
 }


fixed sprite leak

fixed sprite leak

--- src/gui/gui_scene.cpp
+++ src/gui/gui_scene.cpp
@@ -111,6 +111,10 @@

 struct GUIImage
 {
+	~GUIImage() {
+		if (sprite) sprite->getResourceManager().unload(*sprite);
+	}
+
 	enum Flags
 	{
 		IS_ENABLED = 1 << 1


lazily make a copy of the paint when choosing a blitter. For simple draws,
this is never actually needed, and it is faster to skip the copy.

git-svn-id: e8541e15acce502a64c929015570ad1648e548cd@3908 2bbb7eff-a529-9590-31e7-b0007b416f81

--- src/core/SkBlitter.cpp
+++ src/core/SkBlitter.cpp
@@ -14,6 +14,7 @@
 #include "SkMask.h"
 #include "SkMaskFilter.h"
 #include "SkTemplatesPriv.h"
+#include "SkTLazy.h"
 #include "SkUtils.h"
 #include "SkXfermode.h"

@@ -839,24 +840,33 @@
         return blitter;
     }

-    SkPaint paint(origPaint);
-    SkShader* shader = paint.getShader();
-    SkColorFilter* cf = paint.getColorFilter();
-    SkXfermode* mode = paint.getXfermode();
-
+    SkShader* shader = origPaint.getShader();
+    SkColorFilter* cf = origPaint.getColorFilter();
+    SkXfermode* mode = origPaint.getXfermode();
     Sk3DShader* shader3D = NULL;
-    if (paint.getMaskFilter() != NULL &&
-            paint.getMaskFilter()->getFormat() == SkMask::k3D_Format) {
+
+    SkTLazy<SkPaint> lazyPaint;
+    // we promise not to mutate paint unless we know we've reassigned it from
+    // lazyPaint
+    SkPaint* paint = const_cast<SkPaint*>(&origPaint);
+
+    if (origPaint.getMaskFilter() != NULL &&
+            origPaint.getMaskFilter()->getFormat() == SkMask::k3D_Format) {
         shader3D = SkNEW_ARGS(Sk3DShader, (shader));
-        paint.setShader(shader3D)->unref();
+        // we know we haven't initialized lazyPaint yet, so just do it
+        paint = lazyPaint.set(origPaint);
+        paint->setShader(shader3D)->unref();
         shader = shader3D;
     }

     if (NULL != mode) {
-        switch (interpret_xfermode(paint, mode, device.config())) {
+        switch (interpret_xfermode(*paint, mode, device.config())) {
             case kSrcOver_XferInterp:
                 mode = NULL;
-                paint.setXfermode(NULL);
+                if (!lazyPaint.isValid()) {
+                    paint = lazyPaint.set(origPaint);
+                }
+                paint->setXfermode(NULL);
                 break;
             case kSkipDrawing_XferInterp:
                 SK_PLACEMENT_NEW(blitter, SkNullBlitter, storage, storageSize);
@@ -874,12 +884,18 @@
 #endif
             // xfermodes (and filters) require shaders for our current blitters
             shader = SkNEW(SkColorShader);
-            paint.setShader(shader)->unref();
+            if (!lazyPaint.isValid()) {
+                paint = lazyPaint.set(origPaint);
+            }
+            paint->setShader(shader)->unref();
         } else if (cf) {
             // if no shader && no xfermode, we just apply the colorfilter to
             // our color and move on.
-            paint.setColor(cf->filterColor(paint.getColor()));
-            paint.setColorFilter(NULL);
+            if (!lazyPaint.isValid()) {
+                paint = lazyPaint.set(origPaint);
+            }
+            paint->setColor(cf->filterColor(paint->getColor()));
+            paint->setColorFilter(NULL);
             cf = NULL;
         }
     }
@@ -887,52 +903,55 @@
     if (cf) {
         SkASSERT(shader);
         shader = SkNEW_ARGS(SkFilterShader, (shader, cf));
-        paint.setShader(shader)->unref();
+        if (!lazyPaint.isValid()) {
+            paint = lazyPaint.set(origPaint);
+        }
+        paint->setShader(shader)->unref();
         // blitters should ignore the presence/absence of a filter, since
         // if there is one, the shader will take care of it.
     }

-    if (shader && !shader->setContext(device, paint, matrix)) {
+    if (shader && !shader->setContext(device, *paint, matrix)) {
         return SkNEW(SkNullBlitter);
     }

     switch (device.getConfig()) {
         case SkBitmap::kA1_Config:
             SK_PLACEMENT_NEW_ARGS(blitter, SkA1_Blitter,
-                                  storage, storageSize, (device, paint));
+                                  storage, storageSize, (device, *paint));
             break;

         case SkBitmap::kA8_Config:
             if (shader) {
                 SK_PLACEMENT_NEW_ARGS(blitter, SkA8_Shader_Blitter,
-                                      storage, storageSize, (device, paint));
+                                      storage, storageSize, (device, *paint));
             } else {
                 SK_PLACEMENT_NEW_ARGS(blitter, SkA8_Blitter,
-                                      storage, storageSize, (device, paint));
+                                      storage, storageSize, (device, *paint));
             }
             break;

         case SkBitmap::kARGB_4444_Config:
-            blitter = SkBlitter_ChooseD4444(device, paint, storage, storageSize);
+            blitter = SkBlitter_ChooseD4444(device, *paint, storage, storageSize);
             break;

         case SkBitmap::kRGB_565_Config:
-            blitter = SkBlitter_ChooseD565(device, paint, storage, storageSize);
+            blitter = SkBlitter_ChooseD565(device, *paint, storage, storageSize);
             break;

         case SkBitmap::kARGB_8888_Config:
             if (shader) {
                 SK_PLACEMENT_NEW_ARGS(blitter, SkARGB32_Shader_Blitter,
-                                      storage, storageSize, (device, paint));
-            } else if (paint.getColor() == SK_ColorBLACK) {
+                                      storage, storageSize, (device, *paint));
+            } else if (paint->getColor() == SK_ColorBLACK) {
                 SK_PLACEMENT_NEW_ARGS(blitter, SkARGB32_Black_Blitter,
-                                      storage, storageSize, (device, paint));
-            } else if (paint.getAlpha() == 0xFF) {
+                                      storage, storageSize, (device, *paint));
+            } else if (paint->getAlpha() == 0xFF) {
                 SK_PLACEMENT_NEW_ARGS(blitter, SkARGB32_Opaque_Blitter,
-                                      storage, storageSize, (device, paint));
+                                      storage, storageSize, (device, *paint));
             } else {
                 SK_PLACEMENT_NEW_ARGS(blitter, SkARGB32_Blitter,
-                                      storage, storageSize, (device, paint));
+                                      storage, storageSize, (device, *paint));
             }
             break;


tool_build/interface/command_list: output tidy.

--- src/togo/tool_build/interface/command_list.ipp
+++ src/togo/tool_build/interface/command_list.ipp
@@ -19,7 +19,7 @@
 	if (!list_resources) {
 		return;
 	} else if (array::empty(package_compiler::manifest(pkg))) {
-		TOGO_LOG("  no resources\n\n");
+		TOGO_LOG("  no resources\n");
 		return;
 	}
 	for (auto const& metadata : package_compiler::manifest(pkg)) {
@@ -31,7 +31,6 @@
 			fixed_array::begin(metadata.path)
 		);
 	}
-	TOGO_LOG("\n");
 }

 bool interface::command_list(
@@ -52,6 +51,9 @@
 			);
 			if (pkg) {
 				print_package(*pkg, true);
+				if (list_resources && i + 1 < num_package_names) {
+					TOGO_LOG("\n");
+				}
 			} else {
 				TOGO_LOGF(
 					"package not found: '%.*s'\n",
@@ -60,8 +62,12 @@
 			}
 		}
 	} else if (array::any(packages)) {
-		for (auto const* pkg : packages) {
+		for (unsigned i = 0; i < array::size(packages); ++i) {
+			auto const* pkg = packages[i];
 			print_package(*pkg, list_resources);
+			if (list_resources && i + 1 < array::size(packages)) {
+				TOGO_LOG("\n");
+			}
 		}
 	} else {
 		TOGO_LOG("no packages\n");


INTEGRATION: CWS sb59 (1.9.18); FILE MERGED 2006/08/07 14:31:10 sb 1.9.18.1: #i67487# Made code warning-free (wntmsci10).

--- goodies/source/filter.vcl/ios2met/ios2met.cxx
+++ goodies/source/filter.vcl/ios2met/ios2met.cxx
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: ios2met.cxx,v $
  *
- *  $Revision: 1.10 $
+ *  $Revision: 1.11 $
  *
- *  last change: $Author: obo $ $Date: 2006-09-17 15:51:16 $
+ *  last change: $Author: obo $ $Date: 2006-10-12 15:37:09 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -749,9 +749,9 @@
 Color OS2METReader::GetPaletteColor(sal_uInt32 nIndex)
 {
     nIndex=GetPalette0RGB(nIndex);
-    return Color((((USHORT)(nIndex>>8))&0xff00)>>8,
-                 (((USHORT) nIndex)&0xff00)>>8,
-                 (((USHORT)(nIndex<<8))&0xff00)>>8);
+    return Color(sal::static_int_cast< UINT8 >((nIndex>>16)&0xff),
+                 sal::static_int_cast< UINT8 >((nIndex>>8)&0xff),
+                 sal::static_int_cast< UINT8 >(nIndex&0xff));
 }


Fixed Mac OS X TRAP() problem on GCC compiler.

--- src/dzm.hpp
+++ src/dzm.hpp
@@ -107,6 +107,9 @@
 #elif COMPILER_LLVM
 #define TRAP() __builtin_trap()
 #else
+#ifdef __APPLE__
+#define TRAP() __builtin_trap()
+#else
 #define TRAP() volatile *(int *)0 = 0
 #endif


core/encodings: add {} block to make the compiler not complain

--- src/core/encodings.cpp
+++ src/core/encodings.cpp
@@ -144,10 +144,10 @@

     if (n == (size_t)(-1)) {
       switch (errno) {
-        case E2BIG:
+        case E2BIG: {
           // Not enough space in output
           // Use GPSEE's WAG again. +32 assumes no encoding needs more than 32
-          // bytes(!) pre character. Probably a safe bet.
+          // bytes(!) per character. Probably a safe bet.
           size_t new_size = in_left + in_left/4 + 32,
                  old_size = outbytes - &outbuf[0];

@@ -158,6 +158,7 @@
           out_left += new_size;

           continue;
+        }

         case EILSEQ:
           // An invalid multibyte sequence has been encountered in the input.


shmem: Release writer ID when destroying a pending startup writer am: dc2d0e8928 am: dd23fc13ec am: ff2c62e49c

Change-Id: I6f7547ef9414ab3e555b49b8a58ae81fbbb2940d

--- src/tracing/core/shared_memory_arbiter_impl.cc
+++ src/tracing/core/shared_memory_arbiter_impl.cc
@@ -658,6 +658,8 @@
   base::TaskRunner* task_runner = nullptr;
   {
     std::lock_guard<std::mutex> scoped_lock(lock_);
+    active_writer_ids_.Free(id);
+
     auto it = pending_writers_.find(id);
     if (it != pending_writers_.end()) {
       // Writer hasn't been bound yet and thus also not yet registered with the
@@ -666,7 +668,6 @@
       return;
     }

-    active_writer_ids_.Free(id);
     task_runner = task_runner_;
   }  // scoped_lock


Small change to make it possible to call c-imported function-like macros in more situations

--- compiler/AST/Operators/FunctionCallOperatorNode.cpp
+++ compiler/AST/Operators/FunctionCallOperatorNode.cpp
@@ -54,7 +54,10 @@

     bool FunctionCallOperatorNode::receiverIsClosure() const {
         assert(_receiver);
-        assert(_receiver->nodeType().referencedType());
+
+        if (!_receiver->nodeType().referencedType()) {
+            return false;
+        }

         return _receiver->nodeType().referencedType()->flavor() == DataType::Flavor::Closure;
     }


Improve mpipl workaround setting WAKEUP_SELECT bit

Previously the workaround was depending on the master core being
first in the list of returned targets. This is usually what happens
but technically we cannot rely on that.

Change-Id: I291bbcc406afaa1d0f40c7a65a93d2b47993c072
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/39093
Reviewed-by: Martin Gloff <df0a4963746ae04ab678d064fccc7ee68adfd751@us.ibm.com>
Tested-by: Jenkins Server <8e3f934e4c44875bc48d33da3ea13d93ba9a233f@us.ibm.com>
Reviewed-by: Richard J. Knight <94c04f3910596886be97211d492ad29f0ba29cd5@us.ibm.com>
Tested-by: Jenkins OP Build CI <e610bd72261d3c0a48f1e8ae36832ab00774d426@us.ibm.com>
Tested-by: FSP CI Jenkins <aa9e4d9ac7cd25905e9c0dd36d4150516e73dd86@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
@@ -313,19 +313,24 @@

             //TODO 171763 Core state setup for MPIPL should be done in a HWP
             //Set WKUP_SELECT bit on slave cores
-            for(uint8_t x = 1; x < (l_coreTargetList.size()) ; x++)
-            {
-                //Set WKUP_SELECT bit on non-master cores that are on
-                // the master quad
-                l_err = deviceWrite(l_coreTargetList[x],
-                                    &SET_WKUP_SELECT_MASK,
-                                    MASK_SIZE,
-                                    DEVICE_SCOM_ADDRESS(CPPM_CORE_POWMAN_MODE_REG));
-                if(l_err)
+            for(const auto & l_core_target : l_coreTargetList)
+            {
+                TARGETING::ATTR_CHIP_UNIT_type l_core_id = l_core_target->getAttr<TARGETING::ATTR_CHIP_UNIT>();
+
+                if(l_core_id != l_masterCoreId)
                 {
-                    TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace,
-                              "Error setting WKUP_SELECT bit of CPPM_CORE_REG on core %d", l_coreTargetList[x]->getAttr<TARGETING::ATTR_CHIP_UNIT>());
-                    break;
+
+                    //Set WKUP_SELECT bit on all slave cores on master EQ
+                    l_err = deviceWrite(l_core_target,
+                                        &SET_WKUP_SELECT_MASK,
+                                        MASK_SIZE,
+                                        DEVICE_SCOM_ADDRESS(CPPM_CORE_POWMAN_MODE_REG));
+                    if(l_err)
+                    {
+                        TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace,
+                                  "Error setting WKUP_SELECT bit of CPPM_CORE_REG on core %d", l_core_id);
+                        break;
+                    }
                 }
             }


Set SYSTEM_RESCLK_DISABLE as workaround

Set SYSTEM_RESCLK_DISABLE as workaround

Change-Id: I4c8c7b5fd4e9e12919110922a77223bf0eec1696
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/42620
Tested-by: Jenkins Server <8e3f934e4c44875bc48d33da3ea13d93ba9a233f@us.ibm.com>
Tested-by: FSP CI Jenkins <aa9e4d9ac7cd25905e9c0dd36d4150516e73dd86@us.ibm.com>
Tested-by: Jenkins OP Build CI <e610bd72261d3c0a48f1e8ae36832ab00774d426@us.ibm.com>
Tested-by: Jenkins OP HW <0eb0fff262f74a65a832afbcc7b153e391c9a3fd@us.ibm.com>
Reviewed-by: Daniel M. Crowell <912029ca9254ac7b5854e56910561d682e1fa2d0@us.ibm.com>

--- src/usr/isteps/istep15/host_build_stop_image.C
+++ src/usr/isteps/istep15/host_build_stop_image.C
@@ -377,6 +377,10 @@
         TARGETING::targetService().getTopLevelTarget(l_sys);
         assert( l_sys != NULL );

+        // @todo RTC:176627 Remove workaround setting SYSTEM_RESCLK_DISABLE
+        l_sys->setAttr<TARGETING::ATTR_SYSTEM_RESCLK_DISABLE>(0x1);
+        // end workaround
+
         if (l_sys->getAttr<TARGETING::ATTR_IS_MPIPL_HB>())
         {
             l_errl = HBPM::resetPMAll();


[Memory] Fixes the null case when memory size is 0

--- src/core/kernelArg.cpp
+++ src/core/kernelArg.cpp
@@ -91,7 +91,7 @@

   template <>
   kernelArg::kernelArg(modeMemory_t *arg) {
-    if (arg) {
+    if (arg && arg->size) {
       add(arg->makeKernelArg());
     } else {
       add(kernelArg(nullKernelArg));


[ubsan]: temporarily disable print_stack_trace.cc test

Some problems with ARM stack unwinding led to inaccurate stack traces being
printed, which caused this test to fail on
http://lab.llvm.org:8011/builders/clang-cmake-thumbv7-a15-full-sh

git-svn-id: c199f293c43da69278bea8e88f92242bf3aa95f7@302239 91177308-0d34-0410-b5e6-96231b3b80d8

--- test/ubsan/TestCases/Misc/Linux/print_stack_trace.cc
+++ test/ubsan/TestCases/Misc/Linux/print_stack_trace.cc
@@ -1,5 +1,8 @@
 // RUN: %clangxx -fsanitize=undefined -O0 %s -o %t && UBSAN_OPTIONS=stack_trace_format=DEFAULT:fast_unwind_on_fatal=1 %run %t 2>&1 | FileCheck %s
 // RUN: %clangxx -fsanitize=undefined -O0 %s -o %t && UBSAN_OPTIONS=stack_trace_format=DEFAULT:fast_unwind_on_fatal=0 %run %t 2>&1 | FileCheck %s
+
+// This test is temporarily disabled due to broken unwinding on ARM.
+// UNSUPPORTED: -linux-

 // The test doesn't pass on Darwin in UBSan-TSan configuration, because TSan is
 // using the slow unwinder which is not supported on Darwin. The test should


Fixes for Andrey comments

Fixes for Andrey comments

--- src/hdmint/wallet.cpp
+++ src/hdmint/wallet.cpp
@@ -163,9 +163,8 @@
 bool CHDMintWallet::GetSerialForPubcoin(const std::vector<std::pair<uint256, GroupElement>>& serialPubcoinPairs, const uint256& hashPubcoin, uint256& hashSerial)
 {
     bool fFound = false;
-    for(auto serialPubcoinPair : serialPubcoinPairs){
-        GroupElement pubcoin = serialPubcoinPair.second;
-        if(hashPubcoin == primitives::GetPubCoinValueHash(pubcoin)){
+    for(const auto& serialPubcoinPair : serialPubcoinPairs){
+        if(hashPubcoin == primitives::GetPubCoinValueHash(serialPubcoinPair.second)){
             hashSerial = serialPubcoinPair.first;
             fFound = true;
             break;


fix typo

fix typo

Signed-off-by: Noah Watkins <86ecd7d1c53cf33a85014f7cab78876cb4491020@gmail.com>

--- src/core/rpc_server.cc
+++ src/core/rpc_server.cc
@@ -70,7 +70,7 @@

 void
 rpc_server::start() {
-  LOG_INFO("Starging server:{}", *this);
+  LOG_INFO("Starting server:{}", *this);
   if (!(args_.flags & rpc_server_flags_disable_http_server)) {
     LOG_INFO("Starting HTTP admin server on background future");
     admin_ = seastar::make_lw_shared<seastar::http_server>("smf admin server");


Changes: Tuned feedbacks of MButton

Changes: Tuned feedbacks of MButton

RevBy: Tomas
Details: Added cancel feedback usage and feedback when dragging finger
         away from button and on top of button again.

--- src/views/mbuttonview.cpp
+++ src/views/mbuttonview.cpp
@@ -335,11 +335,18 @@
     rect.adjust(-RELEASE_MISS_DELTA, -RELEASE_MISS_DELTA,
                 RELEASE_MISS_DELTA, RELEASE_MISS_DELTA);

-    bool pressed = rect.contains(touch);
-
-    if ( pressed != model()->down()) {
-        model()->setDown(pressed);
-    }
+    if (rect.contains(touch)) {
+        if (!model()->down()) {
+            model()->setDown(true);
+            style()->pressFeedback().play();
+        }
+    } else {
+        if (model()->down()) {
+            model()->setDown(false);
+            style()->cancelFeedback().play();
+        }
+    }
+
 }

 void MButtonView::mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
@@ -368,6 +375,9 @@
     if (!model()->down()) {
         return;
     }
+
+    style()->cancelFeedback().play();
+
     model()->setDown(false);
 }


Fix Hierarchical test

Fix Hierarchical test

--- testing/adios2/hierarchy/TestHierarchicalReading.cpp
+++ testing/adios2/hierarchy/TestHierarchicalReading.cpp
@@ -104,21 +104,8 @@
             EXPECT_EQ(res.size(), 5);
             res = g.AvailableAttributes();
             EXPECT_EQ(res.size(), 0);
-            engine.EndStep();
-        }
-        for (size_t step = 0; step < NSteps; step++)
-        {
-            engine.BeginStep();
-            auto g = io.InquireGroup('/');
-            auto res = g.AvailableGroups();
-            EXPECT_EQ(res[0], "group1");
-            res = g.AvailableVariables();
-            EXPECT_EQ(res[0], "variable6");
-            engine.EndStep();
-        }
-        for (size_t step = 0; step < NSteps; step++)
-        {
-            auto g = io.InquireGroup('/');
+
+            g = io.InquireGroup('/');
             auto var = g.InquireVariable<int32_t>("variable6");
             EXPECT_TRUE(var);
             if (var)
@@ -128,12 +115,8 @@
                 engine.Get<int32_t>(var, myInts, adios2::Mode::Sync);
                 EXPECT_EQ(Ints, myInts);
             }
-        }
-        for (size_t step = 0; step < NSteps; step++)
-        {
-            auto g = io.InquireGroup('/');
             g.setPath("group1/group2/group3/group4");
-            auto var = g.InquireVariable<int32_t>("variable1");
+            var = g.InquireVariable<int32_t>("variable1");
             EXPECT_TRUE(var);
             if (var)
             {
@@ -143,6 +126,7 @@

                 EXPECT_EQ(Ints, myInts);
             }
+            engine.EndStep();
         }
         engine.Close();
     }


bitly change on let-internal

bitly change on let-internal

--- src/eval.cc
+++ src/eval.cc
@@ -575,8 +575,9 @@
     vm.local_set(name.get<Symbol*>(), proc);
   }

-  vm.code.insert(vm.code.end(), {vm_op_call, proc});
+  vm.code.push_back(vm_op_call);
   vm.stack.push_back(push_cons_list({}, gl_vals.extract()));
+  function_call(proc, proc->info()); // direct jump!
   return vm_op_nop;
 }


Fix test failure.

Fix test failure.

rating isn't a supported property of album on any platform.

--- tests/auto/qdocumentgallery/tst_qdocumentgallery.cpp
+++ tests/auto/qdocumentgallery/tst_qdocumentgallery.cpp
@@ -188,9 +188,6 @@
             << QDocumentGallery::albumTitle
             << QDocumentGallery::artist
             << QDocumentGallery::duration
-#if !defined(Q_WS_MAEMO_6)
-            << QDocumentGallery::rating
-#endif
             << QDocumentGallery::title
             << QDocumentGallery::trackCount
 #endif


test to demonstrate viewport should be ignored when saving a landmark

--- tests/auto/qlandmarkmanager/tst_qlandmarkmanager.cpp
+++ tests/auto/qlandmarkmanager/tst_qlandmarkmanager.cpp
@@ -128,6 +128,7 @@
 #define TEST_SIGNALS
 #define TEST_DESTRUCTION
 #define TEST_PROXIMITY_RADIUS
+#define TEST_VIEWPORT
 #define EXPORT_URL

 //#define WORKAROUND
@@ -1123,6 +1124,10 @@
 void testProximityRadius_data();
 #endif

+#ifdef TEST_VIEWPORT
+void testViewport();
+void testViewport_data();
+#endif

 #ifdef EXPORT_URL
  void exportUrl();
@@ -8041,6 +8046,29 @@
 }
 #endif

+#ifdef TEST_VIEWPORT
+void tst_QLandmarkManager::testViewport()
+{
+    //the viewport should be ignored when saving a landmark.
+    QFETCH(QString, type);
+    QGeoPlace place;
+    place.setCoordinate(QGeoCoordinate(1,1));
+    place.setViewport(QGeoBoundingBox(QGeoCoordinate(10,-10), QGeoCoordinate(-10,10)));
+
+    QLandmark lm1(place);
+    QVERIFY(m_manager->saveLandmark(&lm1));
+    lm1.setViewport(QGeoBoundingBox());
+    QCOMPARE(m_manager->landmark(lm1.landmarkId()), lm1);
+}
+
+void tst_QLandmarkManager::testViewport_data() {
+    QTest::addColumn<QString>("type");
+
+    QTest::newRow("sync") << "sync";
+    QTest::newRow("async") << "async";
+}
+#endif
+
 #ifdef EXPORT_URL
 void tst_QLandmarkManager::exportUrl() {
     //This test function exists due to MOBILITY-1774


whitespace fix

whitespace fix

--- src/file.cc
+++ src/file.cc
@@ -14,7 +14,7 @@
 {

 std::string read_file(const std::string& filename)
-{
+{
    int fd = open(filename.c_str(), O_RDONLY);
     if (fd == -1)
     {