Check-in [84e6aa7adb]

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

Overview
Comment:Do not read the table of contents offset and entry count in BootLibrary() because it triggers builds in plain SummerCoat.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 84e6aa7adb253a69cdab28c42996625dee758ea4
User & Date: stephanie.gawroriski 2019-06-30 21:38:25
Context
2019-06-30
23:29
Image.getGraphics() correctly enables the alpha channel if one is used; Rework GameCanvas to use a raw pixel buffer. check-in: 755b182ede user: stephanie.gawroriski tags: trunk
21:38
Do not read the table of contents offset and entry count in BootLibrary() because it triggers builds in plain SummerCoat. check-in: 84e6aa7adb user: stephanie.gawroriski tags: trunk
19:53
Always exit all profiler frames with the launcher exits; Add extra profiling to SummerCoat (breakpoint and syscalls). check-in: ca8f827836 user: stephanie.gawroriski tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to runt/klib/supervisor/cc/squirreljme/jvm/BootLibrary.java.

55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
..
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
...
109
110
111
112
113
114
115
116

117
118
119
120
121
122
123
124
	
	/** Manifest address. */
	protected final int manifestaddress;
	
	/** Manifest length. */
	protected final int manifestlength;
	
	/** The table of contents address. */
	protected final int tocaddress;
	
	/** The number of entries in the table of contents. */
	protected final int entrycount;
	
	/**
	 * Initializes the boot library.
	 *
	 * @param __name The name of the library.
	 * @param __addr The JAR address.
	 * @param __len The JAR length.
	 * @param __maddr The manifest address.
................................................................................
			throw new NullPointerException("NARG");
		
		this.name = __name;
		this.address = __addr;
		this.length = __len;
		this.manifestaddress = __maddr;
		this.manifestlength = __mlen;
		
		// Read table of contents info
		this.tocaddress = __addr +
			Assembly.memReadJavaInt(__addr, TOC_OFFSET_OFFSET);
		this.entrycount = Assembly.memReadJavaInt(__addr, NUMRC_OFFSET);
	}
	
	/**
	 * Locates the given resource.
	 *
	 * @param __name The name of the resource to get.
	 * @return The index of the resource or {@code -1} if it was not found.
................................................................................
			throw new NullPointerException("NARG");
		
		// Hash code for this string
		int hash = __name.hashCode();
		
		// Scan through the table of contents
		int bp = this.address,
			sp = this.tocaddress;

		for (int i = 0, n = this.entrycount; i < n; i++, sp += TOC_ENTRY_SIZE)
		{
			// Hash code does not match
			if (hash != Assembly.memReadJavaInt(sp, TOC_HASHCODE_OFFSET))
				continue;
			
			// Is at this index
			if (__name.equals(JVMFunction.jvmLoadString(







<
<
<
<
<
<







 







<
<
<
<
<







 







|
>
|







55
56
57
58
59
60
61






62
63
64
65
66
67
68
..
78
79
80
81
82
83
84





85
86
87
88
89
90
91
..
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
	
	/** Manifest address. */
	protected final int manifestaddress;
	
	/** Manifest length. */
	protected final int manifestlength;
	






	/**
	 * Initializes the boot library.
	 *
	 * @param __name The name of the library.
	 * @param __addr The JAR address.
	 * @param __len The JAR length.
	 * @param __maddr The manifest address.
................................................................................
			throw new NullPointerException("NARG");
		
		this.name = __name;
		this.address = __addr;
		this.length = __len;
		this.manifestaddress = __maddr;
		this.manifestlength = __mlen;





	}
	
	/**
	 * Locates the given resource.
	 *
	 * @param __name The name of the resource to get.
	 * @return The index of the resource or {@code -1} if it was not found.
................................................................................
			throw new NullPointerException("NARG");
		
		// Hash code for this string
		int hash = __name.hashCode();
		
		// Scan through the table of contents
		int bp = this.address,
			sp = bp + Assembly.memReadJavaInt(bp, TOC_OFFSET_OFFSET);
		for (int i = 0, n = Assembly.memReadJavaInt(bp, NUMRC_OFFSET); i < n;
			i++, sp += TOC_ENTRY_SIZE)
		{
			// Hash code does not match
			if (hash != Assembly.memReadJavaInt(sp, TOC_HASHCODE_OFFSET))
				continue;
			
			// Is at this index
			if (__name.equals(JVMFunction.jvmLoadString(