[BUG;FIX] TestInterpreterPlugin

Andrew C. Greenberg werdna at gate.net
Mon Dec 13 12:50:34 UTC 1999


--============_-1267033060==_============
Content-Type: text/plain; charset="us-ascii" ; format="flowed"


I had hoped to get TestInterpeterPlugin smart enough to avoid 
inserting too many excess checks for primitive failure.  Made it too 
smart, so there weren't any at all.  Oops.  This changeset appears to 
fix the problem for now, while still retaining the fix of the bug 
reported by Stephan in the last changeset.

There remains a subtle bug (that existed in the earlier code as well) 
concerning  return expressions that can fail.  In particular,

	^ expression-that-can-fail

is translated as:

	(1) check for primitive failure, return if failed
	(2) evaluate expression
	(3) pop and push expression result
	(4) return

which is fine, except when the expression fails, in which case the 
stack will be corrupted.  For now, a workaround is:

	t := expression-that-can-fail.
	^t

which will be translated correctly, except for the obscure case where 
t expects to be guarded by a check for primitive failure.  In the 
latter case, that guard needs to be placed in the code.

which will be translated correctly.  I hoped to have this ready for 
tonight, but a summary judgment motion awaits me at the office, and I 
didn't have adequate time to test the code for release.  I expect to 
have this fixed in the next changeset.
--============_-1267033060==_============
Content-Type: text/plain; name="TestInterpreterPlugin4.1.cs"
 ; x-mac-type="65417070"
 ; x-mac-creator="43534F6D"
Content-Disposition: attachment; filename="TestInterpreterPlugin4.1.cs"
Content-Transfer-Encoding: imap_stub

0,2308,2.2,2544,0,

--============_-1267033060==_============--





More information about the Squeak-dev mailing list