Check-in [c912608401]

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

Overview
Comment:Do not fail class load if the class is considered special.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: c91260840148ff585f067c424f1d82b79ddce655
User & Date: stephanie.gawroriski 2019-11-09 13:09:51
Context
2019-11-09
14:45
Implement FATAL_TODO system call. check-in: 0687f713f9 user: stephanie.gawroriski tags: trunk
13:09
Do not fail class load if the class is considered special. check-in: c912608401 user: stephanie.gawroriski tags: trunk
13:03
Add check to determine if a class name is an array or primitive type. check-in: 62e0ed21e9 user: stephanie.gawroriski tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

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

105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
		synchronized (this)
		{
			// Already made?
			rv = classes.get(__cl);
			if (rv != null)
				return rv;
			
			// {@squirreljme.error SV0m The specified class does not exist.
			// (The class which does not exist)}
			int cldx = this.classpath.resourceClassFind(__cl);
			if (cldx < 0)
				throw new TaskNoSuchClassException("SV0m " + __cl);
			
			// Setup new one and store it
			classes.put(__cl, (rv = new TaskClass(cldx)));
			
			// Pre-initialize the class
			rv.initializeClassInfoSetup(this);
		}
		
		// Perform post initialization as needed
		return rv.initializeClassInfo(this);
	}
	
	/**
	 * Loads an object array with the given values and class type.
	 *
	 * @param __cl The class type.
	 * @param __vs The values to store.







|
|

|






|



|







105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
		synchronized (this)
		{
			// Already made?
			rv = classes.get(__cl);
			if (rv != null)
				return rv;
			
			// {@squirreljme.error SV0m The specified class does not exist
			// and it is not a special class. (The class which does not exist)}
			int cldx = this.classpath.resourceClassFind(__cl);
			if (cldx < 0 && !ClassNameUtils.isSpecial(__cl))
				throw new TaskNoSuchClassException("SV0m " + __cl);
			
			// Setup new one and store it
			classes.put(__cl, (rv = new TaskClass(cldx)));
			
			// Pre-initialize the class
			rv.initializeClassInfoSetup(this, __cl);
		}
		
		// Perform post initialization as needed
		return rv.initializeClassInfo(this, __cl);
	}
	
	/**
	 * Loads an object array with the given values and class type.
	 *
	 * @param __cl The class type.
	 * @param __vs The values to store.

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

55
56
57
58
59
60
61

62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79

80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
		return rv;
	}
	
	/**
	 * Performs the main initialization of this class.
	 *
	 * @param __task The creating task.

	 * @return {@code this}.
	 * @throws NullPointerException On null arguments.
	 * @since 2019/10/27
	 */
	public final TaskClass initializeClassInfo(Task __task)
		throws NullPointerException
	{
		if (__task == null)
			throw new NullPointerException("NARG");
		
		throw new todo.TODO();
	}
	
	/**
	 * Performs enough setup of the class info to rever to it when the
	 * class table is not locked.
	 *
	 * @param __task The creating task.

	 * @return {@code this}.
	 * @throws NullPointerException On null arguments.
	 * @since 2019/10/27
	 */
	public final TaskClass initializeClassInfoSetup(Task __task)
		throws NullPointerException
	{
		if (__task == null)
			throw new NullPointerException("NARG");
		
		throw new todo.TODO();
		
		/*
		// {@squirreljme.error SV0l Task does not have ClassInfo in its
		// class path.}







>




|


|










>




|


|







55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
		return rv;
	}
	
	/**
	 * Performs the main initialization of this class.
	 *
	 * @param __task The creating task.
	 * @param __cl The class name being initialized.
	 * @return {@code this}.
	 * @throws NullPointerException On null arguments.
	 * @since 2019/10/27
	 */
	public final TaskClass initializeClassInfo(Task __task, String __cl)
		throws NullPointerException
	{
		if (__task == null || __cl == null)
			throw new NullPointerException("NARG");
		
		throw new todo.TODO();
	}
	
	/**
	 * Performs enough setup of the class info to rever to it when the
	 * class table is not locked.
	 *
	 * @param __task The creating task.
	 * @param __cl The class name being initialized.
	 * @return {@code this}.
	 * @throws NullPointerException On null arguments.
	 * @since 2019/10/27
	 */
	public final TaskClass initializeClassInfoSetup(Task __task, String __cl)
		throws NullPointerException
	{
		if (__task == null || __cl == null)
			throw new NullPointerException("NARG");
		
		throw new todo.TODO();
		
		/*
		// {@squirreljme.error SV0l Task does not have ClassInfo in its
		// class path.}