Check-in [4a34560d8e]

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

Overview
Comment:Remove a bunch of notes except from the GC.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:4a34560d8e069dfd72ecc03d8347db9ed8353393
User & Date: stephanie.gawroriski 2019-06-14 18:20:07
Context
2019-06-14
18:23
Add JVMFunction.jvmLoadStringNoIntern(). check-in: c04fe0c5c9 user: stephanie.gawroriski tags: trunk
18:20
Remove a bunch of notes except from the GC. check-in: 4a34560d8e user: stephanie.gawroriski tags: trunk
18:18
Remove note strings in the bootstrap. check-in: 48adcac4bf user: stephanie.gawroriski tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

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

53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
...
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
...
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
	 * @since 2019/05/26
	 */
	public static final int allocate(int __sz)
	{
		// The number of desired bytes
		int want = CHUNK_LENGTH + (__sz <= 4 ? 4 : ((__sz + 3) & (~3)));
		
		// Debug
		todo.DEBUG.code('A', 'l', __sz);
		
		// Go through the memory chunks to locate a free chunk
		int seeker = Allocator._rambase;
		while (seeker != 0)
		{
			// Read chunk properties
			int csz = Assembly.memReadInt(seeker, CHUNK_SIZE_OFFSET),
				cnx = Assembly.memReadInt(seeker, CHUNK_NEXT_OFFSET);
................................................................................
				}
				
				// Clear out memory since Java expects the data to be
				// initialized to zero always
				for (int i = CHUNK_LENGTH; i < want; i += 4)
					Assembly.memWriteInt(seeker, i, 0);
				
				// Debug
				todo.DEBUG.code('A', 'p', rv);
				
				// Use this chunk
				return rv;
			}
			
			// Go to the next chunk
			seeker = cnx;
		}
................................................................................
	 * @since 2019/05/27
	 */
	static final void free(int __p)
	{
		if (__p == 0 || __p == Constants.BAD_MAGIC)
			throw new VirtualMachineError();
		
		// Debug
		todo.DEBUG.code('A', 'f', __p);
		
		// Determine the seeker position for this chunk
		int seeker = __p - CHUNK_LENGTH;
		
		// Read chunk properties
		int csz = Assembly.memReadInt(seeker, CHUNK_SIZE_OFFSET),
			cnx = Assembly.memReadInt(seeker, CHUNK_NEXT_OFFSET);
		







<
<
<







 







<
<
<







 







<
<
<







53
54
55
56
57
58
59



60
61
62
63
64
65
66
...
101
102
103
104
105
106
107



108
109
110
111
112
113
114
...
124
125
126
127
128
129
130



131
132
133
134
135
136
137
	 * @since 2019/05/26
	 */
	public static final int allocate(int __sz)
	{
		// The number of desired bytes
		int want = CHUNK_LENGTH + (__sz <= 4 ? 4 : ((__sz + 3) & (~3)));
		



		// Go through the memory chunks to locate a free chunk
		int seeker = Allocator._rambase;
		while (seeker != 0)
		{
			// Read chunk properties
			int csz = Assembly.memReadInt(seeker, CHUNK_SIZE_OFFSET),
				cnx = Assembly.memReadInt(seeker, CHUNK_NEXT_OFFSET);
................................................................................
				}
				
				// Clear out memory since Java expects the data to be
				// initialized to zero always
				for (int i = CHUNK_LENGTH; i < want; i += 4)
					Assembly.memWriteInt(seeker, i, 0);
				



				// Use this chunk
				return rv;
			}
			
			// Go to the next chunk
			seeker = cnx;
		}
................................................................................
	 * @since 2019/05/27
	 */
	static final void free(int __p)
	{
		if (__p == 0 || __p == Constants.BAD_MAGIC)
			throw new VirtualMachineError();
		



		// Determine the seeker position for this chunk
		int seeker = __p - CHUNK_LENGTH;
		
		// Read chunk properties
		int csz = Assembly.memReadInt(seeker, CHUNK_SIZE_OFFSET),
			cnx = Assembly.memReadInt(seeker, CHUNK_NEXT_OFFSET);
		

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

406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
...
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
		
		// Write class information with an initial count of one
		Assembly.memWriteInt(rv, Constants.OBJECT_CLASS_OFFSET,
			__cl);
		Assembly.memWriteInt(rv, Constants.OBJECT_COUNT_OFFSET,
			1);
		
		// Debug
		todo.DEBUG.code('N', 'E', rv);
		todo.DEBUG.code('N', 'c', __cl);
		
		// Use this pointer
		return rv;
	}
	
	/**
	 * Allocates a new array.
	 *
................................................................................
			__at);
		Assembly.memWriteInt(rv, Constants.OBJECT_COUNT_OFFSET,
			1);
		
		// Write length of array
		Assembly.memWriteInt(rv, Constants.ARRAY_LENGTH_OFFSET,
			__len);
			
		// Debug
		todo.DEBUG.code('N', 'A', rv);
		
		// Use this pointer
		return rv;
	}
	
	/**
	 * If this is an invoked then it just throws an exception to indicate that







<
<
<
<







 







<
<
<







406
407
408
409
410
411
412




413
414
415
416
417
418
419
...
456
457
458
459
460
461
462



463
464
465
466
467
468
469
		
		// Write class information with an initial count of one
		Assembly.memWriteInt(rv, Constants.OBJECT_CLASS_OFFSET,
			__cl);
		Assembly.memWriteInt(rv, Constants.OBJECT_COUNT_OFFSET,
			1);
		




		// Use this pointer
		return rv;
	}
	
	/**
	 * Allocates a new array.
	 *
................................................................................
			__at);
		Assembly.memWriteInt(rv, Constants.OBJECT_COUNT_OFFSET,
			1);
		
		// Write length of array
		Assembly.memWriteInt(rv, Constants.ARRAY_LENGTH_OFFSET,
			__len);



		
		// Use this pointer
		return rv;
	}
	
	/**
	 * If this is an invoked then it just throws an exception to indicate that