Check-in [6b5cc6c99a]

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

Overview
Comment:Add base for targetted pool builder which will either directly or through an alias write the target pool.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 6b5cc6c99a98b532bcda691d71dce4f88c7b1feb
User & Date: stephanie.gawroriski 2019-07-27 11:22:31
Context
2019-07-28
07:02
Backup developer notes. check-in: 68cc73b212 user: squirreljme tags: trunk
2019-07-27
11:22
Add base for targetted pool builder which will either directly or through an alias write the target pool. check-in: 6b5cc6c99a user: stephanie.gawroriski tags: trunk
2019-07-26
07:02
Backup developer notes. check-in: 13dcb6c31e user: squirreljme tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

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

59
60
61
62
63
64
65






66

67
68
69
70
71
72
73
..
78
79
80
81
82
83
84







85
86
87
88
89
90
91
	/** Counter for UUIDs. */
	private static volatile int _UUID_COUNTER =
		17;
	
	/** The class file to minimize. */
	protected final ClassFile input;
	






	/** The constant pool builder to use. */

	protected final MinimizedPoolBuilder pool =
		new MinimizedPoolBuilder();
	
	/**
	 * Initializes the minimizer.
	 *
	 * @param __dp The dual constant pool to use, may be null.
................................................................................
	private Minimizer(DualClassRuntimePoolBuilder __dp, ClassFile __cf)
		throws NullPointerException
	{
		if (__cf == null)
			throw new NullPointerException("NARG");
		
		this.input = __cf;







	}
	
	/**
	 * Performs the minimization process.
	 *
	 * @param __dos The stream to write the result to.
	 * @throws IOException On write errors.







>
>
>
>
>
>

>







 







>
>
>
>
>
>
>







59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
..
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
	/** Counter for UUIDs. */
	private static volatile int _UUID_COUNTER =
		17;
	
	/** The class file to minimize. */
	protected final ClassFile input;
	
	/** The targetted pool. */
	protected final TargettedPoolBuilder targetpool;
	
	/** The backed dual pool. */
	protected final DualClassRuntimePoolBuilder dualpool;
	
	/** The constant pool builder to use. */
	@Deprecated
	protected final MinimizedPoolBuilder pool =
		new MinimizedPoolBuilder();
	
	/**
	 * Initializes the minimizer.
	 *
	 * @param __dp The dual constant pool to use, may be null.
................................................................................
	private Minimizer(DualClassRuntimePoolBuilder __dp, ClassFile __cf)
		throws NullPointerException
	{
		if (__cf == null)
			throw new NullPointerException("NARG");
		
		this.input = __cf;
		
		// The target pool is the one where we place entries into
		boolean aliaspool = (__dp != null);
		this.targetpool = new TargettedPoolBuilder(aliaspool,
			(__dp == null ?
				(__dp = new DualClassRuntimePoolBuilder()) : __dp));
		this.dualpool = __dp;
	}
	
	/**
	 * Performs the minimization process.
	 *
	 * @param __dos The stream to write the result to.
	 * @throws IOException On write errors.

Added runt/libs/tool-classfile/dev/shadowtail/classfile/mini/TargettedPoolBuilder.java.



























































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
// -*- Mode: Java; indent-tabs-mode: t; tab-width: 4 -*-
// ---------------------------------------------------------------------------
// Multi-Phasic Applications: SquirrelJME
//     Copyright (C) Stephanie Gawroriski <xer@multiphasicapps.net>
// ---------------------------------------------------------------------------
// SquirrelJME is under the GNU General Public License v3+, or later.
// See license.mkd for licensing and copyright information.
// ---------------------------------------------------------------------------

package dev.shadowtail.classfile.mini;

import dev.shadowtail.classfile.pool.DualClassRuntimePoolBuilder;

/**
 * This is used to to build either an aliased pool or a standard pool depending
 * on which setting is used.
 *
 * @since 2019/07/27
 */
public final class TargettedPoolBuilder
{
	/** Is this working in aliased mode? */
	protected final boolean isaliaspool;
	
	/** The target dual pool. */
	protected final DualClassRuntimePoolBuilder dualpool;
	
	/**
	 * Initializes the targetted pool builder.
	 *
	 * @param __ap The alias pool.
	 * @param __dp The dual-pool.
	 * @since 2019/07/27
	 */
	public TargettedPoolBuilder(boolean __ap, DualClassRuntimePoolBuilder __dp)
		throws NullPointerException
	{
		if (__dp == null)
			throw new NullPointerException("NARG");
		
		this.isaliaspool = __ap;
		this.dualpool = __dp;
	}
}