OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 1999-2000 Harri Porten (porten@kde.org) | 2 * Copyright (C) 1999-2000 Harri Porten (porten@kde.org) |
3 * Copyright (C) 2003, 2007, 2008 Apple Inc. All rights reserved. | 3 * Copyright (C) 2003, 2007, 2008 Apple Inc. All rights reserved. |
4 * | 4 * |
5 * This library is free software; you can redistribute it and/or | 5 * This library is free software; you can redistribute it and/or |
6 * modify it under the terms of the GNU Lesser General Public | 6 * modify it under the terms of the GNU Lesser General Public |
7 * License as published by the Free Software Foundation; either | 7 * License as published by the Free Software Foundation; either |
8 * version 2 of the License, or (at your option) any later version. | 8 * version 2 of the License, or (at your option) any later version. |
9 * | 9 * |
10 * This library is distributed in the hope that it will be useful, | 10 * This library is distributed in the hope that it will be useful, |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
115 JSArray* constructEmptyArray(ExecState*, unsigned initialLength); | 115 JSArray* constructEmptyArray(ExecState*, unsigned initialLength); |
116 JSArray* constructArray(ExecState*, JSValuePtr singleItemValue); | 116 JSArray* constructArray(ExecState*, JSValuePtr singleItemValue); |
117 JSArray* constructArray(ExecState*, const ArgList& values); | 117 JSArray* constructArray(ExecState*, const ArgList& values); |
118 | 118 |
119 inline JSArray* asArray(JSValuePtr value) | 119 inline JSArray* asArray(JSValuePtr value) |
120 { | 120 { |
121 ASSERT(asObject(value)->inherits(&JSArray::info)); | 121 ASSERT(asObject(value)->inherits(&JSArray::info)); |
122 return static_cast<JSArray*>(asObject(value)); | 122 return static_cast<JSArray*>(asObject(value)); |
123 } | 123 } |
124 | 124 |
| 125 inline bool isJSArray(JSGlobalData* globalData, JSValuePtr v) { return v.isC
ell() && v.asCell()->vptr() == globalData->jsArrayVPtr; } |
| 126 |
125 } // namespace JSC | 127 } // namespace JSC |
126 | 128 |
127 #endif // JSArray_h | 129 #endif // JSArray_h |
128 | 130 |
129 | 131 |
OLD | NEW |