summaryrefslogtreecommitdiffstats
path: root/js/src/jit/InlinableNatives.h
blob: 15352c04ffbed109eab887e9ca9ff5745fcd793f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
 * vim: set ts=8 sts=4 et sw=4 tw=99:
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */

#ifndef jit_InlinableNatives_h
#define jit_InlinableNatives_h

#define INLINABLE_NATIVE_LIST(_)    \
    _(Array)                        \
    _(ArrayIsArray)                 \
    _(ArrayJoin)                    \
    _(ArrayPop)                     \
    _(ArrayShift)                   \
    _(ArrayPush)                    \
    _(ArraySlice)                   \
    _(ArraySplice)                  \
                                    \
    _(AtomicsCompareExchange)       \
    _(AtomicsExchange)              \
    _(AtomicsLoad)                  \
    _(AtomicsStore)                 \
    _(AtomicsAdd)                   \
    _(AtomicsSub)                   \
    _(AtomicsAnd)                   \
    _(AtomicsOr)                    \
    _(AtomicsXor)                   \
    _(AtomicsIsLockFree)            \
                                    \
    _(MathAbs)                      \
    _(MathFloor)                    \
    _(MathCeil)                     \
    _(MathRound)                    \
    _(MathClz32)                    \
    _(MathSqrt)                     \
    _(MathATan2)                    \
    _(MathHypot)                    \
    _(MathMax)                      \
    _(MathMin)                      \
    _(MathPow)                      \
    _(MathRandom)                   \
    _(MathImul)                     \
    _(MathFRound)                   \
    _(MathSin)                      \
    _(MathTan)                      \
    _(MathCos)                      \
    _(MathExp)                      \
    _(MathLog)                      \
    _(MathASin)                     \
    _(MathATan)                     \
    _(MathACos)                     \
    _(MathLog10)                    \
    _(MathLog2)                     \
    _(MathLog1P)                    \
    _(MathExpM1)                    \
    _(MathSinH)                     \
    _(MathTanH)                     \
    _(MathCosH)                     \
    _(MathASinH)                    \
    _(MathATanH)                    \
    _(MathACosH)                    \
    _(MathSign)                     \
    _(MathTrunc)                    \
    _(MathCbrt)                     \
                                    \
    _(RegExpMatcher)                \
    _(RegExpSearcher)               \
    _(RegExpTester)                 \
    _(IsRegExpObject)               \
    _(RegExpPrototypeOptimizable)   \
    _(RegExpInstanceOptimizable)    \
    _(GetFirstDollarIndex)          \
                                    \
    _(String)                       \
    _(StringCharCodeAt)             \
    _(StringFromCharCode)           \
    _(StringFromCodePoint)          \
    _(StringCharAt)                 \
                                    \
    _(IntrinsicStringReplaceString) \
    _(IntrinsicStringSplitString)   \
                                    \
    _(ObjectCreate)                 \
                                    \
    _(SimdInt32x4)                  \
    _(SimdUint32x4)                 \
    _(SimdInt16x8)                  \
    _(SimdUint16x8)                 \
    _(SimdInt8x16)                  \
    _(SimdUint8x16)                 \
    _(SimdFloat32x4)                \
    _(SimdBool32x4)                 \
    _(SimdBool16x8)                 \
    _(SimdBool8x16)                 \
                                    \
    _(TestBailout)                  \
    _(TestAssertFloat32)            \
    _(TestAssertRecoveredOnBailout) \
                                    \
    _(IntrinsicUnsafeSetReservedSlot) \
    _(IntrinsicUnsafeGetReservedSlot) \
    _(IntrinsicUnsafeGetObjectFromReservedSlot) \
    _(IntrinsicUnsafeGetInt32FromReservedSlot) \
    _(IntrinsicUnsafeGetStringFromReservedSlot) \
    _(IntrinsicUnsafeGetBooleanFromReservedSlot) \
                                    \
    _(IntrinsicIsCallable)          \
    _(IntrinsicIsConstructor)       \
    _(IntrinsicToObject)            \
    _(IntrinsicIsObject)            \
    _(IntrinsicIsWrappedArrayConstructor) \
    _(IntrinsicToInteger)           \
    _(IntrinsicToString)            \
    _(IntrinsicIsConstructing)      \
    _(IntrinsicSubstringKernel)     \
    _(IntrinsicDefineDataProperty)  \
    _(IntrinsicObjectHasPrototype)  \
                                    \
    _(IntrinsicIsArrayIterator)     \
    _(IntrinsicIsMapIterator)       \
    _(IntrinsicIsSetIterator)       \
    _(IntrinsicIsStringIterator)    \
                                    \
    _(IntrinsicGetNextMapEntryForIterator) \
                                    \
    _(IntrinsicGetNextSetEntryForIterator) \
                                    \
    _(IntrinsicArrayBufferByteLength) \
    _(IntrinsicPossiblyWrappedArrayBufferByteLength) \
                                    \
    _(TypedArrayConstructor)        \
    _(IntrinsicIsTypedArray)        \
    _(IntrinsicIsPossiblyWrappedTypedArray) \
    _(IntrinsicTypedArrayLength)    \
    _(IntrinsicPossiblyWrappedTypedArrayLength)    \
    _(IntrinsicSetDisjointTypedElements) \
                                    \
    _(IntrinsicObjectIsTypedObject) \
    _(IntrinsicObjectIsTransparentTypedObject) \
    _(IntrinsicObjectIsOpaqueTypedObject) \
    _(IntrinsicObjectIsTypeDescr)   \
    _(IntrinsicTypeDescrIsSimpleType) \
    _(IntrinsicTypeDescrIsArrayType)\
    _(IntrinsicSetTypedObjectOffset)

struct JSJitInfo;

namespace js {
namespace jit {

enum class InlinableNative : uint16_t {
#define ADD_NATIVE(native) native,
    INLINABLE_NATIVE_LIST(ADD_NATIVE)
#undef ADD_NATIVE
};

#define ADD_NATIVE(native) extern const JSJitInfo JitInfo_##native;
    INLINABLE_NATIVE_LIST(ADD_NATIVE)
#undef ADD_NATIVE

} // namespace jit
} // namespace js

#endif /* jit_InlinableNatives_h */