Debian Codegraph @

src/3rdparty/javascriptcore/JavaScriptCore/profiler/CallIdentifier.h

raw symbols SCIP
1 /*
2 * Copyright (C) 2008 Apple Inc. All Rights Reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 *
13 * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
14 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
17 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
18 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
19 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
20 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
21 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24 */
25
26
27 #ifndef CallIdentifier_h
28 #define CallIdentifier_hcxx . . $ `src/3rdparty/javascriptcore/JavaScriptCore/profiler/CallIdentifier.h:28:9`!
29
30 #include <runtime/UString.h>cxx . . $ `<file>/src/3rdparty/javascriptcore/JavaScriptCore/runtime/UString.h`/
31 #include "FastAllocBase.h"cxx . . $ `<file>/src/3rdparty/javascriptcore/JavaScriptCore/wtf/FastAllocBase.h`/
32
33 namespace JSCcxx . . $ `<built-in>:463:9`! {
34
35 struct CallIdentifiercxx . . $ QTJSC/CallIdentifier# : public FastAllocBasecxx . . $ FastAllocBase# {
36 UStringcxx . . $ QTJSC/UString# m_namecxx . . $ QTJSC/CallIdentifier#m_name.;
37 UStringcxx . . $ QTJSC/UString# m_urlcxx . . $ QTJSC/CallIdentifier#m_url.;
38 unsigned m_lineNumbercxx . . $ QTJSC/CallIdentifier#m_lineNumber.;
39
40 CallIdentifiercxx . . $ QTJSC/CallIdentifier#CallIdentifier(49f6e7a06ebc5aa8).()
41 : m_lineNumbercxx . . $ QTJSC/CallIdentifier#m_lineNumber.(0)
42 {
43 }
44
45 CallIdentifiercxx . . $ QTJSC/CallIdentifier#CallIdentifier(43fff5afe796ed68).(const UStringcxx . . $ QTJSC/UString#& name, const UStringcxx . . $ QTJSC/UString#& url, int lineNumber)
46 : m_name(name)
47 , m_url(url)
48 , m_lineNumbercxx . . $ QTJSC/CallIdentifier#m_lineNumber.(lineNumber)
49 {
50 }
51
52 inline bool operatorcxx . . $ QTJSC/CallIdentifier#`operator==`(a5dcc2bd5fc4190c).==(const CallIdentifiercxx . . $ QTJSC/CallIdentifier#& ci) const { return ci.m_lineNumber == m_lineNumber && ci.m_name == m_name && ci.m_url == m_url; }
53 inline bool operatorcxx . . $ QTJSC/CallIdentifier#`operator!=`(a5dcc2bd5fc4190c).!=(const CallIdentifiercxx . . $ QTJSC/CallIdentifier#& ci) const { return !(*this ==cxx . . $ QTJSC/CallIdentifier#`operator==`(a5dcc2bd5fc4190c). ci); }
54
55 struct Hashcxx . . $ QTJSC/CallIdentifier#Hash# {
56 static unsigned hashcxx . . $ QTJSC/CallIdentifier#Hash#hash(89eda36237809f0e).(const CallIdentifiercxx . . $ QTJSC/CallIdentifier#& key)
57 {
58 unsigned hashCodes[3] = {
59 key.m_name.rep()->hash(),
60 key.m_url.rep()->hash(),
61 key.m_lineNumbercxx . . $ QTJSC/CallIdentifier#m_lineNumber.
62 };
63 return UStringcxx . . $ QTJSC/UString#::Repcxx . . $ QTJSC/UString#Rep#::computeHashcxx . . $ QTJSC/UStringImpl#computeHash(cc09747f0f147881).(reinterpret_cast<char*>(hashCodes), sizeof(hashCodes));
64 }
65
66 static bool equalcxx . . $ QTJSC/CallIdentifier#Hash#equal(49eb8e79154ecdf7).(const CallIdentifiercxx . . $ QTJSC/CallIdentifier#& a, const CallIdentifiercxx . . $ QTJSC/CallIdentifier#& b) { return a ==cxx . . $ QTJSC/CallIdentifier#`operator==`(a5dcc2bd5fc4190c). b; }
67 static const bool safeToCompareToEmptyOrDeletedcxx . . $ QTJSC/CallIdentifier#Hash#safeToCompareToEmptyOrDeleted. = true;
68 };
69
70 unsigned hashcxx . . $ QTJSC/CallIdentifier#hash(ddd8539a2fcdd4ce).() const { return Hashcxx . . $ QTJSC/CallIdentifier#Hash#::hashcxx . . $ QTJSC/CallIdentifier#Hash#hash(89eda36237809f0e).(*this); }
71
72 #ifndef NDEBUGcxx . . $ `<built-in>:472:9`!
73 operator const char*() const { return c_str(); }
74 const char* c_str() const { return m_name.UTF8String().c_str(); }
75 #endif
76 };
77
78 } // namespace JSC
79
80 namespace WTFcxx . . $ `<built-in>:467:9`! {
81
82 template<> struct DefaultHashcxx . . $ QTWTF/DefaultHash#<JSCcxx . . $ `<built-in>:463:9`!::CallIdentifiercxx . . $ QTJSC/CallIdentifier#> { typedef JSCcxx . . $ QTJSC/::CallIdentifiercxx . . $ QTJSC/CallIdentifier#::Hashcxx . . $ QTJSC/CallIdentifier#Hash# Hashcxx . . $ QTWTF/DefaultHash#Hash#; };
83
84 template<> struct HashTraitscxx . . $ QTWTF/HashTraits#<JSCcxx . . $ QTJSC/::CallIdentifiercxx . . $ QTJSC/CallIdentifier#> : GenericHashTraits<JSCcxx . . $ `<built-in>:463:9`!::CallIdentifier> {
85 static void constructDeletedValuecxx . . $ QTWTF/HashTraits#constructDeletedValue(16becc1d4a81e701).(JSCcxx . . $ QTJSC/::CallIdentifiercxx . . $ QTJSC/CallIdentifier#& slot)
86 {
87 new (&slot) JSCcxx . . $ QTJSC/::CallIdentifiercxx . . $ QTJSC/CallIdentifier#(JSCcxx . . $ QTJSC/::UStringcxx . . $ QTJSC/UString#(), JSCcxx . . $ QTJSC/UString#UString(49f6e7a06ebc5aa8).::UStringcxx . . $ QTJSC/UString#(), stdcxx . . $ std/::numeric_limitscxx . . $ std/numeric_limits#<unsigned>::maxcxx . . $ std/numeric_limits#max(db52760e79bf9054).());
88 }
89 static bool isDeletedValuecxx . . $ QTWTF/HashTraits#isDeletedValue(d5ac21b21379c79c).(const JSCcxx . . $ QTJSC/::CallIdentifiercxx . . $ QTJSC/CallIdentifier#& value)
90 {
91 return value.m_name.isNull() && value.m_url.isNull() && value.m_lineNumbercxx . . $ QTJSC/CallIdentifier#m_lineNumber. == stdcxx . . $ std/::numeric_limitscxx . . $ std/numeric_limits#<unsigned>::maxcxx . . $ std/numeric_limits#max(db52760e79bf9054).();
92 }
93 };
94
95 } // namespace WTF
96
97 #endif // CallIdentifier_h
98