|
Authored by: hardmath on Wednesday, May 16 2012 @ 09:46 PM EDT |
Please forgive me in advance for flogging the horse.
Let's say that a symbol is something that represents
something, but is distinct from it.
Sure, when "01" appears printed on a page, that's a symbol
for the value one, not the actual value one. We "lookup"
that visual image in our memory of Arabic numerals to arrive
at its understanding.
But the issue here is what is contained in the instruction
stream. There we find a value, a binary encoded fixed-size
numeric value that stands for itself. It's not a symbol.
The Dalvik VM does not need any context or lookup to use
that that value in performance of the instruction stream.
[NB: There are indeed non-Dalvik cases where software is
loaded and symbolic references contained in the instruction
stream have to be resolved (at runtime)! Those familiar
with Windows software and DLLs (dynamic link libraries) will
recall that entry points in those libraries may be
referenced either by name (symbolic reference) or by number.
When entries points are called by name, Windows has to
search the list of entry points inside the DLL to locate the
corresponding entry point. Calls by number can jump right
to the correct place in that list! The former process is an
example of symbolic resolution at runtime. It often allows
DLLs to be updated independently from the client software
which uses those libraries, because of the flexibility of
resolving the symbolic reference at runtime.]
Symbolic resolution is not the act of adding an offset to a
base address; symbolic resolution is the act of consulting
the context that defines a symbol that tells you what value,
distinct from the symbol itself, is being represented.
The Dalvik bytecode stream requires no resolution of
symbolic references. The field index is not a symbolic
reference. An index, or an offset if you will, into a
memory location is not a symbolic reference that requires
resolution.
You might call it an indirect addressing scheme, since the
index gets added to a base address to get the actual
location. But again this is not symbolic resolution. You
use the actual value given by the instruction stream to
carry out that operation.
---
"Prolog is an efficient programming language because it is a very stupid theorem
prover." -- Richard O'Keefe[ Reply to This | Parent | # ]
|
|
|
|
|