Check-in [fa307fb8b0]

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

Overview
Comment:Add base TODOs for parts that need to be done.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: fa307fb8b0a4d3e797a76ad1a69e80bb0b6b8cc0
User & Date: stephanie.gawroriski 2019-12-01 16:43:26
Context
2019-12-01
16:46
Cleanup some old fields and methods; Add constant type for class names. check-in: ba772e3cac user: stephanie.gawroriski tags: trunk
16:43
Add base TODOs for parts that need to be done. check-in: fa307fb8b0 user: stephanie.gawroriski tags: trunk
15:47
Correct compilation error. check-in: a20e27f03e user: stephanie.gawroriski tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to runt/klib/supervisor/cc/squirreljme/jvm/lib/ClassDualPoolParser.java.

122
123
124
125
126
127
128
















129
130
131
132
133
134
135
	 * @since 2019/11/25
	 */
	public final PoolClassName entryAsClassName(boolean __rt, int __dx)
		throws IndexOutOfBoundsException, InvalidClassFormatException
	{
		return (PoolClassName)this.entry(__rt, __dx);
	}
















	
	/**
	 * Returns the decoded entry as a string.
	 *
	 * @param __rt Read from the run-time pool?
	 * @param __dx The index to read.
	 * @return The value.







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







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
150
151
	 * @since 2019/11/25
	 */
	public final PoolClassName entryAsClassName(boolean __rt, int __dx)
		throws IndexOutOfBoundsException, InvalidClassFormatException
	{
		return (PoolClassName)this.entry(__rt, __dx);
	}
	
	/**
	 * Returns the decoded entry as class names.
	 *
	 * @param __rt Read from the run-time pool?
	 * @param __dx The index to read.
	 * @return The value.
	 * @throws IndexOutOfBoundsException If the given entry is out of bounds.
	 * @throws InvalidClassFormatException If the pool is not valid.
	 * @since 2019/12/01
	 */
	public final PoolClassName[] entryAsClassNames(boolean __rt, int __dx)
		throws IndexOutOfBoundsException, InvalidClassFormatException
	{
		return (PoolClassName[])this.entry(__rt, __dx);
	}
	
	/**
	 * Returns the decoded entry as a string.
	 *
	 * @param __rt Read from the run-time pool?
	 * @param __dx The index to read.
	 * @return The value.

Changes to runt/klib/supervisor/cc/squirreljme/jvm/task/TaskClass.java.

298
299
300
301
302
303
304








305
306
307
308
309
310
311
312
313
314
315
316
317
318


319






320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338

339
340
341
342
343
344
345
346


347
348
349
350
351
352
353
		// Load super class if there is one
		String superclassname = Objects.toString(thisparser.superClassName(),
			null);
		TaskClass superclass = (superclassname == null ? null :
			__task.loadClass(superclassname));
		if (superclass != null)
			ciutil.setSuperClass(this, superclass);








		
		// The base for this class
		int basesize = (superclass == null ? 0 :
			ciutil.classAllocationSize(superclass));
		ciutil.setBaseSize(this, basesize);
		
		// Allocation size of this class
		ciutil.setClassAllocationSize(this,
			basesize + thisparser.fieldSize(false));
		
		// Set number of objects this has, for garbage collection
		ciutil.setObjectCount(this, thisparser.objectCount(false));
		
		/*


		CLASSINFO_ARRAY_INTERFACECLASSES






		INT_ARRAY_VTABLEVIRTUAL
		INT_ARRAY_VTABLEPOOL
		*/
		
		throw new todo.TODO();
		
		/*
		// {@squirreljme.error SV0l Task does not have ClassInfo in its
		// class path.}
		int cidx = classpath.resourceClassFind("cc/squirreljme/jvm/ClassInfo");
		if (cidx < 0)
			throw new TaskVirtualMachineError("SV0l");
		
		// Get parser for the class info, because we need its info
		ClassFileParser ciparser = new ClassFileParser(
			classpath.resourceData(cidx));
		
		// Need to allocate class data
		TaskAllocator allocator = this.allocator;

		
		// Allocate the space needed to store the class information
		int infopointer = allocator.allocateObject(Constants.OBJECT_BASE_SIZE +
			ciparser.fieldSize(false));
		rv._infopointer = infopointer;
		
		throw new todo.TODO();
		*/


	}
	
	/**
	 * Initializes a primitive type class.
	 *
	 * @param __task The creating task.
	 * @param __cl The class name being initialized.







>
>
>
>
>
>
>
>













|
>
>
|
>
>
>
>
>
>
|
|
<
<
|
|
<
<
<
<
<
<

|
|
<
|
<
<
>
|
<
<
<
<

<
<
>
>







298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337


338
339






340
341
342

343


344
345




346


347
348
349
350
351
352
353
354
355
		// Load super class if there is one
		String superclassname = Objects.toString(thisparser.superClassName(),
			null);
		TaskClass superclass = (superclassname == null ? null :
			__task.loadClass(superclassname));
		if (superclass != null)
			ciutil.setSuperClass(this, superclass);
		
		// Pre-allocate the class VTables since we may need to refer to them!
		if (true)
		{
			// INT_ARRAY_VTABLEVIRTUAL
			// INT_ARRAY_VTABLEPOOL
			throw new todo.TODO();
		}
		
		// The base for this class
		int basesize = (superclass == null ? 0 :
			ciutil.classAllocationSize(superclass));
		ciutil.setBaseSize(this, basesize);
		
		// Allocation size of this class
		ciutil.setClassAllocationSize(this,
			basesize + thisparser.fieldSize(false));
		
		// Set number of objects this has, for garbage collection
		ciutil.setObjectCount(this, thisparser.objectCount(false));
		
		// Initialize interfaces
		if (true)
		{
			// CLASSINFO_ARRAY_INTERFACECLASSES
			throw new todo.TODO();
		}
		
		// Setup the VTables for the class
		if (true)
		{
			// INT_ARRAY_VTABLEVIRTUAL
			// INT_ARRAY_VTABLEPOOL


			throw new todo.TODO();
		}






		
		// Initialize the actual pool constants now
		if (true)

		{


			throw new todo.TODO();
		}




		


		// All done! This class should hopefully work!
		return this;
	}
	
	/**
	 * Initializes a primitive type class.
	 *
	 * @param __task The creating task.
	 * @param __cl The class name being initialized.