Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Base determine of pool type and if it should go in the pool. |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
2be98b73af9453b85a91d18ae1c3b01a |
User & Date: | stephanie.gawroriski 2019-07-20 11:37:55 |
Context
2019-07-20
| ||
12:34 | Implement encode of dual-pool data. check-in: b9d162787e user: stephanie.gawroriski tags: trunk | |
11:37 | Base determine of pool type and if it should go in the pool. check-in: 2be98b73af user: stephanie.gawroriski tags: trunk | |
11:07 | Correct offsets for the Jar and Pack for the dual-pool. check-in: f66e6ba3e8 user: stephanie.gawroriski tags: trunk | |
Changes
Changes to runt/libs/tool-classfile/dev/shadowtail/classfile/mini/DualPoolEncoder.java.
87 88 89 90 91 92 93 94 95 96 97 98 99 100 |
// The value data is appended right after the pool data try (ByteArrayOutputStream vaos = new ByteArrayOutputStream(); DataOutputStream vdos = new DataOutputStream(vaos)) { // Write individual pool entries for (BasicPoolEntry e : pool) { throw new todo.TODO(); } // Merge the value data on top of the base vaos.writeTo(tdos); } |
> > > > > > > > > > > > > |
87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 |
// The value data is appended right after the pool data try (ByteArrayOutputStream vaos = new ByteArrayOutputStream(); DataOutputStream vdos = new DataOutputStream(vaos)) { // Write individual pool entries for (BasicPoolEntry e : pool) { // Determine the type of entry this is Object ev = e.value; MinimizedPoolEntryType etype = MinimizedPoolEntryType.ofClass(ev.getClass()); // {@squirreljme.error JC4d Cannot store the given entry // because it not compatible with the static/run-time // state. (The pool type; The value type; Is the run-time // pool being processed?)} if (isruntime != etype.isRuntime()) throw new IllegalStateException("JC4d " + etype + " " + ev + " " + isruntime); throw new todo.TODO(); } // Merge the value data on top of the base vaos.writeTo(tdos); } |
Changes to runt/libs/tool-classfile/dev/shadowtail/classfile/mini/MinimizedPoolEntryType.java.
56 57 58 59 60 61 62 63 64 65 66 67 68 69 |
USED_STRING, /** The index of a method. */ METHOD_INDEX, /** End. */ ; /** * Returns the type for the specified index. * * @param __i The index to get. * @return The type for this index. * @throws IllegalArgumentException If the type is not valid. |
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > |
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 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 |
USED_STRING, /** The index of a method. */ METHOD_INDEX, /** End. */ ; /** * Can this be in the runtime pool? * * @return If this can be in the runtime pool. * @since 2019/07/20 */ public final boolean isRuntime() { switch (this) { case NULL: case CLASS_NAME: case CLASS_POOL: case ACCESSED_FIELD: case INVOKED_METHOD: case USED_STRING: case METHOD_INDEX: return true; } return false; } /** * Can this be in the static pool? * * @return If this can be in the static pool. * @since 2019/07/20 */ public final boolean isStatic() { switch (this) { case NULL: case STRING: case CLASS_NAMES: case METHOD_DESCRIPTOR: case INTEGER: case FLOAT: case LONG: case DOUBLE: return true; } return false; } /** * Returns the type for the specified index. * * @param __i The index to get. * @return The type for this index. * @throws IllegalArgumentException If the type is not valid. |