Class StackEntry

java.lang.Object
  |
  +--StackEntry

class StackEntry
extends java.lang.Object
implements JVM


Field Summary
(package private)  StackEntry next
          the next entry on the stack, just below this one.
(package private)  java.lang.String signature
          the type signature of this entry.
(package private)  int size
          the size of this entry (1 or 2).
(package private)  int[] sourceIDs
          An identifier for this value.
 
Constructor Summary
(package private) StackEntry(java.lang.String signature, int[] sourceIDs, StackEntry next)
          constructs a new stack entry.
(package private) StackEntry(java.lang.String signature, int sourceID, StackEntry next)
          constructs a new stack entry.
 
Method Summary
(package private)  StackEntry dupDouble()
          duplicate the top size-2 stack entry (or two size-1 entries).
(package private)  StackEntry dupDoubleBury1()
          duplicate the top size-2 stack entry (or two size-1 entries) and bury it (or them) 1 place down.
(package private)  StackEntry dupDoubleBury2()
          duplicate the top size-2 stack entry (or two size-1 entries) and bury it (or them) 2 places down.
(package private)  StackEntry dupSingle()
          duplicate the top size-1 stack entry.
(package private)  StackEntry dupSingleBury1()
          duplicate the top size-1 stack entry and bury it 1 place down.
(package private)  StackEntry dupSingleBury2()
          duplicate the top size-1 stack entry and bury it 2 places down (or 1 size-2-place down).
(package private) static StackEntry merge(StackEntry first, StackEntry other)
          merge 2 stacks producing a common description.
(package private)  StackEntry popDouble()
          pop a size-2 value from stack.
(package private)  StackEntry popNWords(int n)
          pops a given number of size-1 words from the stack.
(package private)  StackEntry popSingle()
          pop a size-1 value from stack.
(package private)  StackEntry push(java.lang.String signature, int sourceID)
          push one value (size 1 or 2) onto stack.
(package private)  StackEntry push(java.lang.String signature, int[] sourceIDs)
          push one value (size 1 or 2) onto stack.
(package private)  StackEntry swapSingle()
          swap the 2 top stack entries (size-1).
 java.lang.String toString()
          readable description of the whole stack, not just the top entry.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, wait, wait, wait
 

Field Detail

signature

java.lang.String signature
the type signature of this entry.

size

int size
the size of this entry (1 or 2).

sourceIDs

int[] sourceIDs
An identifier for this value. Normally, we use the index of the op-code generating this value.

next

StackEntry next
the next entry on the stack, just below this one. Bottom-of-stack is denoted by a null value.
Constructor Detail

StackEntry

StackEntry(java.lang.String signature,
           int sourceID,
           StackEntry next)
constructs a new stack entry.

StackEntry

StackEntry(java.lang.String signature,
           int[] sourceIDs,
           StackEntry next)
constructs a new stack entry.
Method Detail

push

StackEntry push(java.lang.String signature,
                int sourceID)
push one value (size 1 or 2) onto stack.

push

StackEntry push(java.lang.String signature,
                int[] sourceIDs)
push one value (size 1 or 2) onto stack.

popSingle

StackEntry popSingle()
pop a size-1 value from stack.

popDouble

StackEntry popDouble()
pop a size-2 value from stack.

popNWords

StackEntry popNWords(int n)
pops a given number of size-1 words from the stack. The stack may also contain size-2 entries, counting for 2 words.

swapSingle

StackEntry swapSingle()
swap the 2 top stack entries (size-1).

dupSingle

StackEntry dupSingle()
duplicate the top size-1 stack entry.

dupSingleBury1

StackEntry dupSingleBury1()
duplicate the top size-1 stack entry and bury it 1 place down.

dupSingleBury2

StackEntry dupSingleBury2()
duplicate the top size-1 stack entry and bury it 2 places down (or 1 size-2-place down).

dupDouble

StackEntry dupDouble()
duplicate the top size-2 stack entry (or two size-1 entries).

dupDoubleBury1

StackEntry dupDoubleBury1()
duplicate the top size-2 stack entry (or two size-1 entries) and bury it (or them) 1 place down.

dupDoubleBury2

StackEntry dupDoubleBury2()
duplicate the top size-2 stack entry (or two size-1 entries) and bury it (or them) 2 places down.

merge

static StackEntry merge(StackEntry first,
                        StackEntry other)
merge 2 stacks producing a common description. The 2 stacks come from different code segments, e.g. one from linear execution, and the other from a branch into the code. If the 2 stacks are incompatible, an AssertionFailedException is thrown.

toString

public java.lang.String toString()
readable description of the whole stack, not just the top entry.
Overrides:
toString in class java.lang.Object