1 // Copyright (c) 1996 James Clark
2 // See the file copying.txt for copying permission.
8 #include "EvalContext.h"
11 #ifdef DSSSL_NAMESPACE
12 namespace DSSSL_NAMESPACE {
16 class ContinuationObj;
20 class VM : public EvalContext, private Collector::DynamicRoot {
23 VM(EvalContext &, Interpreter &);
28 ELObj *protectClosure;
32 ELObj *eval(const Insn *, ELObj **display = 0, ELObj *arg = 0);
35 void pushFrame(const Insn *next, int argsPushed);
36 const Insn *popFrame();
37 void setClosureArgToCC();
38 void trace(Collector &) const;
39 Vector<const ProcessingMode *> modeStack;
48 struct ControlStackEntry {
49 int frameSize; // before pushing args
51 ELObj *protectClosure;
53 ContinuationObj *continuation;
57 ControlStackEntry *csp;
58 ControlStackEntry *csbase;
59 ControlStackEntry *cslim;
60 friend class ContinuationObj;
64 void VM::needStack(int n)
70 #ifdef DSSSL_NAMESPACE
74 #endif /* not VM_INCLUDED */