LCOV - code coverage report
Current view: top level - js/src/jit - MOpcodes.h (source / functions) Hit Total Coverage
Test: output.info Lines: 3 3 100.0 %
Date: 2017-07-14 16:53:18 Functions: 25 313 8.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
       2             :  * vim: set ts=8 sts=4 et sw=4 tw=99:
       3             :  * This Source Code Form is subject to the terms of the Mozilla Public
       4             :  * License, v. 2.0. If a copy of the MPL was not distributed with this
       5             :  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
       6             : 
       7             : #ifndef jit_MOpcodes_h
       8             : #define jit_MOpcodes_h
       9             : 
      10             : namespace js {
      11             : namespace jit {
      12             : 
      13             : #define MIR_OPCODE_LIST(_)                                                  \
      14             :     _(Constant)                                                             \
      15             :     _(SimdBox)                                                              \
      16             :     _(SimdUnbox)                                                            \
      17             :     _(SimdValueX4)                                                          \
      18             :     _(SimdSplat)                                                            \
      19             :     _(SimdConstant)                                                         \
      20             :     _(SimdConvert)                                                          \
      21             :     _(SimdReinterpretCast)                                                  \
      22             :     _(SimdExtractElement)                                                   \
      23             :     _(SimdInsertElement)                                                    \
      24             :     _(SimdSwizzle)                                                          \
      25             :     _(SimdGeneralShuffle)                                                   \
      26             :     _(SimdShuffle)                                                          \
      27             :     _(SimdUnaryArith)                                                       \
      28             :     _(SimdBinaryComp)                                                       \
      29             :     _(SimdBinaryArith)                                                      \
      30             :     _(SimdBinarySaturating)                                                 \
      31             :     _(SimdBinaryBitwise)                                                    \
      32             :     _(SimdShift)                                                            \
      33             :     _(SimdSelect)                                                           \
      34             :     _(SimdAllTrue)                                                          \
      35             :     _(SimdAnyTrue)                                                          \
      36             :     _(CloneLiteral)                                                         \
      37             :     _(Parameter)                                                            \
      38             :     _(Callee)                                                               \
      39             :     _(IsConstructing)                                                       \
      40             :     _(TableSwitch)                                                          \
      41             :     _(Goto)                                                                 \
      42             :     _(Test)                                                                 \
      43             :     _(GotoWithFake)                                                         \
      44             :     _(ObjectGroupDispatch)                                                  \
      45             :     _(FunctionDispatch)                                                     \
      46             :     _(Compare)                                                              \
      47             :     _(Phi)                                                                  \
      48             :     _(Beta)                                                                 \
      49             :     _(NaNToZero)                                                            \
      50             :     _(OsrValue)                                                             \
      51             :     _(OsrEnvironmentChain)                                                  \
      52             :     _(OsrReturnValue)                                                       \
      53             :     _(OsrArgumentsObject)                                                   \
      54             :     _(ReturnFromCtor)                                                       \
      55             :     _(BinarySharedStub)                                                     \
      56             :     _(UnarySharedStub)                                                      \
      57             :     _(NullarySharedStub)                                                    \
      58             :     _(CheckOverRecursed)                                                    \
      59             :     _(DefVar)                                                               \
      60             :     _(DefLexical)                                                           \
      61             :     _(DefFun)                                                               \
      62             :     _(CreateThis)                                                           \
      63             :     _(CreateThisWithProto)                                                  \
      64             :     _(CreateThisWithTemplate)                                               \
      65             :     _(CreateArgumentsObject)                                                \
      66             :     _(GetArgumentsObjectArg)                                                \
      67             :     _(SetArgumentsObjectArg)                                                \
      68             :     _(ComputeThis)                                                          \
      69             :     _(Call)                                                                 \
      70             :     _(ApplyArgs)                                                            \
      71             :     _(ApplyArray)                                                           \
      72             :     _(Bail)                                                                 \
      73             :     _(Unreachable)                                                          \
      74             :     _(EncodeSnapshot)                                                       \
      75             :     _(AssertFloat32)                                                        \
      76             :     _(AssertRecoveredOnBailout)                                             \
      77             :     _(GetDynamicName)                                                       \
      78             :     _(CallDirectEval)                                                       \
      79             :     _(BitNot)                                                               \
      80             :     _(TypeOf)                                                               \
      81             :     _(ToAsync)                                                              \
      82             :     _(ToAsyncGen)                                                           \
      83             :     _(ToAsyncIter)                                                          \
      84             :     _(ToId)                                                                 \
      85             :     _(BitAnd)                                                               \
      86             :     _(BitOr)                                                                \
      87             :     _(BitXor)                                                               \
      88             :     _(Lsh)                                                                  \
      89             :     _(Rsh)                                                                  \
      90             :     _(Ursh)                                                                 \
      91             :     _(SignExtend)                                                           \
      92             :     _(MinMax)                                                               \
      93             :     _(Abs)                                                                  \
      94             :     _(Clz)                                                                  \
      95             :     _(Ctz)                                                                  \
      96             :     _(Popcnt)                                                               \
      97             :     _(Sqrt)                                                                 \
      98             :     _(Atan2)                                                                \
      99             :     _(Hypot)                                                                \
     100             :     _(Pow)                                                                  \
     101             :     _(PowHalf)                                                              \
     102             :     _(Random)                                                               \
     103             :     _(MathFunction)                                                         \
     104             :     _(Add)                                                                  \
     105             :     _(Sub)                                                                  \
     106             :     _(Mul)                                                                  \
     107             :     _(Div)                                                                  \
     108             :     _(Mod)                                                                  \
     109             :     _(Concat)                                                               \
     110             :     _(CharCodeAt)                                                           \
     111             :     _(FromCharCode)                                                         \
     112             :     _(FromCodePoint)                                                        \
     113             :     _(SinCos)                                                               \
     114             :     _(StringSplit)                                                          \
     115             :     _(Substr)                                                               \
     116             :     _(Return)                                                               \
     117             :     _(Throw)                                                                \
     118             :     _(Box)                                                                  \
     119             :     _(Unbox)                                                                \
     120             :     _(GuardObject)                                                          \
     121             :     _(GuardString)                                                          \
     122             :     _(PolyInlineGuard)                                                      \
     123             :     _(AssertRange)                                                          \
     124             :     _(ToDouble)                                                             \
     125             :     _(ToFloat32)                                                            \
     126             :     _(ToInt32)                                                              \
     127             :     _(TruncateToInt32)                                                      \
     128             :     _(WrapInt64ToInt32)                                                     \
     129             :     _(ExtendInt32ToInt64)                                                   \
     130             :     _(Int64ToFloatingPoint)                                                 \
     131             :     _(ToString)                                                             \
     132             :     _(ToObjectOrNull)                                                       \
     133             :     _(NewArray)                                                             \
     134             :     _(NewArrayCopyOnWrite)                                                  \
     135             :     _(NewArrayDynamicLength)                                                \
     136             :     _(NewIterator)                                                          \
     137             :     _(NewTypedArray)                                                        \
     138             :     _(NewTypedArrayDynamicLength)                                           \
     139             :     _(NewObject)                                                            \
     140             :     _(NewTypedObject)                                                       \
     141             :     _(NewNamedLambdaObject)                                                 \
     142             :     _(NewCallObject)                                                        \
     143             :     _(NewSingletonCallObject)                                               \
     144             :     _(NewStringObject)                                                      \
     145             :     _(ObjectState)                                                          \
     146             :     _(ArrayState)                                                           \
     147             :     _(InitElem)                                                             \
     148             :     _(InitElemGetterSetter)                                                 \
     149             :     _(MutateProto)                                                          \
     150             :     _(InitProp)                                                             \
     151             :     _(InitPropGetterSetter)                                                 \
     152             :     _(Start)                                                                \
     153             :     _(OsrEntry)                                                             \
     154             :     _(Nop)                                                                  \
     155             :     _(LimitedTruncate)                                                      \
     156             :     _(RegExp)                                                               \
     157             :     _(RegExpMatcher)                                                        \
     158             :     _(RegExpSearcher)                                                       \
     159             :     _(RegExpTester)                                                         \
     160             :     _(RegExpPrototypeOptimizable)                                           \
     161             :     _(RegExpInstanceOptimizable)                                            \
     162             :     _(GetFirstDollarIndex)                                                  \
     163             :     _(StringReplace)                                                        \
     164             :     _(Lambda)                                                               \
     165             :     _(LambdaArrow)                                                          \
     166             :     _(SetFunName)                                                           \
     167             :     _(KeepAliveObject)                                                      \
     168             :     _(Slots)                                                                \
     169             :     _(Elements)                                                             \
     170             :     _(ConstantElements)                                                     \
     171             :     _(ConvertElementsToDoubles)                                             \
     172             :     _(MaybeToDoubleElement)                                                 \
     173             :     _(MaybeCopyElementsForWrite)                                            \
     174             :     _(LoadSlot)                                                             \
     175             :     _(StoreSlot)                                                            \
     176             :     _(FunctionEnvironment)                                                  \
     177             :     _(NewLexicalEnvironmentObject)                                          \
     178             :     _(CopyLexicalEnvironmentObject)                                         \
     179             :     _(FilterTypeSet)                                                        \
     180             :     _(TypeBarrier)                                                          \
     181             :     _(MonitorTypes)                                                         \
     182             :     _(PostWriteBarrier)                                                     \
     183             :     _(PostWriteElementBarrier)                                              \
     184             :     _(GetPropertyCache)                                                     \
     185             :     _(GetPropertyPolymorphic)                                               \
     186             :     _(SetPropertyPolymorphic)                                               \
     187             :     _(BindNameCache)                                                        \
     188             :     _(CallBindVar)                                                          \
     189             :     _(GuardShape)                                                           \
     190             :     _(GuardReceiverPolymorphic)                                             \
     191             :     _(GuardObjectGroup)                                                     \
     192             :     _(GuardObjectIdentity)                                                  \
     193             :     _(GuardClass)                                                           \
     194             :     _(GuardUnboxedExpando)                                                  \
     195             :     _(LoadUnboxedExpando)                                                   \
     196             :     _(ArrayLength)                                                          \
     197             :     _(SetArrayLength)                                                       \
     198             :     _(GetNextEntryForIterator)                                              \
     199             :     _(TypedArrayLength)                                                     \
     200             :     _(TypedArrayElements)                                                   \
     201             :     _(SetDisjointTypedElements)                                             \
     202             :     _(TypedObjectDescr)                                                     \
     203             :     _(TypedObjectElements)                                                  \
     204             :     _(SetTypedObjectOffset)                                                 \
     205             :     _(InitializedLength)                                                    \
     206             :     _(SetInitializedLength)                                                 \
     207             :     _(UnboxedArrayLength)                                                   \
     208             :     _(UnboxedArrayInitializedLength)                                        \
     209             :     _(IncrementUnboxedArrayInitializedLength)                               \
     210             :     _(SetUnboxedArrayInitializedLength)                                     \
     211             :     _(Not)                                                                  \
     212             :     _(BoundsCheck)                                                          \
     213             :     _(BoundsCheckLower)                                                     \
     214             :     _(InArray)                                                              \
     215             :     _(LoadElement)                                                          \
     216             :     _(LoadElementHole)                                                      \
     217             :     _(LoadUnboxedScalar)                                                    \
     218             :     _(LoadUnboxedObjectOrNull)                                              \
     219             :     _(LoadUnboxedString)                                                    \
     220             :     _(StoreElement)                                                         \
     221             :     _(StoreElementHole)                                                     \
     222             :     _(FallibleStoreElement)                                                 \
     223             :     _(StoreUnboxedScalar)                                                   \
     224             :     _(StoreUnboxedObjectOrNull)                                             \
     225             :     _(StoreUnboxedString)                                                   \
     226             :     _(ConvertUnboxedObjectToNative)                                         \
     227             :     _(ArrayPopShift)                                                        \
     228             :     _(ArrayPush)                                                            \
     229             :     _(ArraySlice)                                                           \
     230             :     _(ArrayJoin)                                                            \
     231             :     _(LoadTypedArrayElementHole)                                            \
     232             :     _(LoadTypedArrayElementStatic)                                          \
     233             :     _(StoreTypedArrayElementHole)                                           \
     234             :     _(StoreTypedArrayElementStatic)                                         \
     235             :     _(AtomicIsLockFree)                                                     \
     236             :     _(GuardSharedTypedArray)                                                \
     237             :     _(CompareExchangeTypedArrayElement)                                     \
     238             :     _(AtomicExchangeTypedArrayElement)                                      \
     239             :     _(AtomicTypedArrayElementBinop)                                         \
     240             :     _(EffectiveAddress)                                                     \
     241             :     _(ClampToUint8)                                                         \
     242             :     _(LoadFixedSlot)                                                        \
     243             :     _(LoadFixedSlotAndUnbox)                                                \
     244             :     _(StoreFixedSlot)                                                       \
     245             :     _(CallGetProperty)                                                      \
     246             :     _(GetNameCache)                                                         \
     247             :     _(CallGetIntrinsicValue)                                                \
     248             :     _(CallGetElement)                                                       \
     249             :     _(CallSetElement)                                                       \
     250             :     _(CallSetProperty)                                                      \
     251             :     _(CallInitElementArray)                                                 \
     252             :     _(DeleteProperty)                                                       \
     253             :     _(DeleteElement)                                                        \
     254             :     _(SetPropertyCache)                                                     \
     255             :     _(IteratorStart)                                                        \
     256             :     _(IteratorMore)                                                         \
     257             :     _(IsNoIter)                                                             \
     258             :     _(IteratorEnd)                                                          \
     259             :     _(StringLength)                                                         \
     260             :     _(ArgumentsLength)                                                      \
     261             :     _(GetFrameArgument)                                                     \
     262             :     _(SetFrameArgument)                                                     \
     263             :     _(RunOncePrologue)                                                      \
     264             :     _(Rest)                                                                 \
     265             :     _(Floor)                                                                \
     266             :     _(Ceil)                                                                 \
     267             :     _(Round)                                                                \
     268             :     _(NearbyInt)                                                            \
     269             :     _(InCache)                                                              \
     270             :     _(HasOwnCache)                                                          \
     271             :     _(InstanceOf)                                                           \
     272             :     _(CallInstanceOf)                                                       \
     273             :     _(InterruptCheck)                                                       \
     274             :     _(GetDOMProperty)                                                       \
     275             :     _(GetDOMMember)                                                         \
     276             :     _(SetDOMProperty)                                                       \
     277             :     _(IsConstructor)                                                        \
     278             :     _(IsCallable)                                                           \
     279             :     _(IsArray)                                                              \
     280             :     _(IsObject)                                                             \
     281             :     _(HasClass)                                                             \
     282             :     _(CopySign)                                                             \
     283             :     _(Rotate)                                                               \
     284             :     _(NewDerivedTypedObject)                                                \
     285             :     _(RecompileCheck)                                                       \
     286             :     _(UnknownValue)                                                         \
     287             :     _(LexicalCheck)                                                         \
     288             :     _(ThrowRuntimeLexicalError)                                             \
     289             :     _(GlobalNameConflictsCheck)                                             \
     290             :     _(Debugger)                                                             \
     291             :     _(NewTarget)                                                            \
     292             :     _(ArrowNewTarget)                                                       \
     293             :     _(CheckReturn)                                                          \
     294             :     _(CheckIsObj)                                                           \
     295             :     _(CheckIsCallable)                                                      \
     296             :     _(CheckObjCoercible)                                                    \
     297             :     _(DebugCheckSelfHosted)                                                 \
     298             :     _(FinishBoundFunctionInit)                                              \
     299             :     _(AsmJSLoadHeap)                                                        \
     300             :     _(AsmJSStoreHeap)                                                       \
     301             :     _(AsmJSCompareExchangeHeap)                                             \
     302             :     _(AsmJSAtomicExchangeHeap)                                              \
     303             :     _(AsmJSAtomicBinopHeap)                                                 \
     304             :     _(WasmNeg)                                                              \
     305             :     _(WasmBoundsCheck)                                                      \
     306             :     _(WasmLoadTls)                                                          \
     307             :     _(WasmAddOffset)                                                        \
     308             :     _(WasmLoad)                                                             \
     309             :     _(WasmStore)                                                            \
     310             :     _(WasmTrap)                                                             \
     311             :     _(WasmTruncateToInt32)                                                  \
     312             :     _(WasmUnsignedToDouble)                                                 \
     313             :     _(WasmUnsignedToFloat32)                                                \
     314             :     _(WasmLoadGlobalVar)                                                    \
     315             :     _(WasmStoreGlobalVar)                                                   \
     316             :     _(WasmReturn)                                                           \
     317             :     _(WasmReturnVoid)                                                       \
     318             :     _(WasmParameter)                                                        \
     319             :     _(WasmStackArg)                                                         \
     320             :     _(WasmCall)                                                             \
     321             :     _(WasmSelect)                                                           \
     322             :     _(WasmReinterpret)                                                      \
     323             :     _(WasmFloatConstant)                                                    \
     324             :     _(WasmTruncateToInt64)
     325             : 
     326             : // Forward declarations of MIR types.
     327             : #define FORWARD_DECLARE(op) class M##op;
     328             :  MIR_OPCODE_LIST(FORWARD_DECLARE)
     329             : #undef FORWARD_DECLARE
     330             : 
     331          13 : class MDefinitionVisitor // interface i.e. pure abstract class
     332             : {
     333             :   public:
     334             : #define VISIT_INS(op) virtual void visit##op(M##op*) = 0;
     335             :     MIR_OPCODE_LIST(VISIT_INS)
     336             : #undef VISIT_INS
     337             : };
     338             : 
     339             : // MDefinition visitor which raises a Not Yet Implemented error for
     340             : // non-overloaded visit functions.
     341             : class MDefinitionVisitorDefaultNYI : public MDefinitionVisitor
     342             : {
     343             :   public:
     344             : #define VISIT_INS(op) virtual void visit##op(M##op*) { MOZ_CRASH("NYI: " #op); }
     345             :     MIR_OPCODE_LIST(VISIT_INS)
     346             : #undef VISIT_INS
     347             : };
     348             : 
     349             : // MDefinition visitor which ignores non-overloaded visit functions.
     350           5 : class MDefinitionVisitorDefaultNoop : public MDefinitionVisitor
     351             : {
     352             :   public:
     353             : #define VISIT_INS(op) virtual void visit##op(M##op*) { }
     354        1791 :     MIR_OPCODE_LIST(VISIT_INS)
     355             : #undef VISIT_INS
     356             : };
     357             : 
     358             : } // namespace jit
     359             : } // namespace js
     360             : 
     361             : #endif /* jit_MOpcodes_h */

Generated by: LCOV version 1.13