Latest changes

git-svn-id: svn://10.0.0.236/trunk@30777 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
rogerl%netscape.com
1999-05-07 22:07:22 +00:00
parent 8455e35b97
commit b307b926e7
8 changed files with 165 additions and 52 deletions

View File

@@ -4,22 +4,6 @@ import java.util.Stack;
class JSStack {
Stack stack = new Stack();
int frameTop;
void newFrame(StackValue returnAddress)
{
stack.push(returnAddress);
stack.push(new StackValue(frameTop));
frameTop = stack.size();
}
StackValue popFrame()
{
stack.setSize(frameTop);
StackValue oldFrame = (StackValue)(stack.pop());
frameTop = oldFrame.i;
return (StackValue)stack.pop();
}
void push(StackValue v)
{
@@ -35,5 +19,10 @@ class JSStack {
{
return (StackValue)stack.pop();
}
int size()
{
return stack.size();
}
}