Check-in [72e75dd2b4]

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

Overview
Comment:After an object is garbage collected, clear the register to zero.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 72e75dd2b4a7d42690714b83dc3f0af5f57299af
User & Date: stephanie.gawroriski 2019-11-30 19:59:18
Context
2019-11-30
20:12
In Throwable remove __debug(), a hiya appended to a message, and breakpoint on OOM. check-in: 7a4d1e94cc user: stephanie.gawroriski tags: trunk
19:59
After an object is garbage collected, clear the register to zero. check-in: 72e75dd2b4 user: stephanie.gawroriski tags: trunk
18:35
Do not trash the exception register when making static invocations that are needed by the JVM to function. check-in: 60c87c0fb4 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.

3212
3213
3214
3215
3216
3217
3218



3219
3220
3221
3222
3223
3224
3225
		
		// If the count is still positive, we do not GC
		codebuilder.addIfNonZero(volnowcount, ncj);
		
		// Call garbage collect on object via helper
		this.__invokeStatic(InvokeType.SYSTEM, JVMFUNC_CLASS,
			"jvmGarbageCollectObject", "(I)V", __r);



		
		// No uncount or not GCed are jumped here
		codebuilder.label(ncj);
		
		// No longer needed
		volatiles.remove(volnowcount);
	}







>
>
>







3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
		
		// If the count is still positive, we do not GC
		codebuilder.addIfNonZero(volnowcount, ncj);
		
		// Call garbage collect on object via helper
		this.__invokeStatic(InvokeType.SYSTEM, JVMFUNC_CLASS,
			"jvmGarbageCollectObject", "(I)V", __r);
		
		// Reset the variable to zero to prevent it from being used again
		codebuilder.addCopy(NativeCode.ZERO_REGISTER, __r);
		
		// No uncount or not GCed are jumped here
		codebuilder.label(ncj);
		
		// No longer needed
		volatiles.remove(volnowcount);
	}