js/src/jit/MOpcodes.h

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/js/src/jit/MOpcodes.h	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,251 @@
     1.4 +/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
     1.5 + * vim: set ts=8 sts=4 et sw=4 tw=99:
     1.6 + * This Source Code Form is subject to the terms of the Mozilla Public
     1.7 + * License, v. 2.0. If a copy of the MPL was not distributed with this
     1.8 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     1.9 +
    1.10 +#ifndef jit_MOpcodes_h
    1.11 +#define jit_MOpcodes_h
    1.12 +
    1.13 +namespace js {
    1.14 +namespace jit {
    1.15 +
    1.16 +#define MIR_OPCODE_LIST(_)                                                  \
    1.17 +    _(Constant)                                                             \
    1.18 +    _(CloneLiteral)                                                         \
    1.19 +    _(Parameter)                                                            \
    1.20 +    _(Callee)                                                               \
    1.21 +    _(TableSwitch)                                                          \
    1.22 +    _(Goto)                                                                 \
    1.23 +    _(Test)                                                                 \
    1.24 +    _(TypeObjectDispatch)                                                   \
    1.25 +    _(FunctionDispatch)                                                     \
    1.26 +    _(Compare)                                                              \
    1.27 +    _(Phi)                                                                  \
    1.28 +    _(Beta)                                                                 \
    1.29 +    _(OsrValue)                                                             \
    1.30 +    _(OsrScopeChain)                                                        \
    1.31 +    _(OsrReturnValue)                                                       \
    1.32 +    _(OsrArgumentsObject)                                                   \
    1.33 +    _(ReturnFromCtor)                                                       \
    1.34 +    _(CheckOverRecursed)                                                    \
    1.35 +    _(DefVar)                                                               \
    1.36 +    _(DefFun)                                                               \
    1.37 +    _(CreateThis)                                                           \
    1.38 +    _(CreateThisWithProto)                                                  \
    1.39 +    _(CreateThisWithTemplate)                                               \
    1.40 +    _(CreateArgumentsObject)                                                \
    1.41 +    _(GetArgumentsObjectArg)                                                \
    1.42 +    _(SetArgumentsObjectArg)                                                \
    1.43 +    _(ComputeThis)                                                          \
    1.44 +    _(LoadArrowThis)                                                        \
    1.45 +    _(Call)                                                                 \
    1.46 +    _(ApplyArgs)                                                            \
    1.47 +    _(ArraySplice)                                                          \
    1.48 +    _(Bail)                                                                 \
    1.49 +    _(AssertFloat32)                                                        \
    1.50 +    _(GetDynamicName)                                                       \
    1.51 +    _(FilterArgumentsOrEval)                                                \
    1.52 +    _(CallDirectEval)                                                       \
    1.53 +    _(BitNot)                                                               \
    1.54 +    _(TypeOf)                                                               \
    1.55 +    _(ToId)                                                                 \
    1.56 +    _(BitAnd)                                                               \
    1.57 +    _(BitOr)                                                                \
    1.58 +    _(BitXor)                                                               \
    1.59 +    _(Lsh)                                                                  \
    1.60 +    _(Rsh)                                                                  \
    1.61 +    _(Ursh)                                                                 \
    1.62 +    _(MinMax)                                                               \
    1.63 +    _(Abs)                                                                  \
    1.64 +    _(Sqrt)                                                                 \
    1.65 +    _(Atan2)                                                                \
    1.66 +    _(Hypot)                                                                \
    1.67 +    _(Pow)                                                                  \
    1.68 +    _(PowHalf)                                                              \
    1.69 +    _(Random)                                                               \
    1.70 +    _(MathFunction)                                                         \
    1.71 +    _(Add)                                                                  \
    1.72 +    _(Sub)                                                                  \
    1.73 +    _(Mul)                                                                  \
    1.74 +    _(Div)                                                                  \
    1.75 +    _(Mod)                                                                  \
    1.76 +    _(Concat)                                                               \
    1.77 +    _(ConcatPar)                                                            \
    1.78 +    _(CharCodeAt)                                                           \
    1.79 +    _(FromCharCode)                                                         \
    1.80 +    _(StringSplit)                                                          \
    1.81 +    _(Return)                                                               \
    1.82 +    _(Throw)                                                                \
    1.83 +    _(Box)                                                                  \
    1.84 +    _(Unbox)                                                                \
    1.85 +    _(GuardObject)                                                          \
    1.86 +    _(GuardString)                                                          \
    1.87 +    _(AssertRange)                                                          \
    1.88 +    _(ToDouble)                                                             \
    1.89 +    _(ToFloat32)                                                            \
    1.90 +    _(ToInt32)                                                              \
    1.91 +    _(TruncateToInt32)                                                      \
    1.92 +    _(ToString)                                                             \
    1.93 +    _(NewSlots)                                                             \
    1.94 +    _(NewArray)                                                             \
    1.95 +    _(NewObject)                                                            \
    1.96 +    _(NewDeclEnvObject)                                                     \
    1.97 +    _(NewCallObject)                                                        \
    1.98 +    _(NewRunOnceCallObject)                                                 \
    1.99 +    _(NewStringObject)                                                      \
   1.100 +    _(InitElem)                                                             \
   1.101 +    _(InitElemGetterSetter)                                                 \
   1.102 +    _(MutateProto)                                                          \
   1.103 +    _(InitProp)                                                             \
   1.104 +    _(InitPropGetterSetter)                                                 \
   1.105 +    _(Start)                                                                \
   1.106 +    _(OsrEntry)                                                             \
   1.107 +    _(Nop)                                                                  \
   1.108 +    _(RegExp)                                                               \
   1.109 +    _(RegExpExec)                                                           \
   1.110 +    _(RegExpTest)                                                           \
   1.111 +    _(RegExpReplace)                                                        \
   1.112 +    _(StringReplace)                                                        \
   1.113 +    _(Lambda)                                                               \
   1.114 +    _(LambdaArrow)                                                          \
   1.115 +    _(ImplicitThis)                                                         \
   1.116 +    _(Slots)                                                                \
   1.117 +    _(Elements)                                                             \
   1.118 +    _(ConstantElements)                                                     \
   1.119 +    _(ConvertElementsToDoubles)                                             \
   1.120 +    _(MaybeToDoubleElement)                                                 \
   1.121 +    _(LoadSlot)                                                             \
   1.122 +    _(StoreSlot)                                                            \
   1.123 +    _(FunctionEnvironment)                                                  \
   1.124 +    _(FilterTypeSet)                                                        \
   1.125 +    _(TypeBarrier)                                                          \
   1.126 +    _(MonitorTypes)                                                         \
   1.127 +    _(PostWriteBarrier)                                                     \
   1.128 +    _(GetPropertyCache)                                                     \
   1.129 +    _(GetPropertyPolymorphic)                                               \
   1.130 +    _(SetPropertyPolymorphic)                                               \
   1.131 +    _(GetElementCache)                                                      \
   1.132 +    _(SetElementCache)                                                      \
   1.133 +    _(BindNameCache)                                                        \
   1.134 +    _(GuardShape)                                                           \
   1.135 +    _(GuardObjectType)                                                      \
   1.136 +    _(GuardObjectIdentity)                                                  \
   1.137 +    _(GuardClass)                                                           \
   1.138 +    _(ArrayLength)                                                          \
   1.139 +    _(SetArrayLength)                                                       \
   1.140 +    _(TypedArrayLength)                                                     \
   1.141 +    _(TypedArrayElements)                                                   \
   1.142 +    _(TypedObjectElements)                                                  \
   1.143 +    _(SetTypedObjectOffset)                                                 \
   1.144 +    _(InitializedLength)                                                    \
   1.145 +    _(SetInitializedLength)                                                 \
   1.146 +    _(Not)                                                                  \
   1.147 +    _(NeuterCheck)                                                          \
   1.148 +    _(BoundsCheck)                                                          \
   1.149 +    _(BoundsCheckLower)                                                     \
   1.150 +    _(InArray)                                                              \
   1.151 +    _(LoadElement)                                                          \
   1.152 +    _(LoadElementHole)                                                      \
   1.153 +    _(StoreElement)                                                         \
   1.154 +    _(StoreElementHole)                                                     \
   1.155 +    _(ArrayPopShift)                                                        \
   1.156 +    _(ArrayPush)                                                            \
   1.157 +    _(ArrayConcat)                                                          \
   1.158 +    _(LoadTypedArrayElement)                                                \
   1.159 +    _(LoadTypedArrayElementHole)                                            \
   1.160 +    _(LoadTypedArrayElementStatic)                                          \
   1.161 +    _(StoreTypedArrayElement)                                               \
   1.162 +    _(StoreTypedArrayElementHole)                                           \
   1.163 +    _(StoreTypedArrayElementStatic)                                         \
   1.164 +    _(EffectiveAddress)                                                     \
   1.165 +    _(ClampToUint8)                                                         \
   1.166 +    _(LoadFixedSlot)                                                        \
   1.167 +    _(StoreFixedSlot)                                                       \
   1.168 +    _(CallGetProperty)                                                      \
   1.169 +    _(GetNameCache)                                                         \
   1.170 +    _(CallGetIntrinsicValue)                                                \
   1.171 +    _(CallsiteCloneCache)                                                   \
   1.172 +    _(CallGetElement)                                                       \
   1.173 +    _(CallSetElement)                                                       \
   1.174 +    _(CallSetProperty)                                                      \
   1.175 +    _(CallInitElementArray)                                                 \
   1.176 +    _(DeleteProperty)                                                       \
   1.177 +    _(DeleteElement)                                                        \
   1.178 +    _(SetPropertyCache)                                                     \
   1.179 +    _(IteratorStart)                                                        \
   1.180 +    _(IteratorNext)                                                         \
   1.181 +    _(IteratorMore)                                                         \
   1.182 +    _(IteratorEnd)                                                          \
   1.183 +    _(StringLength)                                                         \
   1.184 +    _(ArgumentsLength)                                                      \
   1.185 +    _(GetFrameArgument)                                                     \
   1.186 +    _(SetFrameArgument)                                                     \
   1.187 +    _(RunOncePrologue)                                                      \
   1.188 +    _(Rest)                                                                 \
   1.189 +    _(Floor)                                                                \
   1.190 +    _(Round)                                                                \
   1.191 +    _(In)                                                                   \
   1.192 +    _(InstanceOf)                                                           \
   1.193 +    _(CallInstanceOf)                                                       \
   1.194 +    _(InterruptCheck)                                                       \
   1.195 +    _(ProfilerStackOp)                                                      \
   1.196 +    _(GetDOMProperty)                                                       \
   1.197 +    _(GetDOMMember)                                                         \
   1.198 +    _(SetDOMProperty)                                                       \
   1.199 +    _(IsCallable)                                                           \
   1.200 +    _(HaveSameClass)                                                        \
   1.201 +    _(HasClass)                                                              \
   1.202 +    _(AsmJSNeg)                                                             \
   1.203 +    _(AsmJSUnsignedToDouble)                                                \
   1.204 +    _(AsmJSUnsignedToFloat32)                                               \
   1.205 +    _(AsmJSLoadHeap)                                                        \
   1.206 +    _(AsmJSStoreHeap)                                                       \
   1.207 +    _(AsmJSLoadGlobalVar)                                                   \
   1.208 +    _(AsmJSStoreGlobalVar)                                                  \
   1.209 +    _(AsmJSLoadFuncPtr)                                                     \
   1.210 +    _(AsmJSLoadFFIFunc)                                                     \
   1.211 +    _(AsmJSReturn)                                                          \
   1.212 +    _(AsmJSParameter)                                                       \
   1.213 +    _(AsmJSVoidReturn)                                                      \
   1.214 +    _(AsmJSPassStackArg)                                                    \
   1.215 +    _(AsmJSCall)                                                            \
   1.216 +    _(CheckOverRecursedPar)                                                 \
   1.217 +    _(NewCallObjectPar)                                                     \
   1.218 +    _(NewPar)                                                               \
   1.219 +    _(NewDenseArrayPar)                                                     \
   1.220 +    _(NewDerivedTypedObject)                                                \
   1.221 +    _(AbortPar)                                                             \
   1.222 +    _(LambdaPar)                                                            \
   1.223 +    _(RestPar)                                                              \
   1.224 +    _(ForkJoinContext)                                                      \
   1.225 +    _(ForkJoinGetSlice)                                                     \
   1.226 +    _(GuardThreadExclusive)                                                 \
   1.227 +    _(InterruptCheckPar)                                                    \
   1.228 +    _(RecompileCheck)
   1.229 +
   1.230 +// Forward declarations of MIR types.
   1.231 +#define FORWARD_DECLARE(op) class M##op;
   1.232 + MIR_OPCODE_LIST(FORWARD_DECLARE)
   1.233 +#undef FORWARD_DECLARE
   1.234 +
   1.235 +class MInstructionVisitor // interface i.e. pure abstract class
   1.236 +{
   1.237 +  public:
   1.238 +#define VISIT_INS(op) virtual bool visit##op(M##op *) = 0;
   1.239 +    MIR_OPCODE_LIST(VISIT_INS)
   1.240 +#undef VISIT_INS
   1.241 +};
   1.242 +
   1.243 +class MInstructionVisitorWithDefaults : public MInstructionVisitor
   1.244 +{
   1.245 +  public:
   1.246 +#define VISIT_INS(op) virtual bool visit##op(M##op *) { MOZ_ASSUME_UNREACHABLE("NYI: " #op); }
   1.247 +    MIR_OPCODE_LIST(VISIT_INS)
   1.248 +#undef VISIT_INS
   1.249 +};
   1.250 +
   1.251 +} // namespace jit
   1.252 +} // namespace js
   1.253 +
   1.254 +#endif /* jit_MOpcodes_h */

mercurial