mirror of
https://github.com/HeyPuter/firefox.git
synced 2026-11-26 21:50:42 -10:00
Changes for try/catch handling
This commit is contained in:
1 parent
4d9b383818
commit
500afc1787
5 files changed
+120
-10
No files matched your search
@@ -2,12 +2,33 @@
|
||||
import java.util.Stack;
|
||||
|
||||
class JSStack {
|
||||
|
||||
|
||||
Stack stack = new Stack();
|
||||
|
||||
void push(StackValue value)
|
||||
int frameTop;
|
||||
|
||||
void newFrame(StackValue returnAddress)
|
||||
{
|
||||
stack.push(value);
|
||||
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)
|
||||
{
|
||||
stack.push(v);
|
||||
}
|
||||
|
||||
boolean isEmpty()
|
||||
{
|
||||
return stack.isEmpty();
|
||||
}
|
||||
|
||||
StackValue pop()
|
||||
|
||||
Reference in new issue
Block a user