js/src/jit/InlinableNatives.h
author Tooru Fujisawa <arai_a@mac.com>
Mon, 16 Nov 2015 09:01:56 +0900
changeset 290610 cb171b15a882723b189e2fefa2a06f27e8f907c5
parent 290609 fdbb1c215d783a85c27d71ed8bb832690962c948
child 290624 56e25768c99addacea51258b2392926749da2df5
permissions -rw-r--r--
Bug 1165052 - Part 5: Inline IsWrappedArrayConstructor intrinsic. r=jandem

/* -*- 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)                 \
    _(AtomicsFence)                 \
    _(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)                \
    _(RegExpTester)                 \
    _(IsRegExpObject)               \
                                    \
    _(String)                       \
    _(StringSplit)                  \
    _(StringCharCodeAt)             \
    _(StringFromCharCode)           \
    _(StringCharAt)                 \
    _(StringReplace)                \
                                    \
    _(ObjectCreate)                 \
                                    \
    _(SimdInt32x4)                  \
    _(SimdUint32x4)                 \
    _(SimdFloat32x4)                \
    _(SimdBool32x4)                 \
                                    \
    _(TestBailout)                  \
    _(TestAssertFloat32)            \
    _(TestAssertRecoveredOnBailout) \
                                    \
    _(IntrinsicUnsafeSetReservedSlot) \
    _(IntrinsicUnsafeGetReservedSlot) \
    _(IntrinsicUnsafeGetObjectFromReservedSlot) \
    _(IntrinsicUnsafeGetInt32FromReservedSlot) \
    _(IntrinsicUnsafeGetStringFromReservedSlot) \
    _(IntrinsicUnsafeGetBooleanFromReservedSlot) \
                                    \
    _(IntrinsicIsCallable)          \
    _(IntrinsicIsConstructor)       \
    _(IntrinsicToObject)            \
    _(IntrinsicIsObject)            \
    _(IntrinsicIsWrappedArrayConstructor) \
    _(IntrinsicToInteger)           \
    _(IntrinsicToString)            \
    _(IntrinsicIsConstructing)      \
    _(IntrinsicSubstringKernel)     \
    _(IntrinsicDefineDataProperty)  \
                                    \
    _(IntrinsicIsArrayIterator)     \
    _(IntrinsicIsMapIterator)       \
    _(IntrinsicIsStringIterator)    \
    _(IntrinsicIsListIterator)      \
                                    \
    _(IntrinsicGetNextMapEntryForIterator) \
                                    \
    _(IntrinsicArrayBufferByteLength) \
    _(IntrinsicPossiblyWrappedArrayBufferByteLength) \
                                    \
    _(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 */