source: webkit/trunk/JavaScriptCore/kjs/completion.h@ 35898

Last change on this file since 35898 was 35898, checked in by [email protected], 17 years ago

2008-08-22 Cameron Zwarich <[email protected]>

Reviewed by Oliver.

Some cleanup to match our coding style.

  • VM/CodeGenerator.h:
  • VM/Machine.cpp: (KJS::Machine::privateExecute):
  • kjs/ExecState.cpp:
  • kjs/ExecState.h:
  • kjs/completion.h:
  • kjs/identifier.cpp: (KJS::Identifier::equal): (KJS::CStringTranslator::hash): (KJS::CStringTranslator::equal): (KJS::CStringTranslator::translate): (KJS::UCharBufferTranslator::equal): (KJS::UCharBufferTranslator::translate): (KJS::Identifier::remove):
  • kjs/operations.h:
  • Property svn:eol-style set to native
File size: 1.7 KB
Line 
1/*
2 * Copyright (C) 1999-2001 Harri Porten ([email protected])
3 * Copyright (C) 2001 Peter Kelly ([email protected])
4 * Copyright (C) 2003, 2007 Apple Inc. All rights reserved.
5 *
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version.
10 *
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Library General Public License for more details.
15 *
16 * You should have received a copy of the GNU Library General Public License
17 * along with this library; see the file COPYING.LIB. If not, write to
18 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19 * Boston, MA 02110-1301, USA.
20 *
21 */
22
23#ifndef KJS_COMPLETION_H
24#define KJS_COMPLETION_H
25
26namespace KJS {
27
28 class JSValue;
29
30 enum ComplType { Normal, Break, Continue, ReturnValue, Throw, Interrupted };
31
32 /*
33 * Completion objects are used to convey the return status and value
34 * from functions.
35 */
36 class Completion {
37 public:
38 Completion(ComplType type = Normal, JSValue* value = 0)
39 : m_type(type)
40 , m_value(value)
41 {
42 }
43
44 ComplType complType() const { return m_type; }
45 JSValue* value() const { return m_value; }
46 void setValue(JSValue* v) { m_value = v; }
47 bool isValueCompletion() const { return !!m_value; }
48
49 private:
50 ComplType m_type;
51 JSValue* m_value;
52 };
53
54} // namespace KJS
55
56#endif // KJS_COMPLETION_H
Note: See TracBrowser for help on using the repository browser.