Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
michael@0 | 1 | /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- |
michael@0 | 2 | * vim: set ts=8 sts=4 et sw=4 tw=99: |
michael@0 | 3 | * This Source Code Form is subject to the terms of the Mozilla Public |
michael@0 | 4 | * License, v. 2.0. If a copy of the MPL was not distributed with this |
michael@0 | 5 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
michael@0 | 6 | |
michael@0 | 7 | #ifndef jit_MOpcodes_h |
michael@0 | 8 | #define jit_MOpcodes_h |
michael@0 | 9 | |
michael@0 | 10 | namespace js { |
michael@0 | 11 | namespace jit { |
michael@0 | 12 | |
michael@0 | 13 | #define MIR_OPCODE_LIST(_) \ |
michael@0 | 14 | _(Constant) \ |
michael@0 | 15 | _(CloneLiteral) \ |
michael@0 | 16 | _(Parameter) \ |
michael@0 | 17 | _(Callee) \ |
michael@0 | 18 | _(TableSwitch) \ |
michael@0 | 19 | _(Goto) \ |
michael@0 | 20 | _(Test) \ |
michael@0 | 21 | _(TypeObjectDispatch) \ |
michael@0 | 22 | _(FunctionDispatch) \ |
michael@0 | 23 | _(Compare) \ |
michael@0 | 24 | _(Phi) \ |
michael@0 | 25 | _(Beta) \ |
michael@0 | 26 | _(OsrValue) \ |
michael@0 | 27 | _(OsrScopeChain) \ |
michael@0 | 28 | _(OsrReturnValue) \ |
michael@0 | 29 | _(OsrArgumentsObject) \ |
michael@0 | 30 | _(ReturnFromCtor) \ |
michael@0 | 31 | _(CheckOverRecursed) \ |
michael@0 | 32 | _(DefVar) \ |
michael@0 | 33 | _(DefFun) \ |
michael@0 | 34 | _(CreateThis) \ |
michael@0 | 35 | _(CreateThisWithProto) \ |
michael@0 | 36 | _(CreateThisWithTemplate) \ |
michael@0 | 37 | _(CreateArgumentsObject) \ |
michael@0 | 38 | _(GetArgumentsObjectArg) \ |
michael@0 | 39 | _(SetArgumentsObjectArg) \ |
michael@0 | 40 | _(ComputeThis) \ |
michael@0 | 41 | _(LoadArrowThis) \ |
michael@0 | 42 | _(Call) \ |
michael@0 | 43 | _(ApplyArgs) \ |
michael@0 | 44 | _(ArraySplice) \ |
michael@0 | 45 | _(Bail) \ |
michael@0 | 46 | _(AssertFloat32) \ |
michael@0 | 47 | _(GetDynamicName) \ |
michael@0 | 48 | _(FilterArgumentsOrEval) \ |
michael@0 | 49 | _(CallDirectEval) \ |
michael@0 | 50 | _(BitNot) \ |
michael@0 | 51 | _(TypeOf) \ |
michael@0 | 52 | _(ToId) \ |
michael@0 | 53 | _(BitAnd) \ |
michael@0 | 54 | _(BitOr) \ |
michael@0 | 55 | _(BitXor) \ |
michael@0 | 56 | _(Lsh) \ |
michael@0 | 57 | _(Rsh) \ |
michael@0 | 58 | _(Ursh) \ |
michael@0 | 59 | _(MinMax) \ |
michael@0 | 60 | _(Abs) \ |
michael@0 | 61 | _(Sqrt) \ |
michael@0 | 62 | _(Atan2) \ |
michael@0 | 63 | _(Hypot) \ |
michael@0 | 64 | _(Pow) \ |
michael@0 | 65 | _(PowHalf) \ |
michael@0 | 66 | _(Random) \ |
michael@0 | 67 | _(MathFunction) \ |
michael@0 | 68 | _(Add) \ |
michael@0 | 69 | _(Sub) \ |
michael@0 | 70 | _(Mul) \ |
michael@0 | 71 | _(Div) \ |
michael@0 | 72 | _(Mod) \ |
michael@0 | 73 | _(Concat) \ |
michael@0 | 74 | _(ConcatPar) \ |
michael@0 | 75 | _(CharCodeAt) \ |
michael@0 | 76 | _(FromCharCode) \ |
michael@0 | 77 | _(StringSplit) \ |
michael@0 | 78 | _(Return) \ |
michael@0 | 79 | _(Throw) \ |
michael@0 | 80 | _(Box) \ |
michael@0 | 81 | _(Unbox) \ |
michael@0 | 82 | _(GuardObject) \ |
michael@0 | 83 | _(GuardString) \ |
michael@0 | 84 | _(AssertRange) \ |
michael@0 | 85 | _(ToDouble) \ |
michael@0 | 86 | _(ToFloat32) \ |
michael@0 | 87 | _(ToInt32) \ |
michael@0 | 88 | _(TruncateToInt32) \ |
michael@0 | 89 | _(ToString) \ |
michael@0 | 90 | _(NewSlots) \ |
michael@0 | 91 | _(NewArray) \ |
michael@0 | 92 | _(NewObject) \ |
michael@0 | 93 | _(NewDeclEnvObject) \ |
michael@0 | 94 | _(NewCallObject) \ |
michael@0 | 95 | _(NewRunOnceCallObject) \ |
michael@0 | 96 | _(NewStringObject) \ |
michael@0 | 97 | _(InitElem) \ |
michael@0 | 98 | _(InitElemGetterSetter) \ |
michael@0 | 99 | _(MutateProto) \ |
michael@0 | 100 | _(InitProp) \ |
michael@0 | 101 | _(InitPropGetterSetter) \ |
michael@0 | 102 | _(Start) \ |
michael@0 | 103 | _(OsrEntry) \ |
michael@0 | 104 | _(Nop) \ |
michael@0 | 105 | _(RegExp) \ |
michael@0 | 106 | _(RegExpExec) \ |
michael@0 | 107 | _(RegExpTest) \ |
michael@0 | 108 | _(RegExpReplace) \ |
michael@0 | 109 | _(StringReplace) \ |
michael@0 | 110 | _(Lambda) \ |
michael@0 | 111 | _(LambdaArrow) \ |
michael@0 | 112 | _(ImplicitThis) \ |
michael@0 | 113 | _(Slots) \ |
michael@0 | 114 | _(Elements) \ |
michael@0 | 115 | _(ConstantElements) \ |
michael@0 | 116 | _(ConvertElementsToDoubles) \ |
michael@0 | 117 | _(MaybeToDoubleElement) \ |
michael@0 | 118 | _(LoadSlot) \ |
michael@0 | 119 | _(StoreSlot) \ |
michael@0 | 120 | _(FunctionEnvironment) \ |
michael@0 | 121 | _(FilterTypeSet) \ |
michael@0 | 122 | _(TypeBarrier) \ |
michael@0 | 123 | _(MonitorTypes) \ |
michael@0 | 124 | _(PostWriteBarrier) \ |
michael@0 | 125 | _(GetPropertyCache) \ |
michael@0 | 126 | _(GetPropertyPolymorphic) \ |
michael@0 | 127 | _(SetPropertyPolymorphic) \ |
michael@0 | 128 | _(GetElementCache) \ |
michael@0 | 129 | _(SetElementCache) \ |
michael@0 | 130 | _(BindNameCache) \ |
michael@0 | 131 | _(GuardShape) \ |
michael@0 | 132 | _(GuardObjectType) \ |
michael@0 | 133 | _(GuardObjectIdentity) \ |
michael@0 | 134 | _(GuardClass) \ |
michael@0 | 135 | _(ArrayLength) \ |
michael@0 | 136 | _(SetArrayLength) \ |
michael@0 | 137 | _(TypedArrayLength) \ |
michael@0 | 138 | _(TypedArrayElements) \ |
michael@0 | 139 | _(TypedObjectElements) \ |
michael@0 | 140 | _(SetTypedObjectOffset) \ |
michael@0 | 141 | _(InitializedLength) \ |
michael@0 | 142 | _(SetInitializedLength) \ |
michael@0 | 143 | _(Not) \ |
michael@0 | 144 | _(NeuterCheck) \ |
michael@0 | 145 | _(BoundsCheck) \ |
michael@0 | 146 | _(BoundsCheckLower) \ |
michael@0 | 147 | _(InArray) \ |
michael@0 | 148 | _(LoadElement) \ |
michael@0 | 149 | _(LoadElementHole) \ |
michael@0 | 150 | _(StoreElement) \ |
michael@0 | 151 | _(StoreElementHole) \ |
michael@0 | 152 | _(ArrayPopShift) \ |
michael@0 | 153 | _(ArrayPush) \ |
michael@0 | 154 | _(ArrayConcat) \ |
michael@0 | 155 | _(LoadTypedArrayElement) \ |
michael@0 | 156 | _(LoadTypedArrayElementHole) \ |
michael@0 | 157 | _(LoadTypedArrayElementStatic) \ |
michael@0 | 158 | _(StoreTypedArrayElement) \ |
michael@0 | 159 | _(StoreTypedArrayElementHole) \ |
michael@0 | 160 | _(StoreTypedArrayElementStatic) \ |
michael@0 | 161 | _(EffectiveAddress) \ |
michael@0 | 162 | _(ClampToUint8) \ |
michael@0 | 163 | _(LoadFixedSlot) \ |
michael@0 | 164 | _(StoreFixedSlot) \ |
michael@0 | 165 | _(CallGetProperty) \ |
michael@0 | 166 | _(GetNameCache) \ |
michael@0 | 167 | _(CallGetIntrinsicValue) \ |
michael@0 | 168 | _(CallsiteCloneCache) \ |
michael@0 | 169 | _(CallGetElement) \ |
michael@0 | 170 | _(CallSetElement) \ |
michael@0 | 171 | _(CallSetProperty) \ |
michael@0 | 172 | _(CallInitElementArray) \ |
michael@0 | 173 | _(DeleteProperty) \ |
michael@0 | 174 | _(DeleteElement) \ |
michael@0 | 175 | _(SetPropertyCache) \ |
michael@0 | 176 | _(IteratorStart) \ |
michael@0 | 177 | _(IteratorNext) \ |
michael@0 | 178 | _(IteratorMore) \ |
michael@0 | 179 | _(IteratorEnd) \ |
michael@0 | 180 | _(StringLength) \ |
michael@0 | 181 | _(ArgumentsLength) \ |
michael@0 | 182 | _(GetFrameArgument) \ |
michael@0 | 183 | _(SetFrameArgument) \ |
michael@0 | 184 | _(RunOncePrologue) \ |
michael@0 | 185 | _(Rest) \ |
michael@0 | 186 | _(Floor) \ |
michael@0 | 187 | _(Round) \ |
michael@0 | 188 | _(In) \ |
michael@0 | 189 | _(InstanceOf) \ |
michael@0 | 190 | _(CallInstanceOf) \ |
michael@0 | 191 | _(InterruptCheck) \ |
michael@0 | 192 | _(ProfilerStackOp) \ |
michael@0 | 193 | _(GetDOMProperty) \ |
michael@0 | 194 | _(GetDOMMember) \ |
michael@0 | 195 | _(SetDOMProperty) \ |
michael@0 | 196 | _(IsCallable) \ |
michael@0 | 197 | _(HaveSameClass) \ |
michael@0 | 198 | _(HasClass) \ |
michael@0 | 199 | _(AsmJSNeg) \ |
michael@0 | 200 | _(AsmJSUnsignedToDouble) \ |
michael@0 | 201 | _(AsmJSUnsignedToFloat32) \ |
michael@0 | 202 | _(AsmJSLoadHeap) \ |
michael@0 | 203 | _(AsmJSStoreHeap) \ |
michael@0 | 204 | _(AsmJSLoadGlobalVar) \ |
michael@0 | 205 | _(AsmJSStoreGlobalVar) \ |
michael@0 | 206 | _(AsmJSLoadFuncPtr) \ |
michael@0 | 207 | _(AsmJSLoadFFIFunc) \ |
michael@0 | 208 | _(AsmJSReturn) \ |
michael@0 | 209 | _(AsmJSParameter) \ |
michael@0 | 210 | _(AsmJSVoidReturn) \ |
michael@0 | 211 | _(AsmJSPassStackArg) \ |
michael@0 | 212 | _(AsmJSCall) \ |
michael@0 | 213 | _(CheckOverRecursedPar) \ |
michael@0 | 214 | _(NewCallObjectPar) \ |
michael@0 | 215 | _(NewPar) \ |
michael@0 | 216 | _(NewDenseArrayPar) \ |
michael@0 | 217 | _(NewDerivedTypedObject) \ |
michael@0 | 218 | _(AbortPar) \ |
michael@0 | 219 | _(LambdaPar) \ |
michael@0 | 220 | _(RestPar) \ |
michael@0 | 221 | _(ForkJoinContext) \ |
michael@0 | 222 | _(ForkJoinGetSlice) \ |
michael@0 | 223 | _(GuardThreadExclusive) \ |
michael@0 | 224 | _(InterruptCheckPar) \ |
michael@0 | 225 | _(RecompileCheck) |
michael@0 | 226 | |
michael@0 | 227 | // Forward declarations of MIR types. |
michael@0 | 228 | #define FORWARD_DECLARE(op) class M##op; |
michael@0 | 229 | MIR_OPCODE_LIST(FORWARD_DECLARE) |
michael@0 | 230 | #undef FORWARD_DECLARE |
michael@0 | 231 | |
michael@0 | 232 | class MInstructionVisitor // interface i.e. pure abstract class |
michael@0 | 233 | { |
michael@0 | 234 | public: |
michael@0 | 235 | #define VISIT_INS(op) virtual bool visit##op(M##op *) = 0; |
michael@0 | 236 | MIR_OPCODE_LIST(VISIT_INS) |
michael@0 | 237 | #undef VISIT_INS |
michael@0 | 238 | }; |
michael@0 | 239 | |
michael@0 | 240 | class MInstructionVisitorWithDefaults : public MInstructionVisitor |
michael@0 | 241 | { |
michael@0 | 242 | public: |
michael@0 | 243 | #define VISIT_INS(op) virtual bool visit##op(M##op *) { MOZ_ASSUME_UNREACHABLE("NYI: " #op); } |
michael@0 | 244 | MIR_OPCODE_LIST(VISIT_INS) |
michael@0 | 245 | #undef VISIT_INS |
michael@0 | 246 | }; |
michael@0 | 247 | |
michael@0 | 248 | } // namespace jit |
michael@0 | 249 | } // namespace js |
michael@0 | 250 | |
michael@0 | 251 | #endif /* jit_MOpcodes_h */ |