Closed Bug 397711 Opened 17 years ago Closed 17 years ago

Typo in MMgc/WriteBarrier.h

Categories

(Tamarin Graveyard :: Garbage Collection (mmGC), defect)

defect
Not set
normal

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: jorendorff, Unassigned)

Details

Attachments

(1 file)

Attached patch v1Splinter Review
The || here should be &&, right?

		T set(const T tNew)
		{
			if(t != tNew || tNew != 0)
				GC::WriteBarrier(this, (const void*)tNew);
			else
				t = tNew;
			return tNew;
		}

The typo doesn't cause any problems, but it looks like this code doesn't prevent the call to GC::WriteBarrier as often as it's intended to.
Attachment #282474 - Flags: review?(treilly)
Comment on attachment 282474 [details] [diff] [review]
v1

looks fine, plus, if t == tNew then the WB could be a no-op.  not sure if the extra branching is worth it.
Attachment #282474 - Flags: review+
Attachment #282474 - Flags: review?(treilly) → review+
Pushed changeset d65a6b20f353 to tamarin-central.
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: