michael@0: /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- michael@0: * vim: set ts=8 sts=4 et sw=4 tw=99: michael@0: * This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #ifndef jit_MOpcodes_h michael@0: #define jit_MOpcodes_h michael@0: michael@0: namespace js { michael@0: namespace jit { michael@0: michael@0: #define MIR_OPCODE_LIST(_) \ michael@0: _(Constant) \ michael@0: _(CloneLiteral) \ michael@0: _(Parameter) \ michael@0: _(Callee) \ michael@0: _(TableSwitch) \ michael@0: _(Goto) \ michael@0: _(Test) \ michael@0: _(TypeObjectDispatch) \ michael@0: _(FunctionDispatch) \ michael@0: _(Compare) \ michael@0: _(Phi) \ michael@0: _(Beta) \ michael@0: _(OsrValue) \ michael@0: _(OsrScopeChain) \ michael@0: _(OsrReturnValue) \ michael@0: _(OsrArgumentsObject) \ michael@0: _(ReturnFromCtor) \ michael@0: _(CheckOverRecursed) \ michael@0: _(DefVar) \ michael@0: _(DefFun) \ michael@0: _(CreateThis) \ michael@0: _(CreateThisWithProto) \ michael@0: _(CreateThisWithTemplate) \ michael@0: _(CreateArgumentsObject) \ michael@0: _(GetArgumentsObjectArg) \ michael@0: _(SetArgumentsObjectArg) \ michael@0: _(ComputeThis) \ michael@0: _(LoadArrowThis) \ michael@0: _(Call) \ michael@0: _(ApplyArgs) \ michael@0: _(ArraySplice) \ michael@0: _(Bail) \ michael@0: _(AssertFloat32) \ michael@0: _(GetDynamicName) \ michael@0: _(FilterArgumentsOrEval) \ michael@0: _(CallDirectEval) \ michael@0: _(BitNot) \ michael@0: _(TypeOf) \ michael@0: _(ToId) \ michael@0: _(BitAnd) \ michael@0: _(BitOr) \ michael@0: _(BitXor) \ michael@0: _(Lsh) \ michael@0: _(Rsh) \ michael@0: _(Ursh) \ michael@0: _(MinMax) \ michael@0: _(Abs) \ michael@0: _(Sqrt) \ michael@0: _(Atan2) \ michael@0: _(Hypot) \ michael@0: _(Pow) \ michael@0: _(PowHalf) \ michael@0: _(Random) \ michael@0: _(MathFunction) \ michael@0: _(Add) \ michael@0: _(Sub) \ michael@0: _(Mul) \ michael@0: _(Div) \ michael@0: _(Mod) \ michael@0: _(Concat) \ michael@0: _(ConcatPar) \ michael@0: _(CharCodeAt) \ michael@0: _(FromCharCode) \ michael@0: _(StringSplit) \ michael@0: _(Return) \ michael@0: _(Throw) \ michael@0: _(Box) \ michael@0: _(Unbox) \ michael@0: _(GuardObject) \ michael@0: _(GuardString) \ michael@0: _(AssertRange) \ michael@0: _(ToDouble) \ michael@0: _(ToFloat32) \ michael@0: _(ToInt32) \ michael@0: _(TruncateToInt32) \ michael@0: _(ToString) \ michael@0: _(NewSlots) \ michael@0: _(NewArray) \ michael@0: _(NewObject) \ michael@0: _(NewDeclEnvObject) \ michael@0: _(NewCallObject) \ michael@0: _(NewRunOnceCallObject) \ michael@0: _(NewStringObject) \ michael@0: _(InitElem) \ michael@0: _(InitElemGetterSetter) \ michael@0: _(MutateProto) \ michael@0: _(InitProp) \ michael@0: _(InitPropGetterSetter) \ michael@0: _(Start) \ michael@0: _(OsrEntry) \ michael@0: _(Nop) \ michael@0: _(RegExp) \ michael@0: _(RegExpExec) \ michael@0: _(RegExpTest) \ michael@0: _(RegExpReplace) \ michael@0: _(StringReplace) \ michael@0: _(Lambda) \ michael@0: _(LambdaArrow) \ michael@0: _(ImplicitThis) \ michael@0: _(Slots) \ michael@0: _(Elements) \ michael@0: _(ConstantElements) \ michael@0: _(ConvertElementsToDoubles) \ michael@0: _(MaybeToDoubleElement) \ michael@0: _(LoadSlot) \ michael@0: _(StoreSlot) \ michael@0: _(FunctionEnvironment) \ michael@0: _(FilterTypeSet) \ michael@0: _(TypeBarrier) \ michael@0: _(MonitorTypes) \ michael@0: _(PostWriteBarrier) \ michael@0: _(GetPropertyCache) \ michael@0: _(GetPropertyPolymorphic) \ michael@0: _(SetPropertyPolymorphic) \ michael@0: _(GetElementCache) \ michael@0: _(SetElementCache) \ michael@0: _(BindNameCache) \ michael@0: _(GuardShape) \ michael@0: _(GuardObjectType) \ michael@0: _(GuardObjectIdentity) \ michael@0: _(GuardClass) \ michael@0: _(ArrayLength) \ michael@0: _(SetArrayLength) \ michael@0: _(TypedArrayLength) \ michael@0: _(TypedArrayElements) \ michael@0: _(TypedObjectElements) \ michael@0: _(SetTypedObjectOffset) \ michael@0: _(InitializedLength) \ michael@0: _(SetInitializedLength) \ michael@0: _(Not) \ michael@0: _(NeuterCheck) \ michael@0: _(BoundsCheck) \ michael@0: _(BoundsCheckLower) \ michael@0: _(InArray) \ michael@0: _(LoadElement) \ michael@0: _(LoadElementHole) \ michael@0: _(StoreElement) \ michael@0: _(StoreElementHole) \ michael@0: _(ArrayPopShift) \ michael@0: _(ArrayPush) \ michael@0: _(ArrayConcat) \ michael@0: _(LoadTypedArrayElement) \ michael@0: _(LoadTypedArrayElementHole) \ michael@0: _(LoadTypedArrayElementStatic) \ michael@0: _(StoreTypedArrayElement) \ michael@0: _(StoreTypedArrayElementHole) \ michael@0: _(StoreTypedArrayElementStatic) \ michael@0: _(EffectiveAddress) \ michael@0: _(ClampToUint8) \ michael@0: _(LoadFixedSlot) \ michael@0: _(StoreFixedSlot) \ michael@0: _(CallGetProperty) \ michael@0: _(GetNameCache) \ michael@0: _(CallGetIntrinsicValue) \ michael@0: _(CallsiteCloneCache) \ michael@0: _(CallGetElement) \ michael@0: _(CallSetElement) \ michael@0: _(CallSetProperty) \ michael@0: _(CallInitElementArray) \ michael@0: _(DeleteProperty) \ michael@0: _(DeleteElement) \ michael@0: _(SetPropertyCache) \ michael@0: _(IteratorStart) \ michael@0: _(IteratorNext) \ michael@0: _(IteratorMore) \ michael@0: _(IteratorEnd) \ michael@0: _(StringLength) \ michael@0: _(ArgumentsLength) \ michael@0: _(GetFrameArgument) \ michael@0: _(SetFrameArgument) \ michael@0: _(RunOncePrologue) \ michael@0: _(Rest) \ michael@0: _(Floor) \ michael@0: _(Round) \ michael@0: _(In) \ michael@0: _(InstanceOf) \ michael@0: _(CallInstanceOf) \ michael@0: _(InterruptCheck) \ michael@0: _(ProfilerStackOp) \ michael@0: _(GetDOMProperty) \ michael@0: _(GetDOMMember) \ michael@0: _(SetDOMProperty) \ michael@0: _(IsCallable) \ michael@0: _(HaveSameClass) \ michael@0: _(HasClass) \ michael@0: _(AsmJSNeg) \ michael@0: _(AsmJSUnsignedToDouble) \ michael@0: _(AsmJSUnsignedToFloat32) \ michael@0: _(AsmJSLoadHeap) \ michael@0: _(AsmJSStoreHeap) \ michael@0: _(AsmJSLoadGlobalVar) \ michael@0: _(AsmJSStoreGlobalVar) \ michael@0: _(AsmJSLoadFuncPtr) \ michael@0: _(AsmJSLoadFFIFunc) \ michael@0: _(AsmJSReturn) \ michael@0: _(AsmJSParameter) \ michael@0: _(AsmJSVoidReturn) \ michael@0: _(AsmJSPassStackArg) \ michael@0: _(AsmJSCall) \ michael@0: _(CheckOverRecursedPar) \ michael@0: _(NewCallObjectPar) \ michael@0: _(NewPar) \ michael@0: _(NewDenseArrayPar) \ michael@0: _(NewDerivedTypedObject) \ michael@0: _(AbortPar) \ michael@0: _(LambdaPar) \ michael@0: _(RestPar) \ michael@0: _(ForkJoinContext) \ michael@0: _(ForkJoinGetSlice) \ michael@0: _(GuardThreadExclusive) \ michael@0: _(InterruptCheckPar) \ michael@0: _(RecompileCheck) michael@0: michael@0: // Forward declarations of MIR types. michael@0: #define FORWARD_DECLARE(op) class M##op; michael@0: MIR_OPCODE_LIST(FORWARD_DECLARE) michael@0: #undef FORWARD_DECLARE michael@0: michael@0: class MInstructionVisitor // interface i.e. pure abstract class michael@0: { michael@0: public: michael@0: #define VISIT_INS(op) virtual bool visit##op(M##op *) = 0; michael@0: MIR_OPCODE_LIST(VISIT_INS) michael@0: #undef VISIT_INS michael@0: }; michael@0: michael@0: class MInstructionVisitorWithDefaults : public MInstructionVisitor michael@0: { michael@0: public: michael@0: #define VISIT_INS(op) virtual bool visit##op(M##op *) { MOZ_ASSUME_UNREACHABLE("NYI: " #op); } michael@0: MIR_OPCODE_LIST(VISIT_INS) michael@0: #undef VISIT_INS michael@0: }; michael@0: michael@0: } // namespace jit michael@0: } // namespace js michael@0: michael@0: #endif /* jit_MOpcodes_h */