Check-in [9745a97fdb]

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

Overview
Comment:Add more debug notes to GC object.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:9745a97fdbc1827c14d423ce4f25e0cbd66cc349
User & Date: stephanie.gawroriski 2019-06-13 23:17:00
Context
2019-06-13
23:17
Remove unused tempreg. check-in: e6d63d5a12 user: stephanie.gawroriski tags: trunk
23:17
Add more debug notes to GC object. check-in: 9745a97fdb user: stephanie.gawroriski tags: trunk
22:40
Count the return register field after the copy. check-in: 6e3ea4929a user: stephanie.gawroriski tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to runt/klib/supervisor/cc/squirreljme/jvm/JVMFunction.java.

115
116
117
118
119
120
121


122
123
124


125
126
127
128
129
130
131
132
133
134
135
136


137
138
139
140
141
142
143
		// Get class info for this type
		ClassInfo pinfo = Assembly.pointerToClassInfo(pcl);
		
		// If this is an array, elements have to be uncounted
		// Instance fields can be skipped for non-object arrays
		if ((pinfo.flags & Constants.CIF_IS_ARRAY) != 0)
		{


			// This only needs to be done for objects
			if ((pinfo.flags & Constants.CIF_IS_ARRAY_OF_OBJECTS) != 0)
			{


				// Go through all elements and uncount them
				for (int i = 0, n = Assembly.memReadInt(__p,
					Constants.ARRAY_LENGTH_OFFSET),
					bp = __p + Constants.ARRAY_BASE_SIZE,
					xp = 0; i < n; i++, xp += 4)
					Assembly.refUncount(Assembly.memReadInt(bp, 0));
			}
		}
		
		// Otherwise uncount the instance field information
		else
		{


			// Go through all classes in the class chain
			for (ClassInfo ro = pinfo; ro != null; ro = ro.superclass)
			{
				// Actual base position for the objects in the instances
				int rbase = __p + ro.base;
				
				// Clear all offsets in the object







>
>



>
>












>
>







115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
		// Get class info for this type
		ClassInfo pinfo = Assembly.pointerToClassInfo(pcl);
		
		// If this is an array, elements have to be uncounted
		// Instance fields can be skipped for non-object arrays
		if ((pinfo.flags & Constants.CIF_IS_ARRAY) != 0)
		{
			todo.DEBUG.code('G', 'a', 1);
			
			// This only needs to be done for objects
			if ((pinfo.flags & Constants.CIF_IS_ARRAY_OF_OBJECTS) != 0)
			{
				todo.DEBUG.code('G', 'o', 1);
				
				// Go through all elements and uncount them
				for (int i = 0, n = Assembly.memReadInt(__p,
					Constants.ARRAY_LENGTH_OFFSET),
					bp = __p + Constants.ARRAY_BASE_SIZE,
					xp = 0; i < n; i++, xp += 4)
					Assembly.refUncount(Assembly.memReadInt(bp, 0));
			}
		}
		
		// Otherwise uncount the instance field information
		else
		{
			todo.DEBUG.code('G', 'o', 1);
			
			// Go through all classes in the class chain
			for (ClassInfo ro = pinfo; ro != null; ro = ro.superclass)
			{
				// Actual base position for the objects in the instances
				int rbase = __p + ro.base;
				
				// Clear all offsets in the object