Debian Codegraph @

src/3rdparty/javascriptcore/JavaScriptCore/runtime/PropertyNameArray.h

raw symbols SCIP
1 /*
2 * Copyright (C) 2006, 2008 Apple Inc. All rights reserved.
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Library General Public License for more details.
13 *
14 * You should have received a copy of the GNU Library General Public License
15 * along with this library; see the file COPYING.LIB. If not, write to
16 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
18 *
19 */
20
21 #ifndef PropertyNameArray_h
22 #define PropertyNameArray_hcxx . . $ `src/3rdparty/javascriptcore/JavaScriptCore/runtime/PropertyNameArray.h:22:9`!
23
24 #include "CallFrame.h"cxx . . $ `<file>/src/3rdparty/javascriptcore/JavaScriptCore/interpreter/CallFrame.h`/
25 #include "Identifier.h"cxx . . $ `<file>/src/3rdparty/javascriptcore/JavaScriptCore/runtime/Identifier.h`/
26 #include <wtf/HashSet.h>cxx . . $ `<file>/src/3rdparty/javascriptcore/JavaScriptCore/wtf/HashSet.h`/
27 #include <wtf/OwnArrayPtr.h>cxx . . $ `<file>/src/3rdparty/javascriptcore/JavaScriptCore/wtf/OwnArrayPtr.h`/
28 #include <wtf/Vector.h>cxx . . $ `<file>/src/3rdparty/javascriptcore/JavaScriptCore/wtf/Vector.h`/
29
30 namespace JSCcxx . . $ `<built-in>:463:9`! {
31
32 class Structurecxx . . $ QTJSC/Structure#;
33 class StructureChaincxx . . $ QTJSC/StructureChain#;
34
35 // FIXME: Rename to PropertyNameArray.
36 class PropertyNameArrayDatacxx . . $ QTJSC/PropertyNameArrayData# : public RefCounted<PropertyNameArrayData> {
37 public:
38 typedef Vectorcxx . . $ Vector#<Identifiercxx . . $ QTJSC/Identifier#, 20> PropertyNameVectorcxx . . $ QTJSC/PropertyNameArrayData#PropertyNameVector#;
39
40 static PassRefPtrcxx . . $ PassRefPtr#<PropertyNameArrayDatacxx . . $ QTJSC/PropertyNameArrayData#> createcxx . . $ QTJSC/PropertyNameArrayData#create(df099a5b4107da1e).() { return adoptRefcxx . . $ adoptRef(e761da608bb8c29c).(new PropertyNameArrayDatacxx . . $ QTJSC/PropertyNameArrayData#PropertyNameArrayData(49f6e7a06ebc5aa8).); }
41
42 PropertyNameVectorcxx . . $ QTJSC/PropertyNameArrayData#PropertyNameVector#& propertyNameVectorcxx . . $ QTJSC/PropertyNameArrayData#propertyNameVector(21aa749cdf6329bf).() { return m_propertyNameVector; }
43
44 private:
45 PropertyNameArrayDatacxx . . $ QTJSC/PropertyNameArrayData#PropertyNameArrayData(49f6e7a06ebc5aa8).()
46 {
47 }
48
49 PropertyNameVectorcxx . . $ QTJSC/PropertyNameArrayData#PropertyNameVector# m_propertyNameVectorcxx . . $ QTJSC/PropertyNameArrayData#m_propertyNameVector.;
50 };
51
52 // FIXME: Rename to PropertyNameArrayBuilder.
53 class PropertyNameArraycxx . . $ QTJSC/PropertyNameArray# {
54 public:
55 PropertyNameArraycxx . . $ QTJSC/PropertyNameArray#PropertyNameArray(71c44650a83bfd83).(JSGlobalDatacxx . . $ QTJSC/JSGlobalData#* globalData)
56 : m_data(PropertyNameArrayData::create())
57 , m_globalDatacxx . . $ QTJSC/PropertyNameArray#m_globalData.(globalData)
58 , m_shouldCachecxx . . $ QTJSC/PropertyNameArray#m_shouldCache.(true)
59 {
60 }
61
62 PropertyNameArraycxx . . $ QTJSC/PropertyNameArray#PropertyNameArray(d2cb180e190a9680).(ExecStatecxx . . $ QTJSC/ExecState#* exec)
63 : m_data(PropertyNameArrayData::create())
64 , m_globalDatacxx . . $ QTJSC/PropertyNameArray#m_globalData.(&exec->globalDatacxx . . $ QTJSC/ExecState#globalData(ae00a65ac2fd4a61).())
65 , m_shouldCachecxx . . $ QTJSC/PropertyNameArray#m_shouldCache.(true)
66 {
67 }
68
69 JSGlobalDatacxx . . $ QTJSC/JSGlobalData#* globalDatacxx . . $ QTJSC/PropertyNameArray#globalData(a2bcd21f8a8ecac2).() { return m_globalDatacxx . . $ QTJSC/PropertyNameArray#m_globalData.; }
70
71 void addcxx . . $ QTJSC/PropertyNameArray#add(d7ed36c5537ed570).(const Identifiercxx . . $ QTJSC/Identifier#& identifier) { addcxx . . $ QTJSC/PropertyNameArray#add(f38096febece923b).(identifier.ustringcxx . . $ QTJSC/Identifier#ustring(de21ee9ecbd506fd).().repcxx . . $ QTJSC/UString#rep(eff8ac5d0836371c).()); }
72 void addcxx . . $ QTJSC/PropertyNameArray#add(f38096febece923b).(UStringcxx . . $ QTJSC/UString#::Repcxx . . $ QTJSC/UString#Rep#*);
73 void addKnownUniquecxx . . $ QTJSC/PropertyNameArray#addKnownUnique(f38096febece923b).(UStringcxx . . $ QTJSC/UString#::Repcxx . . $ QTJSC/UString#Rep#* identifier) { m_data->propertyNameVector().append(Identifier(m_globalData, identifier)); }
74
75 Identifiercxx . . $ QTJSC/Identifier#& operatorcxx . . $ QTJSC/PropertyNameArray#`operator[]`(25c60255f7bdf682).[](unsigned i) { return m_data->propertyNameVector()[i]; }
76 const Identifiercxx . . $ QTJSC/Identifier#& operatorcxx . . $ QTJSC/PropertyNameArray#`operator[]`(e56697499de1a9ed).[](unsigned i) const { return m_data->propertyNameVector()[i]; }
77
78 void setDatacxx . . $ QTJSC/PropertyNameArray#setData(37f0a108b0df2a8c).(PassRefPtrcxx . . $ PassRefPtr#<PropertyNameArrayDatacxx . . $ QTJSC/PropertyNameArrayData#> data) { m_data = data; }
79 PropertyNameArrayDatacxx . . $ QTJSC/PropertyNameArrayData#* datacxx . . $ QTJSC/PropertyNameArray#data(90daddb885a432b4).() { return m_data.get(); }
80 PassRefPtrcxx . . $ PassRefPtr#<PropertyNameArrayDatacxx . . $ QTJSC/PropertyNameArrayData#> releaseDatacxx . . $ QTJSC/PropertyNameArray#releaseData(df099a5b4107da1e).() { return m_data.release(); }
81
82 // FIXME: Remove these functions.
83 typedef PropertyNameArrayData::PropertyNameVector::const_iterator const_iteratorcxx . . $ QTJSC/PropertyNameArray#const_iterator#;
84 size_t sizecxx . . $ QTJSC/PropertyNameArray#size(fe4d2d262d4164a8).() const { return m_data->propertyNameVector().size(); }
85 const_iteratorcxx . . $ QTJSC/PropertyNameArray#const_iterator# begincxx . . $ QTJSC/PropertyNameArray#begin(455f465bc33b4cdf).() const { return m_data->propertyNameVector().begin(); }
86 const_iteratorcxx . . $ QTJSC/PropertyNameArray#const_iterator# endcxx . . $ QTJSC/PropertyNameArray#end(455f465bc33b4cdf).() const { return m_data->propertyNameVector().end(); }
87
88 private:
89 typedef HashSet<UString::Rep*, PtrHash<UString::Rep*> > IdentifierSetcxx . . $ QTJSC/PropertyNameArray#IdentifierSet#;
90
91 RefPtrcxx . . $ RefPtr#<PropertyNameArrayDatacxx . . $ QTJSC/PropertyNameArrayData#> m_datacxx . . $ QTJSC/PropertyNameArray#m_data.;
92 IdentifierSetcxx . . $ QTJSC/PropertyNameArray#IdentifierSet# m_setcxx . . $ QTJSC/PropertyNameArray#m_set.;
93 JSGlobalDatacxx . . $ QTJSC/JSGlobalData#* m_globalDatacxx . . $ QTJSC/PropertyNameArray#m_globalData.;
94 bool m_shouldCachecxx . . $ QTJSC/PropertyNameArray#m_shouldCache.;
95 };
96
97 } // namespace JSC
98
99 #endif // PropertyNameArray_h