namespace JSC {
class ExecState;
- class ScopeChain;
+ class ScopeChainNode;
class SourceCode;
- enum ComplType { Normal, Break, Continue, ReturnValue, Throw, Interrupted };
+ enum ComplType { Normal, Break, Continue, ReturnValue, Throw, Interrupted, Terminated };
/*
* Completion objects are used to convey the return status and value
*/
class Completion {
public:
- Completion(ComplType type = Normal, JSValuePtr value = noValue())
+ Completion(ComplType type = Normal, JSValue value = JSValue())
: m_type(type)
, m_value(value)
{
}
ComplType complType() const { return m_type; }
- JSValuePtr value() const { return m_value; }
- void setValue(JSValuePtr v) { m_value = v; }
+ JSValue value() const { return m_value; }
+ void setValue(JSValue v) { m_value = v; }
bool isValueCompletion() const { return m_value; }
private:
ComplType m_type;
- JSValuePtr m_value;
+ JSValue m_value;
};
Completion checkSyntax(ExecState*, const SourceCode&);
- Completion evaluate(ExecState*, ScopeChain&, const SourceCode&, JSValuePtr thisValue = noValue());
+ Completion evaluate(ExecState*, ScopeChainNode*, const SourceCode&, JSValue thisValue = JSValue());
} // namespace JSC