RE: [Sablevm-developer] reflection classes for constant pool and bytecode data
Brought to you by:
egagnon
From: Andrew P. <apu...@ac...> - 2000-08-19 01:38:14
|
> Etienne M. Gagnon <eg...@j-...> wrote: > > public class org.sablevm.vm.Constant_UTF8 > > public class org.sablevm.vm.Constant_Unicode > > I am unsure about these two... Why not keep a single > "org.sablevm.vm.Constant_String", as the interpreter has > presumably already a native global reference to the string? I just wanted to make the source encoding explicit in the constant class type. > > public int size() { return 2; } > > Why the "size"? Don't you assume a long is 64 bits, as per > specification? On a 64 bit processor, this would be a single > word. We shouldn't make the JIT interface specific to an > architecture. Size means "number of 32 bit words". I guess its not really necessary. > > public class org.sablevm.vm.Opcode { ... }; > > As I said earlier, it would be possible to keep the original > code array around, to shield the JIT from SableVM specific > internal codes,as much as possible. SableVM encodes the > destination of branches using absolute addresses. You > certainly don't want to reverse engineer those addresses! Hmm. I was thinking I might gain insight by looking at the internal codes (although I haven't anything specific yet). However, I suppose use of absolute addressing in the internal codes isn't going to be the only problem down the road (and it is a problem now), so I'll stick to using the original Java bytecode. I haven't had much time this week to work on this. Hopefully next week will be kinder... Andy |