Check-in [25400e6dfe]

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

Overview
Comment:Add base part decode for types which are composed of parts.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 25400e6dfe8d259a1616f47de6374e322c0c7bbd
User & Date: stephanie.gawroriski 2019-09-09 11:05:19
Context
2019-09-10
07:04
Backup developer notes. check-in: 10cdb0c83f user: squirreljme tags: trunk
2019-09-09
11:05
Add base part decode for types which are composed of parts. check-in: 25400e6dfe user: stephanie.gawroriski tags: trunk
10:59
Correct alignment not being written correctly. check-in: 676f9a2f89 user: stephanie.gawroriski tags: trunk
Changes
Hide Diffs Unified Diffs Show Whitespace Changes Patch

Changes to runt/libs/tool-classfile/dev/shadowtail/classfile/mini/DualPoolEncoder.java.

146
147
148
149
150
151
152



































153
154
155
156
157
158
159
						// Read hash code and length
						parts[0] = xd.readUnsignedShort();
						parts[1] = xd.readUnsignedShort();
						
						// Decode actual string
						value = xd.readUTF();
						break;



































						
						// Unknown
					default:
						throw new todo.OOPS(etype.name());
				}
				
				// Record entry







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







146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
						// Read hash code and length
						parts[0] = xd.readUnsignedShort();
						parts[1] = xd.readUnsignedShort();
						
						// Decode actual string
						value = xd.readUTF();
						break;
						
						// Everything else just consists of parts which are
						// either values to other indexes or an ordinal
					case ACCESSED_FIELD:
					case CLASS_INFO_POINTER:
					case CLASS_NAME:
					case CLASS_NAMES:
					case CLASS_POOL:
					case DOUBLE:
					case LONG:
					case INVOKED_METHOD:
					case METHOD_DESCRIPTOR:
					case METHOD_INDEX:
					case USED_STRING:
						// Read parts
						if (iswide)
							for (int p = 0; p < numparts; p++)
								parts[p] = xd.readUnsignedShort();
						else
							for (int p = 0; p < numparts; p++)
								parts[p] = xd.readByte() & 0xFF;
						
						// Build value depending on the parts used
						switch (etype)
						{
							case CLASS_NAME:
								if (true)
									throw new todo.TODO();
								break;
							
								// Unknown
							default:
								throw new todo.OOPS(etype.name());
						}
						break;
						
						// Unknown
					default:
						throw new todo.OOPS(etype.name());
				}
				
				// Record entry