Check-in [3382ce9d92]

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

Overview
Comment:Correct load of string constant entries (use UsedString); Add get of this name for a class.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 3382ce9d922312ebf507755f71139ceb09841800
User & Date: stephanie.gawroriski 2019-09-11 22:59:18
Context
2019-09-12
00:16
Remove some debug code. check-in: a41cf59111 user: stephanie.gawroriski tags: trunk
2019-09-11
22:59
Correct load of string constant entries (use UsedString); Add get of this name for a class. check-in: 3382ce9d92 user: stephanie.gawroriski tags: trunk
15:19
Add by index in DCRP. check-in: 46de5da585 user: stephanie.gawroriski tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

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

   289    289   	 * Returns the name of the current class.
   290    290   	 *
   291    291   	 * @return The name of the current class.
   292    292   	 * @since 2019/04/17
   293    293   	 */
   294    294   	public final ClassName thisName()
   295    295   	{
   296         -		throw new todo.TODO();
   297         -		/*
   298         -		return this.pool.<ClassName>get(
   299         -			this.header.classname, ClassName.class);
   300         -		*/
          296  +		return this.pool.getByIndex(false, this.header.classname).
          297  +			<ClassName>value(ClassName.class);
   301    298   	}
   302    299   	
   303    300   	/**
   304    301   	 * Decodes and returns the minimized representation of the class file.
   305    302   	 *
   306    303   	 * @param __is The stream to decode from.
   307    304   	 * @return The resulting minimized class.

Changes to runt/libs/tool-classfile/dev/shadowtail/classfile/nncc/NearNativeByteCodeHandler.java.

  1166   1166   		{
  1167   1167   			// Need volatiles
  1168   1168   			VolatileRegisterStack volatiles = this.volatiles;
  1169   1169   			
  1170   1170   			// Load the string pointer into a temporary
  1171   1171   			int volstrptr = volatiles.get();
  1172   1172   			codebuilder.add(NativeInstructionType.LOAD_POOL,
  1173         -				__v, volstrptr);
         1173  +				new UsedString((String)__v), volstrptr);
  1174   1174   			
  1175   1175   			// Call internal string loader
  1176   1176   			this.__invokeStatic(InvokeType.STATIC, JVMFUNC_CLASS,
  1177   1177   				"jvmLoadString", "(I)Ljava/lang/String;", volstrptr);
  1178   1178   			
  1179   1179   			// Cleanup
  1180   1180   			volatiles.remove(volstrptr);