Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 1 Oct 2013 22:16:39 +0000 (UTC)
From:      John Marino <marino@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r329004 - head/benchmarks/polygraph/files
Message-ID:  <201310012216.r91MGdoX051054@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: marino
Date: Tue Oct  1 22:16:39 2013
New Revision: 329004
URL: http://svnweb.freebsd.org/changeset/ports/329004

Log:
  benchmarks/polygraph: Fix c++ errors caught by modern compilers
  
  There were two scope issues caught by -fpermissions and another case
  of a redeclared variabled, all of which are caught on recent gcc.
  
  Approved by:	portmgr (bapt, implicit)

Added:
  head/benchmarks/polygraph/files/
  head/benchmarks/polygraph/files/patch-src_runtime_StatPhase.cc   (contents, props changed)
  head/benchmarks/polygraph/files/patch-src_xstd_Heap.h   (contents, props changed)
  head/benchmarks/polygraph/files/patch-src_xstd_Ring.h   (contents, props changed)

Added: head/benchmarks/polygraph/files/patch-src_runtime_StatPhase.cc
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/benchmarks/polygraph/files/patch-src_runtime_StatPhase.cc	Tue Oct  1 22:16:39 2013	(r329004)
@@ -0,0 +1,21 @@
+--- src/runtime/StatPhase.cc.orig	2011-04-04 22:07:36.000000000 +0000
++++ src/runtime/StatPhase.cc
+@@ -413,12 +413,12 @@ void StatPhase::noteXactEvent(BcastChann
+ 						break;
+ 				}
+ 		} else {
+-			static CompoundXactInfo &compound = *CompoundXactInfo::Create();
+-			compound.exchanges = 1;
+-			compound.reqSize = reqSize;
+-			compound.repSize = repSize;
+-			compound.lifeTime = repTime;
+-			compound.record(rec.theIsolated);
++			static CompoundXactInfo &compound2 = *CompoundXactInfo::Create();
++			compound2.exchanges = 1;
++			compound2.reqSize = reqSize;
++			compound2.repSize = repSize;
++			compound2.lifeTime = repTime;
++			compound2.record(rec.theIsolated);
+ 		}
+ 
+ 		if (x->cookiesSent() > 0)

Added: head/benchmarks/polygraph/files/patch-src_xstd_Heap.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/benchmarks/polygraph/files/patch-src_xstd_Heap.h	Tue Oct  1 22:16:39 2013	(r329004)
@@ -0,0 +1,11 @@
+--- src/xstd/Heap.h.orig	2011-04-04 22:07:36.000000000 +0000
++++ src/xstd/Heap.h
+@@ -23,7 +23,7 @@ class Heap: protected Array<Item> {
+ 		const Item &top() const { return this->theItems[1]; }
+ 		Item &at(int idx) { return this->theItems[idx+1]; }
+ 
+-		void add(Item v) { append(v); floatUp(++theCnt); }
++		void add(Item v) { this->append(v); floatUp(++theCnt); }
+ 		void skip() { this->theItems[1] = this->theItems[theCnt--]; this->theCount--; sinkDown(1); }
+ 		Item shift() { const Item v = this->theItems[1]; skip(); return v; }
+ 

Added: head/benchmarks/polygraph/files/patch-src_xstd_Ring.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/benchmarks/polygraph/files/patch-src_xstd_Ring.h	Tue Oct  1 22:16:39 2013	(r329004)
@@ -0,0 +1,18 @@
+--- src/xstd/Ring.h.orig	2011-04-04 22:07:36.000000000 +0000
++++ src/xstd/Ring.h
+@@ -22,11 +22,11 @@ class Ring: protected Array<Item> {
+ 		int size() const { return Array<Item>::size(); }
+ 		bool empty() const { return this->theInOff <= this->theOutOff; }
+ 		bool full() const { return count() >= this->theCapacity; }
+-		const Item &top(int off = 0) const { return item((this->theOutOff+off) % this->theCapacity); }
++		const Item &top(int off = 0) const { return this->item((this->theOutOff+off) % this->theCapacity); }
+ 
+-		Item &top(int off = 0) { return item((this->theOutOff+off) % this->theCapacity); }
+-		void enqueue(Item i) { Assert(!full()); item(this->theInOff++ % this->theCapacity) = i; check(); }
+-		Item dequeue() { return item(this->theOutOff++ % this->theCapacity); }
++		Item &top(int off = 0) { return this->item((this->theOutOff+off) % this->theCapacity); }
++		void enqueue(Item i) { Assert(!full()); this->item(this->theInOff++ % this->theCapacity) = i; check(); }
++		Item dequeue() { return this->item(this->theOutOff++ % this->theCapacity); }
+ 
+ 		void reset() { this->theInOff = this->theOutOff = 0; }
+ 		inline void resize(int aCap);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201310012216.r91MGdoX051054>