82 |
typedef Ref<StringExpr,Node> StringExprRef; |
typedef Ref<StringExpr,Node> StringExprRef; |
83 |
|
|
84 |
class IntLiteral : virtual public IntExpr { |
class IntLiteral : virtual public IntExpr { |
|
int value; |
|
85 |
public: |
public: |
86 |
|
int value; |
87 |
IntLiteral(int value) : value(value) { } |
IntLiteral(int value) : value(value) { } |
88 |
int evalInt(); |
int evalInt(); |
89 |
void dump(int level = 0); |
void dump(int level = 0); |
709 |
int stackFrame; |
int stackFrame; |
710 |
int suspendMicroseconds; |
int suspendMicroseconds; |
711 |
size_t instructionsCount; |
size_t instructionsCount; |
712 |
|
struct ExitRes { |
713 |
|
Expression* value; |
714 |
|
IntLiteral intLiteral; |
715 |
|
StringLiteral stringLiteral; |
716 |
|
|
717 |
ExecContext() : |
ExitRes() : intLiteral(0), stringLiteral("") { } |
718 |
status(VM_EXEC_NOT_RUNNING), flags(STMT_SUCCESS), stackFrame(-1), |
} exitRes; |
|
suspendMicroseconds(0), instructionsCount(0) {} |
|
719 |
|
|
720 |
|
ExecContext(); |
721 |
virtual ~ExecContext() {} |
virtual ~ExecContext() {} |
722 |
|
|
723 |
inline void pushStack(Statement* stmt) { |
inline void pushStack(Statement* stmt) { |
742 |
flags = STMT_SUCCESS; |
flags = STMT_SUCCESS; |
743 |
} |
} |
744 |
|
|
745 |
|
inline void clearExitRes() { |
746 |
|
exitRes.value = NULL; |
747 |
|
} |
748 |
|
|
749 |
int suspensionTimeMicroseconds() const OVERRIDE { |
int suspensionTimeMicroseconds() const OVERRIDE { |
750 |
return suspendMicroseconds; |
return suspendMicroseconds; |
751 |
} |
} |
764 |
} |
} |
765 |
|
|
766 |
void forkTo(VMExecContext* ectx) const OVERRIDE; |
void forkTo(VMExecContext* ectx) const OVERRIDE; |
767 |
|
|
768 |
|
VMExpr* exitResult() OVERRIDE { |
769 |
|
return exitRes.value; |
770 |
|
} |
771 |
}; |
}; |
772 |
|
|
773 |
} // namespace LinuxSampler |
} // namespace LinuxSampler |