Check-in [6a5232a82c]

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Reference count objects before they are returned.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:6a5232a82c4fad74c6d7835f88cb2c172298c4c1
User & Date: stephanie.gawroriski 2019-06-13 22:40:21
Context
2019-06-13
22:40
Count the return register field after the copy. check-in: 6e3ea4929a user: stephanie.gawroriski tags: trunk
22:40
Reference count objects before they are returned. check-in: 6a5232a82c user: stephanie.gawroriski tags: trunk
22:31
Remove BREAKPOINT/TODO. check-in: 9263683e9f user: stephanie.gawroriski tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to runt/libs/tool-classfile/dev/shadowtail/classfile/nncc/NearNativeByteCodeHandler.java.

1093
1094
1095
1096
1097
1098
1099

1100
1101
1102
1103
1104
1105
1106




1107
1108
1109
1110
1111
1112
1113
		
		// Returning a value? Copy it to the return register
		if (__in != null)
		{
			int a = __in.register,
				b = NativeCode.RETURN_REGISTER;
			

			if (__in.type.isWide())
			{
				codebuilder.addCopy(a, b);
				codebuilder.addCopy(a + 1, b + 1);
			}
			else
				codebuilder.addCopy(a, b);




		}
		
		// Uncount anything which was enqueued
		for (int q : this.state.result.enqueue())
			this.__refUncount(q);
		
		// Do the return







>







>
>
>
>







1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
		
		// Returning a value? Copy it to the return register
		if (__in != null)
		{
			int a = __in.register,
				b = NativeCode.RETURN_REGISTER;
			
			// Copy value to return register
			if (__in.type.isWide())
			{
				codebuilder.addCopy(a, b);
				codebuilder.addCopy(a + 1, b + 1);
			}
			else
				codebuilder.addCopy(a, b);
			
			// If we are returning an object, we need to reference count it
			if (__in.isObject())
				this.__refCount(__in.register);
		}
		
		// Uncount anything which was enqueued
		for (int q : this.state.result.enqueue())
			this.__refUncount(q);
		
		// Do the return