]>
git.saurik.com Git - apple/javascriptcore.git/blob - kjs/completion.h
09f3db79bb3e7157ce28ebf556f16714a02f40c2
1 // -*- c-basic-offset: 2 -*-
3 * Copyright (C) 1999-2001 Harri Porten (porten@kde.org)
4 * Copyright (C) 2001 Peter Kelly (pmk@post.com)
5 * Copyright (C) 2003, 2007 Apple Inc. All rights reserved.
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version.
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Library General Public License for more details.
17 * You should have received a copy of the GNU Library General Public License
18 * along with this library; see the file COPYING.LIB. If not, write to
19 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
20 * Boston, MA 02110-1301, USA.
24 #ifndef KJS_COMPLETION_H
25 #define KJS_COMPLETION_H
31 enum ComplType
{ Normal
, Break
, Continue
, ReturnValue
, Throw
, Interrupted
};
34 * Completion objects are used to convey the return status and value
37 * See FunctionImp::execute()
41 * @short Handle for a Completion type.
45 Completion(ComplType type
= Normal
, JSValue
* value
= 0)
46 : m_type(type
), m_value(value
) { }
48 ComplType
complType() const { return m_type
; }
49 JSValue
* value() const { return m_value
; }
50 void setValue(JSValue
* v
) { m_value
= v
; }
51 bool isValueCompletion() const { return !!m_value
; }