Bug 1890750 - Part 1: Include NATIVE_JIT_ENTRY in FunctionFlags::HasJitEntryFlags...
[gecko.git] / js / src / jit / MIROps.yaml
blob78ab98922147de23fc3a3bfc7b6bf051648c79bc
1 # This Source Code Form is subject to the terms of the Mozilla Public
2 # License, v. 2.0. If a copy of the MPL was not distributed with this
3 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
5 # [SMDOC] MIR Opcodes
6 # =======================
7 # This file defines all MIR opcodes. It is parsed by GenerateMIRFiles.py
8 # at build time to create MIROpsGenerated.h. Each opcode consists of a
9 # name and a set of attributes that are described below. A few of the
10 # attributes below allow setting the value to "custom", meaning the
11 # method will be declared for the MIR op, but will need to be implemented
12 # in C++ (typically done in MIR.cpp). Unless marked as required, attributes
13 # are optional.
15 # name [required]
16 # ====
17 # Opcode name.
18 # Possible values:
19 #   - opcode string: used as the name for MIR opcode.
21 # gen_boilerplate
22 # ===============
23 # Used to decide to generate MIR boilerplate.
24 #   - true (default): auto generate boilerplate for this MIR opcode
25 #   - false: do not generate boilerplate for this MIR opcode
27 # operands
28 # ========
29 # A list of operands for the MIR op class constructor. Each operand is a
30 # MIR node. The operand kind is specified from the one of the kinds from
31 # the MIRType enum in IonTypes.h. The specified types for the
32 # operands will decide the type policy for the instruction.
34 # The naming of operands is how the NAMED_OPERANDS macro will define
35 # its operands.
37 # For example:
38 #   object: Object
39 #   id: Value
40 #   value: Object
42 # Will result in an instruction having the type policy of:
43 #   MixPolicy<ObjectPolicy<0>, BoxPolicy<1>, ObjectPolicy<2>>
44 # and a named operands definition that looks like the following:
45 #   NAMED_OPERANDS((0, object), (1, idValue), (2, value))
47 #   - attribute not specified (default): no code generated
48 #   - operand list: MIRTypes (See MIRType in jit/IonTypes.h)
50 # arguments
51 # =========
52 # A list of non-MIR node arguments to the MIR op class constructor
53 # that are passed along with the operands. The arguments require
54 # both a name and a full type signature for each item in the list.
56 # For example:
57 #   templateObject: JSObject*
58 #   initialHeap: gc::Heap
60 # For each argument a private variable declaration will be autogenerated
61 # in the MIR op class, as well as simple accessor for that variable. If
62 # the type of the variable is a GC pointer it will by automatically
63 # wrapped by CompilerGCPointer. The above arguments list will result in
64 # the following declarations and accessors:
66 #   CompilerGCPointer<JSObject*> templateObject_;
67 #   gc::Heap initialHeap_;
69 #   JSObject* templateObject() const { return templateObject_; }
70 #   gc::Heap initialHeap() const { return initialHeap_; }
72 #   - attribute not specified (default): no code generated
73 #   - operand list: argument names and their full type signature
75 # type_policy
76 # ============
77 # If this attribute is present, then the type policy for that opcode will be
78 # NoTypePolicy. This is used for opcode that should have no type policy.
79 #   - attribute not specified (default): no code generated, type policy
80 #     is based off of operands
81 #   - none: defines the type policy as opcode's NoTypePolicy
83 # result_type
84 # ===========
85 # Defines the result type of the MIR opcode.
86 #   - attribute not specified (default): no code is generated
87 #   - MIRType string: Will add a call to setResultType to the opcode constructor.
88 #                   This will set the MIR opcodes result type to whatever the
89 #                   specified MIRType is (See MIRType in jit/IonTypes.h).
91 # guard
92 # =====
93 # Set if the opcode is a guard instruction and is used for checks in optimizations
94 # such as range analysis and value numbering.
95 #   - attribute not specified (default): no code generated
96 #   - true: adds setGuard to opcode constructor
98 # movable
99 # =======
100 # Defines the movable MIR flag for movable instructions. This is used for knowing
101 # whether we can hoist an instruction.
102 #   - attribute not specified (default): no code generated
103 #   - true: adds setMovable call in opcode constructor
105 # folds_to
106 # ========
107 # The foldsTo method is used for determining if an instruction can be folded into
108 # simpler instruction or for constant folding, depending on its operands.
109 #   - attribute not specified (default): no code generated, no constants to fold
110 #   - custom: custom C++ implementation
112 # congruent_to
113 # ============
114 # Used by ValueNumbering to determine if two values are congruent.
115 #   - attribute not specified (default): no code generated, congruentTo(foo) returns
116 #     false
117 #   - if_operands_equal: congruentTo(foo) will return congruentIfOperandsEqual(foo)
118 #   - custom: custom C++ implementation
120 # alias_set
121 # =========
122 # Defines the getAliasSet function for a MIR op. The alias set is used for alias
123 # analysis. The default alias set is Any.
124 #   - attribute not specified (default): no code generated, alias set is Any
125 #   - none: this is the most common case, this is will set the alias set to None.
126 #   - custom: custom C++ implementation in MIR.cpp
128 # possibly_calls
129 # ==============
130 # Defines if a opcode can possibly call.
131 #   - attribute not specified (default): no code generated, opcode does not call
132 #   - true: possiblyCalls returns true
133 #   - custom: custom C++ implementation
135 # compute_range
136 # =============
137 # Computes and sets the range value for a MIR node, which is then used in range
138 # analysis.
139 #   - attribute not specified (default): no code generated, range is not set for node
140 #   - custom: custom C++ implementation in RangeAnalysis.cpp
142 # can_recover
143 # ===========
144 # Indicates whether this instruction can be recovered on bailout.
145 # Possible values:
146 #   - attribute not specified (default): no code generated, canRecoverOnBailout
147 #     returns false
148 #   - true: canRecoverOnBailout returns true
149 #   - custom: canRecoverOnBailout has a custom C++ implementation
150 # If the value is either 'true' or 'custom', writeRecoverData has a custom C++
151 # implementation.
153 # clone
154 # =====
155 # Allows cloning for that MIR op.
156 #   - attribute not specified (default): no code generated
157 #   - true: allows cloning
159 # can_consume_float32
160 # ===================
161 # Indicates whether this instruction's operands can have MIRType::Float32.
162 # Possible values:
163 #   - attribute not specified (default): no code generated
164 #   - true: canConsumeFloat32 returns true
167 # TODO(no-TI): try to remove this instruction.
168 - name: Start
170 # Instruction marking on entrypoint for on-stack replacement.
171 # OSR may occur at loop headers (at JSOp::LoopHead).
172 # There is at most one MOsrEntry per MIRGraph.
173 - name: OsrEntry
174   result_type: Pointer
176 - name: Nop
177   alias_set: none
178   clone: true
180 - name: LimitedTruncate
181   gen_boilerplate: false
183 - name: Constant
184   gen_boilerplate: false
186 - name: WasmNullConstant
187   gen_boilerplate: false
189 - name: WasmFloatConstant
190   gen_boilerplate: false
192 - name: Parameter
193   gen_boilerplate: false
195 - name: Callee
196   result_type: Object
197   movable: true
198   congruent_to: if_operands_equal
199   alias_set: none
201 - name: IsConstructing
202   result_type: Boolean
203   movable: true
204   congruent_to: if_operands_equal
205   alias_set: none
207 - name: TableSwitch
208   gen_boilerplate: false
210 - name: Goto
211   gen_boilerplate: false
213 - name: Test
214   gen_boilerplate: false
216 - name: Return
217   gen_boilerplate: false
219 - name: Throw
220   operands:
221     value: Value
222   alias_set: custom
223   possibly_calls: true
225 - name: ThrowWithStack
226   operands:
227     value: Value
228     stack: Value
229   alias_set: custom
230   possibly_calls: true
232 - name: NewArray
233   gen_boilerplate: false
235 - name: NewArrayDynamicLength
236   operands:
237     length: Int32
238   arguments:
239     templateObject: JSObject*
240     initialHeap: gc::Heap
241   result_type: Object
242   # Need to throw if length is negative.
243   guard: true
244   # Throws if length is negative.
245   alias_set: custom
247 - name: NewTypedArray
248   gen_boilerplate: false
250 - name: NewTypedArrayDynamicLength
251   operands:
252     length: Int32
253   arguments:
254     templateObject: JSObject*
255     initialHeap: gc::Heap
256   result_type: Object
257   guard: true
258   # Throws if length is negative.
259   alias_set: custom
261 # Create a new TypedArray from an Array (or Array-like object) or a TypedArray.
262 - name: NewTypedArrayFromArray
263   operands:
264     array: Object
265   arguments:
266     templateObject: JSObject*
267     initialHeap: gc::Heap
268   result_type: Object
269   guard: true
270   possibly_calls: true
272 # Create a new TypedArray from an ArrayBuffer (or SharedArrayBuffer).
273 - name: NewTypedArrayFromArrayBuffer
274   operands:
275     arrayBuffer: Object
276     byteOffset: Value
277     length: Value
278   arguments:
279     templateObject: JSObject*
280     initialHeap: gc::Heap
281   result_type: Object
282   guard: true
283   possibly_calls: true
285 - name: NewObject
286   gen_boilerplate: false
288 - name: NewPlainObject
289   gen_boilerplate: false
291 - name: NewArrayObject
292   gen_boilerplate: false
294 - name: NewIterator
295   gen_boilerplate: false
297 - name: ObjectState
298   gen_boilerplate: false
300 - name: ArrayState
301   gen_boilerplate: false
303 - name: BindFunction
304   gen_boilerplate: false
306 - name: NewBoundFunction
307   arguments:
308     templateObj: JSObject*
309   result_type: Object
310   alias_set: none
312 - name: BoundFunctionNumArgs
313   operands:
314     object: Object
315   result_type: Int32
316   movable: true
317   congruent_to: if_operands_equal
318   # A bound function's state is immutable, so there is no
319   # implicit dependency.
320   alias_set: none
322 - name: GuardBoundFunctionIsConstructor
323   operands:
324     object: Object
325   result_type: Object
326   guard: true
327   movable: true
328   congruent_to: if_operands_equal
329   # The is-constructor flag is immutable for a bound function.
330   alias_set: none
332 # Setting __proto__ in an object literal.
333 - name: MutateProto
334   operands:
335     object: Object
336     value: Value
337   result_type: None
338   possibly_calls: true
340 - name: InitPropGetterSetter
341   operands:
342     object: Object
343     value: Object
344   arguments:
345     name: PropertyName*
347 - name: InitElemGetterSetter
348   operands:
349     object: Object
350     id: Value
351     value: Object
353 - name: Call
354   gen_boilerplate: false
356 - name: CallClassHook
357   gen_boilerplate: false
359 - name: ApplyArgs
360   gen_boilerplate: false
362 - name: ApplyArgsObj
363   gen_boilerplate: false
365 - name: ApplyArray
366   gen_boilerplate: false
368 - name: ConstructArgs
369   gen_boilerplate: false
371 - name: ConstructArray
372   gen_boilerplate: false
374 - name: Bail
375   gen_boilerplate: false
377 - name: Unreachable
378   gen_boilerplate: false
380 # This op serves as a way to force the encoding of a snapshot, even if there
381 # is no resume point using it.  This is useful to run MAssertRecoveredOnBailout
382 # assertions.
383 - name: EncodeSnapshot
384   guard: true
386 - name: AssertRecoveredOnBailout
387   gen_boilerplate: false
389 - name: AssertFloat32
390   gen_boilerplate: false
392 - name: Compare
393   gen_boilerplate: false
395 - name: SameValueDouble
396   operands:
397     left: Double
398     right: Double
399   result_type: Boolean
400   movable: true
401   congruent_to: if_operands_equal
402   alias_set: none
403   clone: true
405 - name: SameValue
406   operands:
407     left: Value
408     right: Value
409   result_type: Boolean
410   movable: true
411   congruent_to: if_operands_equal
412   alias_set: none
413   clone: true
415 - name: Box
416   gen_boilerplate: false
418 - name: Unbox
419   gen_boilerplate: false
421 - name: AssertRange
422   gen_boilerplate: false
424 - name: AssertClass
425   gen_boilerplate: false
427 - name: AssertShape
428   gen_boilerplate: false
430 # Caller-side allocation of |this| for |new|:
431 # Constructs |this| when possible, else MagicValue(JS_IS_CONSTRUCTING).
432 - name: CreateThis
433   operands:
434     callee: Object
435     newTarget: Object
436   result_type: Value
437   # Performs a property read from |newTarget| iff |newTarget| is a JSFunction
438   # with an own |.prototype| property.
439   alias_set: custom
440   possibly_calls: true
442 - name: CreateArgumentsObject
443   gen_boilerplate: false
445 - name: CreateInlinedArgumentsObject
446   gen_boilerplate: false
448 - name: GetInlinedArgument
449   gen_boilerplate: false
451 - name: GetInlinedArgumentHole
452   gen_boilerplate: false
454 - name: GetArgumentsObjectArg
455   operands:
456     argsObject: Object
457   arguments:
458     argno: size_t
459   result_type: Value
460   congruent_to: custom
461   alias_set: custom
463 - name: SetArgumentsObjectArg
464   operands:
465     argsObject: Object
466     value: Value
467   arguments:
468     argno: size_t
469   alias_set: custom
471 # Load |arguments[index]| from a mapped or unmapped arguments object. Bails out
472 # when any elements were overridden or deleted. Also bails out if the index is
473 # out of bounds.
474 - name: LoadArgumentsObjectArg
475   operands:
476     argsObject: Object
477     index: Int32
478   result_type: Value
479   guard: true
480   congruent_to: if_operands_equal
481   alias_set: custom
483 # Load |arguments[index]| from a mapped or unmapped arguments object. Bails out
484 # when any elements were overridden or deleted. Returns undefined if the index is
485 # out of bounds.
486 - name: LoadArgumentsObjectArgHole
487   operands:
488     argsObject: Object
489     index: Int32
490   result_type: Value
491   guard: true
492   congruent_to: if_operands_equal
493   alias_set: custom
495 - name: InArgumentsObjectArg
496   operands:
497     argsObject: Object
498     index: Int32
499   result_type: Boolean
500   guard: true
501   congruent_to: if_operands_equal
502   alias_set: custom
504 # Load |arguments.length|. Bails out if the length has been overriden.
505 - name: ArgumentsObjectLength
506   operands:
507     argsObject: Object
508   result_type: Int32
509   guard: true
510   movable: true
511   congruent_to: if_operands_equal
512   # Even though the "length" property is lazily resolved, it acts similar to
513   # a normal property load, so we can treat this operation like any other
514   # property read.
515   alias_set: custom
517 # Create an array from an arguments object.
518 - name: ArrayFromArgumentsObject
519   operands:
520     argsObject: Object
521   arguments:
522     shape: Shape*
523   result_type: Object
524   possibly_calls: true
526 # Guard that the given flags are not set on the arguments object.
527 - name: GuardArgumentsObjectFlags
528   operands:
529     argsObject: Object
530   arguments:
531     flags: uint32_t
532   result_type: Object
533   movable: true
534   guard: true
535   congruent_to: custom
536   # The flags are packed with the length in a fixed private slot.
537   alias_set: custom
539 - name: LoadScriptedProxyHandler
540   operands:
541     object: Object
542   result_type: Object
543   guard: true
544   congruent_to: if_operands_equal
545   alias_set: none
547 #ifdef JS_PUNBOX64
548 - name: CheckScriptedProxyGetResult
549   operands:
550     target: Value
551     id: Value
552     value: Value
553   guard: true
554   alias_set: custom
555 #endif
557 - name: IdToStringOrSymbol
558   operands:
559     idVal: Value
560   result_type: Value
561   congruent_to: if_operands_equal
562   alias_set: none
563   folds_to: custom
565 # Given a MIRType::Value A and a MIRType::Object B:
566 # If the Value may be safely unboxed to an Object, return Object(A).
567 # Otherwise, return B.
568 # Used to implement return behavior for inlined constructors.
569 - name: ReturnFromCtor
570   operands:
571     value: Value
572     object: Object
573   result_type: Object
574   folds_to: custom
575   congruent_to: if_operands_equal
576   alias_set: none
578 - name: ToDouble
579   gen_boilerplate: false
581 - name: ToFloat32
582   gen_boilerplate: false
584 # Converts a uint32 to a double (coming from wasm).
585 - name: WasmUnsignedToDouble
586   operands:
587     def: Int32
588   type_policy: none
589   result_type: Double
590   movable: true
591   folds_to: custom
592   congruent_to: if_operands_equal
593   alias_set: none
595 - name: WasmUnsignedToFloat32
596   gen_boilerplate: false
598 - name: WrapInt64ToInt32
599   gen_boilerplate: false
601 - name: ExtendInt32ToInt64
602   gen_boilerplate: false
604 - name: WasmBuiltinTruncateToInt64
605   gen_boilerplate: false
607 - name: WasmTruncateToInt64
608   gen_boilerplate: false
610 - name: WasmTruncateToInt32
611   gen_boilerplate: false
613 - name: WasmAnyRefFromJSValue
614   operands:
615     def: Value
616   result_type: WasmAnyRef
617   congruent_to: if_operands_equal
618   alias_set: none
620 - name: WasmAnyRefFromJSObject
621   operands:
622     def: Object
623   type_policy: none
624   result_type: WasmAnyRef
625   congruent_to: if_operands_equal
626   alias_set: none
628 - name: WasmAnyRefFromJSString
629   operands:
630     def: String
631   type_policy: none
632   result_type: WasmAnyRef
633   congruent_to: if_operands_equal
634   alias_set: none
636 - name: WasmNewI31Ref
637   operands:
638     input: Int32
639   type_policy: none
640   result_type: WasmAnyRef
641   movable: true
642   congruent_to: if_operands_equal
643   alias_set: none
645 - name: WasmI31RefGet
646   operands:
647     input: WasmAnyRef
648   arguments:
649     wideningOp: wasm::FieldWideningOp
650   type_policy: none
651   result_type: Int32
652   movable: true
653   congruent_to: if_operands_equal
654   alias_set: none
656 - name: Int32ToIntPtr
657   gen_boilerplate: false
659 - name: NonNegativeIntPtrToInt32
660   gen_boilerplate: false
662 - name: IntPtrToDouble
663   gen_boilerplate: false
665 - name: AdjustDataViewLength
666   gen_boilerplate: false
668 - name: Int64ToFloatingPoint
669   gen_boilerplate: false
671 - name: BuiltinInt64ToFloatingPoint
672   gen_boilerplate: false
674 - name: ToNumberInt32
675   gen_boilerplate: false
677 - name: BooleanToInt32
678   operands:
679     input: Boolean
680   result_type: Int32
681   movable: true
682   compute_range: custom
683   folds_to: custom
684   congruent_to: if_operands_equal
685   alias_set: none
687 - name: TruncateToInt32
688   gen_boilerplate: false
690 - name: WasmBuiltinTruncateToInt32
691   gen_boilerplate: false
693 - name: ToBigInt
694   gen_boilerplate: false
696 - name: ToInt64
697   gen_boilerplate: false
699 - name: TruncateBigIntToInt64
700   gen_boilerplate: false
702 - name: Int64ToBigInt
703   gen_boilerplate: false
705 - name: ToString
706   gen_boilerplate: false
708 - name: BitNot
709   gen_boilerplate: false
711 - name: TypeOf
712   gen_boilerplate: false
714 - name: TypeOfName
715   operands:
716     input: Int32
717   result_type: String
718   movable: true
719   folds_to: custom
720   congruent_to: if_operands_equal
721   alias_set: none
722   can_recover: true
724 - name: TypeOfIs
725   gen_boilerplate: false
727 - name: ToAsyncIter
728   operands:
729     iterator: Object
730     nextMethod: Value
731   result_type: Object
733 - name: ToPropertyKeyCache
734   operands:
735     input: Value
736   result_type: Value
738 - name: BitAnd
739   gen_boilerplate: false
741 - name: BitOr
742   gen_boilerplate: false
744 - name: BitXor
745   gen_boilerplate: false
747 - name: Lsh
748   gen_boilerplate: false
750 - name: Rsh
751   gen_boilerplate: false
753 - name: Ursh
754   gen_boilerplate: false
756 - name: SignExtendInt32
757   gen_boilerplate: false
759 - name: SignExtendInt64
760   gen_boilerplate: false
762 - name: MinMax
763   gen_boilerplate: false
765 - name: MinMaxArray
766   gen_boilerplate: false
768 - name: Abs
769   gen_boilerplate: false
771 - name: Clz
772   gen_boilerplate: false
774 - name: Ctz
775   gen_boilerplate: false
777 - name: Popcnt
778   gen_boilerplate: false
780 - name: Sqrt
781   gen_boilerplate: false
783 - name: CopySign
784   gen_boilerplate: false
786 # Inline implementation of atan2 (arctangent of y/x).
787 - name: Atan2
788   operands:
789     y: Double
790     x: Double
791   result_type: Double
792   movable: true
793   congruent_to: if_operands_equal
794   alias_set: none
795   possibly_calls: true
796   can_recover: true
797   clone: true
799 - name: Hypot
800   gen_boilerplate: false
802 - name: Pow
803   gen_boilerplate: false
805 - name: PowHalf
806   gen_boilerplate: false
808 - name: Random
809   result_type: Double
810   alias_set: custom
811   possibly_calls: true
812   compute_range: custom
813   can_recover: custom
814   clone: true
816 - name: Sign
817   gen_boilerplate: false
819 - name: MathFunction
820   gen_boilerplate: false
822 - name: Add
823   gen_boilerplate: false
825 - name: Sub
826   gen_boilerplate: false
828 - name: Mul
829   gen_boilerplate: false
831 - name: Div
832   gen_boilerplate: false
834 - name: WasmBuiltinDivI64
835   gen_boilerplate: false
837 - name: Mod
838   gen_boilerplate: false
840 - name: WasmBuiltinModD
841   gen_boilerplate: false
843 - name: WasmBuiltinModI64
844   gen_boilerplate: false
846 - name: BigIntAdd
847   gen_boilerplate: false
849 - name: BigIntSub
850   gen_boilerplate: false
852 - name: BigIntMul
853   gen_boilerplate: false
855 - name: BigIntDiv
856   gen_boilerplate: false
858 - name: BigIntMod
859   gen_boilerplate: false
861 - name: BigIntPow
862   gen_boilerplate: false
864 - name: BigIntBitAnd
865   gen_boilerplate: false
867 - name: BigIntBitOr
868   gen_boilerplate: false
870 - name: BigIntBitXor
871   gen_boilerplate: false
873 - name: BigIntLsh
874   gen_boilerplate: false
876 - name: BigIntRsh
877   gen_boilerplate: false
879 - name: BigIntIncrement
880   gen_boilerplate: false
882 - name: BigIntDecrement
883   gen_boilerplate: false
885 - name: BigIntNegate
886   gen_boilerplate: false
888 - name: BigIntBitNot
889   gen_boilerplate: false
891 - name: Int32ToStringWithBase
892   operands:
893     input: Int32
894     base: Int32
895   arguments:
896     lowerCase: bool
897   result_type: String
898   movable: true
899   congruent_to: custom
900   alias_set: none
902 - name: NumberParseInt
903   operands:
904     string: String
905     radix: Int32
906   result_type: Value
907   movable: true
908   congruent_to: if_operands_equal
909   alias_set: none
910   possibly_calls: true
912 - name: DoubleParseInt
913   operands:
914     number: Double
915   result_type: Int32
916   movable: true
917   congruent_to: if_operands_equal
918   alias_set: none
920 - name: Concat
921   gen_boilerplate: false
923 - name: LinearizeString
924   operands:
925     string: String
926   result_type: String
927   movable: true
928   congruent_to: if_operands_equal
929   # Strings are immutable, so there is no implicit dependency.
930   alias_set: none
932 - name: LinearizeForCharAccess
933   operands:
934     string: String
935     index: Int32
936   result_type: String
937   movable: true
938   congruent_to: if_operands_equal
939   # Strings are immutable, so there is no implicit dependency.
940   alias_set: none
942 - name: LinearizeForCodePointAccess
943   operands:
944     string: String
945     index: Int32
946   result_type: String
947   movable: true
948   congruent_to: if_operands_equal
949   # Strings are immutable, so there is no implicit dependency.
950   alias_set: none
952 - name: ToRelativeStringIndex
953   operands:
954     index: Int32
955     length: Int32
956   result_type: Int32
957   movable: true
958   folds_to: custom
959   congruent_to: if_operands_equal
960   alias_set: none
962 - name: CharCodeAt
963   operands:
964     string: String
965     index: Int32
966   result_type: Int32
967   movable: true
968   folds_to: custom
969   congruent_to: if_operands_equal
970   # Strings are immutable, so there is no implicit dependency.
971   alias_set: none
972   compute_range: custom
973   can_recover: true
974   clone: true
976 # Similar to CharCodeAt, but returns a negative value on out-of-bounds access.
977 - name: CharCodeAtOrNegative
978   operands:
979     string: String
980     index: Int32
981   result_type: Int32
982   movable: true
983   congruent_to: if_operands_equal
984   # Strings are immutable, so there is no implicit dependency.
985   alias_set: none
987 - name: CodePointAt
988   operands:
989     string: String
990     index: Int32
991   result_type: Int32
992   movable: true
993   folds_to: custom
994   congruent_to: if_operands_equal
995   # Strings are immutable, so there is no implicit dependency.
996   alias_set: none
997   compute_range: custom
998   clone: true
1000 # Similar to CodePointAt, but returns a negative value on out-of-bounds access.
1001 - name: CodePointAtOrNegative
1002   operands:
1003     string: String
1004     index: Int32
1005   result_type: Int32
1006   movable: true
1007   congruent_to: if_operands_equal
1008   # Strings are immutable, so there is no implicit dependency.
1009   alias_set: none
1011 # Return the input if non-negative, otherwise return NaN.
1012 - name: NegativeToNaN
1013   operands:
1014     input: Int32
1015   result_type: Value
1016   movable: true
1017   congruent_to: if_operands_equal
1018   alias_set: none
1020 # Return the input if non-negative, otherwise return undefined.
1021 - name: NegativeToUndefined
1022   operands:
1023     input: Int32
1024   result_type: Value
1025   movable: true
1026   congruent_to: if_operands_equal
1027   alias_set: none
1029 - name: FromCharCode
1030   operands:
1031     code: Int32
1032   result_type: String
1033   movable: true
1034   congruent_to: if_operands_equal
1035   alias_set: none
1036   can_recover: true
1037   clone: true
1039 # Similar to FromCharCode, but returns the empty string if the input is negative.
1040 - name: FromCharCodeEmptyIfNegative
1041   operands:
1042     code: Int32
1043   result_type: String
1044   movable: true
1045   congruent_to: if_operands_equal
1046   alias_set: none
1047   can_recover: true
1048   clone: true
1050 # Similar to FromCharCode, but returns the |undefined| if the input is negative.
1051 - name: FromCharCodeUndefinedIfNegative
1052   operands:
1053     code: Int32
1054   result_type: Value
1055   movable: true
1056   congruent_to: if_operands_equal
1057   alias_set: none
1059 - name: FromCodePoint
1060   operands:
1061     codePoint: Int32
1062   result_type: String
1063   guard: true
1064   movable: true
1065   congruent_to: if_operands_equal
1066   alias_set: none
1067   clone: true
1069 - name: StringIncludes
1070   operands:
1071     string: String
1072     searchString: String
1073   result_type: Boolean
1074   movable: true
1075   congruent_to: if_operands_equal
1076   alias_set: none
1077   possibly_calls: true
1079 - name: StringIndexOf
1080   operands:
1081     string: String
1082     searchString: String
1083   result_type: Int32
1084   movable: true
1085   congruent_to: if_operands_equal
1086   alias_set: none
1087   possibly_calls: true
1089 - name: StringLastIndexOf
1090   operands:
1091     string: String
1092     searchString: String
1093   result_type: Int32
1094   movable: true
1095   congruent_to: if_operands_equal
1096   alias_set: none
1097   possibly_calls: true
1099 - name: StringStartsWith
1100   operands:
1101     string: String
1102     searchString: String
1103   result_type: Boolean
1104   movable: true
1105   congruent_to: if_operands_equal
1106   alias_set: none
1107   possibly_calls: true
1109 - name: StringEndsWith
1110   operands:
1111     string: String
1112     searchString: String
1113   result_type: Boolean
1114   movable: true
1115   congruent_to: if_operands_equal
1116   alias_set: none
1117   possibly_calls: true
1119 - name: StringConvertCase
1120   gen_boilerplate: false
1122 - name: CharCodeConvertCase
1123   gen_boilerplate: false
1125 - name: StringTrimStartIndex
1126   operands:
1127     string: String
1128   result_type: Int32
1129   movable: true
1130   congruent_to: if_operands_equal
1131   alias_set: none
1133 - name: StringTrimEndIndex
1134   operands:
1135     string: String
1136     start: Int32
1137   result_type: Int32
1138   movable: true
1139   congruent_to: if_operands_equal
1140   alias_set: none
1142 - name: StringSplit
1143   operands:
1144     string: String
1145     separator: String
1146   result_type: Object
1147   possibly_calls: true
1148   # Although this instruction returns a new array, we don't have to mark
1149   # it as store instruction, see also MNewArray.
1150   alias_set: none
1151   can_recover: true
1153 - name: BoxNonStrictThis
1154   operands:
1155     def: Value
1156   arguments:
1157     globalThis: JSObject*
1158   result_type: Object
1159   folds_to: custom
1160   possibly_calls: true
1161   # This instruction can allocate a new object for wrapped primitives, but
1162   # has no effect on existing objects.
1163   alias_set: none
1165 - name: ImplicitThis
1166   operands:
1167     envChain: Object
1168   arguments:
1169     name: PropertyName*
1170   result_type: Value
1171   possibly_calls: true
1173 - name: Phi
1174   gen_boilerplate: false
1176 - name: Beta
1177   gen_boilerplate: false
1179 - name: NaNToZero
1180   gen_boilerplate: false
1182 - name: OsrValue
1183   gen_boilerplate: false
1185 - name: OsrEnvironmentChain
1186   gen_boilerplate: false
1188 - name: OsrArgumentsObject
1189   gen_boilerplate: false
1191 - name: OsrReturnValue
1192   gen_boilerplate: false
1194 - name: BinaryCache
1195   gen_boilerplate: false
1197 - name: UnaryCache
1198   operands:
1199     input: Value
1200   result_type: Value
1202 # Checks whether we need to fire the interrupt handler.
1203 - name: CheckOverRecursed
1204   guard: true
1205   alias_set: none
1208 # Check whether we need to fire the interrupt handler.
1209 - name: InterruptCheck
1210   guard: true
1211   alias_set: none
1213 - name: WasmInterruptCheck
1214   gen_boilerplate: false
1216 - name: WasmTrap
1217   gen_boilerplate: false
1219 # Trap if the given ref is null
1220 - name: WasmTrapIfNull
1221   operands:
1222     ref: WasmAnyRef
1223   arguments:
1224     trap: wasm::Trap
1225     bytecodeOffset: wasm::BytecodeOffset
1226   guard: true
1227   type_policy: none
1228   result_type: None
1230 - name: LexicalCheck
1231   gen_boilerplate: false
1233 # Unconditionally throw an uninitialized let error.
1234 - name: ThrowRuntimeLexicalError
1235   arguments:
1236     errorNumber: unsigned
1237   result_type: None
1238   guard: true
1239   alias_set: custom
1241 - name: ThrowMsg
1242   gen_boilerplate: false
1244 # In the prologues of global and eval scripts, check for redeclarations and
1245 # initialize bindings.
1246 - name: GlobalDeclInstantiation
1247   guard: true
1249 - name: RegExp
1250   arguments:
1251     source: RegExpObject*
1252     hasShared: bool
1253   result_type: Object
1254   possibly_calls: true
1255   alias_set: none
1257 - name: RegExpMatcher
1258   operands:
1259     regexp: Object
1260     string: String
1261     lastIndex: Int32
1262   result_type: Value
1263   possibly_calls: true
1264   can_recover: true
1266 # Note: this instruction writes to cx->regExpSearcherLastLimit.
1267 # See also MRegExpSearcherLastLimit.
1268 - name: RegExpSearcher
1269   operands:
1270     regexp: Object
1271     string: String
1272     lastIndex: Int32
1273   result_type: Int32
1274   possibly_calls: true
1275   can_recover: false
1277 # This instruction loads cx->regExpSearcherLastLimit. We don't have a
1278 # specialized alias set for this so just use the default alias set similar to
1279 # the MRegExpSearcher instruction that precedes it.
1280 - name: RegExpSearcherLastLimit
1281   operands:
1282   result_type: Int32
1284 - name: RegExpExecMatch
1285   operands:
1286     regexp: Object
1287     string: String
1288   result_type: Value
1289   possibly_calls: true
1290   can_recover: false
1292 - name: RegExpExecTest
1293   operands:
1294     regexp: Object
1295     string: String
1296   result_type: Boolean
1297   possibly_calls: true
1298   can_recover: false
1300 - name: RegExpHasCaptureGroups
1301   operands:
1302     regexp: Object
1303     input: String
1304   result_type: Boolean
1305   possibly_calls: true
1307 - name: RegExpPrototypeOptimizable
1308   operands:
1309     object: Object
1310   result_type: Boolean
1311   alias_set: none
1313 - name: RegExpInstanceOptimizable
1314   operands:
1315     object: Object
1316     proto: Object
1317   result_type: Boolean
1318   alias_set: none
1320 - name: GetFirstDollarIndex
1321   gen_boilerplate: false
1323 - name: StringReplace
1324   gen_boilerplate: false
1326 - name: Substr
1327   operands:
1328     string: String
1329     begin: Int32
1330     length: Int32
1331   result_type: String
1332   folds_to: custom
1333   congruent_to: if_operands_equal
1334   alias_set: none
1335   can_recover: true
1337 - name: ModuleMetadata
1338   arguments:
1339     module: JSObject*
1340   result_type: Object
1342 - name: DynamicImport
1343   operands:
1344     specifier: Value
1345     options: Value
1346   result_type: Object
1348 - name: Lambda
1349   gen_boilerplate: false
1351 - name: FunctionWithProto
1352   gen_boilerplate: false
1354 - name: SetFunName
1355   operands:
1356     fun: Object
1357     name: Value
1358   arguments:
1359     prefixKind: uint8_t
1360   result_type: None
1361   possibly_calls: true
1363 # Returns obj->slots.
1364 - name: Slots
1365   operands:
1366     object: Object
1367   result_type: Slots
1368   movable: true
1369   congruent_to: if_operands_equal
1370   alias_set: custom
1371   might_alias: custom
1372   clone: true
1374 # Returns obj->elements.
1375 - name: Elements
1376   operands:
1377     object: Object
1378   result_type: Elements
1379   movable: true
1380   congruent_to: if_operands_equal
1381   alias_set: custom
1382   clone: true
1384 # Load the initialized length from an elements header.
1385 - name: InitializedLength
1386   operands:
1387     elements: Elements
1388   type_policy: none
1389   result_type: Int32
1390   movable: true
1391   congruent_to: if_operands_equal
1392   alias_set: custom
1393   compute_range: custom
1394   clone: true
1396 - name: SetInitializedLength
1397   operands:
1398     elements: Elements
1399     index: Int32
1400   type_policy: none
1401   alias_set: custom
1402   clone: true
1404 # Load the array length from an elements header.
1405 - name: ArrayLength
1406   operands:
1407     elements: Elements
1408   type_policy: none
1409   result_type: Int32
1410   movable: true
1411   congruent_to: if_operands_equal
1412   folds_to: custom
1413   alias_set: custom
1414   compute_range: custom
1415   clone: true
1417 # Store to the length in an elements header. Note the input is an *index*, one
1418 # less than the desired length.
1419 - name: SetArrayLength
1420   operands:
1421     elements: Elements
1422     index: Int32
1423   type_policy: none
1424   alias_set: custom
1426 # Load the function length. Bails for functions with lazy scripts or a
1427 # resolved "length" property.
1428 - name: FunctionLength
1429   operands:
1430     function: Object
1431   result_type: Int32
1432   guard: true
1433   congruent_to: if_operands_equal
1434   # Even though the "length" property is lazily resolved, it acts similar to
1435   # a normal property load, so we can treat this operation like any other
1436   # property read.
1437   alias_set: custom
1439 # Load the function name. Bails for bound functions when the bound function
1440 # name prefix isn't present or functions with a resolved "name" property.
1441 - name: FunctionName
1442   operands:
1443     function: Object
1444   result_type: String
1445   guard: true
1446   congruent_to: if_operands_equal
1447   # Even though the "name" property is lazily resolved, it acts similar to
1448   # a normal property load, so we can treat this operation like any other
1449   # property read.
1450   alias_set: custom
1452 - name: GetNextEntryForIterator
1453   gen_boilerplate: false
1455 # Read the byte length of an array buffer as IntPtr.
1456 - name: ArrayBufferByteLength
1457   operands:
1458     object: Object
1459   result_type: IntPtr
1460   movable: true
1461   congruent_to: if_operands_equal
1462   alias_set: custom
1464 # Read the length of an array buffer view.
1465 - name: ArrayBufferViewLength
1466   operands:
1467     object: Object
1468   result_type: IntPtr
1469   movable: true
1470   congruent_to: if_operands_equal
1471   alias_set: custom
1472   compute_range: custom
1474 - name: ArrayBufferViewByteOffset
1475   operands:
1476     object: Object
1477   result_type: IntPtr
1478   movable: true
1479   congruent_to: if_operands_equal
1480   alias_set: custom
1481   compute_range: custom
1483 # Read the length of an array buffer view.
1484 - name: ArrayBufferViewElements
1485   operands:
1486     object: Object
1487   result_type: Elements
1488   movable: true
1489   congruent_to: if_operands_equal
1490   alias_set: custom
1491   clone: true
1493 # Implements the TypedArrayByteOffset intrinsic for resizable typed arrays,
1494 # which calls TypedArrayObject::byteOffsetMaybeOutOfBounds().
1495 - name: ResizableTypedArrayByteOffsetMaybeOutOfBounds
1496   operands:
1497     object: Object
1498   result_type: IntPtr
1499   movable: true
1500   congruent_to: if_operands_equal
1501   alias_set: custom
1502   compute_range: custom
1504 # Read the length of a resizable typed array.
1505 - name: ResizableTypedArrayLength
1506   operands:
1507     object: Object
1508   arguments:
1509     requiresMemoryBarrier: MemoryBarrierRequirement
1510   result_type: IntPtr
1511   # Not removable or movable when a barrier is needed.
1512   guard: true
1513   movable: false
1514   congruent_to: custom
1515   alias_set: custom
1516   compute_range: custom
1518 # Read the byteLength of a resizable dataview.
1519 - name: ResizableDataViewByteLength
1520   operands:
1521     object: Object
1522   arguments:
1523     requiresMemoryBarrier: MemoryBarrierRequirement
1524   result_type: IntPtr
1525   # Not removable or movable when a barrier is needed.
1526   guard: true
1527   movable: false
1528   congruent_to: custom
1529   alias_set: custom
1530   compute_range: custom
1532 # Read the byte length of a growable shared array buffer as IntPtr.
1533 - name: GrowableSharedArrayBufferByteLength
1534   operands:
1535     object: Object
1536   result_type: IntPtr
1537   guard: true
1538   movable: false
1539   alias_set: custom
1541 # Return the element size of a typed array.
1542 - name: TypedArrayElementSize
1543   operands:
1544     object: Object
1545   result_type: Int32
1546   movable: true
1547   congruent_to: if_operands_equal
1548   # Class is immutable. See also MHasClass.
1549   alias_set: none
1550   compute_range: custom
1552 # Guard an ArrayBufferView has an attached ArrayBuffer.
1553 - name: GuardHasAttachedArrayBuffer
1554   operands:
1555     object: Object
1556   result_type: Object
1557   guard: true
1558   movable: true
1559   congruent_to: if_operands_equal
1560   alias_set: custom
1562 # Guard a resizable typed array is in-bounds.
1563 - name: GuardResizableArrayBufferViewInBounds
1564   operands:
1565     object: Object
1566   result_type: Object
1567   guard: true
1568   movable: true
1569   congruent_to: if_operands_equal
1570   alias_set: custom
1572 # Guard a resizable typed array is in-bounds or detached.
1573 - name: GuardResizableArrayBufferViewInBoundsOrDetached
1574   operands:
1575     object: Object
1576   result_type: Object
1577   guard: true
1578   movable: true
1579   congruent_to: if_operands_equal
1580   alias_set: custom
1582 - name: GuardNumberToIntPtrIndex
1583   gen_boilerplate: false
1585 - name: KeepAliveObject
1586   operands:
1587     object: Object
1588   result_type: None
1589   guard: true
1591 - name: DebugEnterGCUnsafeRegion
1592   result_type: None
1593   guard: true
1594   alias_set: none
1596 - name: DebugLeaveGCUnsafeRegion
1597   result_type: None
1598   guard: true
1599   alias_set: none
1601 - name: Not
1602   gen_boilerplate: false
1604 - name: BoundsCheck
1605   gen_boilerplate: false
1607 - name: BoundsCheckLower
1608   gen_boilerplate: false
1610 - name: SpectreMaskIndex
1611   gen_boilerplate: false
1613 - name: LoadElement
1614   gen_boilerplate: false
1616 - name: LoadElementAndUnbox
1617   gen_boilerplate: false
1619 - name: LoadElementHole
1620   gen_boilerplate: false
1622 - name: StoreElement
1623   gen_boilerplate: false
1625 - name: StoreHoleValueElement
1626   gen_boilerplate: false
1628 - name: StoreElementHole
1629   gen_boilerplate: false
1631 - name: ArrayPopShift
1632   gen_boilerplate: false
1634 # Array.prototype.push on a dense array. Returns the new array length.
1635 - name: ArrayPush
1636   operands:
1637     object: Object
1638     value: Value
1639   result_type: Int32
1640   alias_set: custom
1641   compute_range: custom
1642   clone: true
1644 # Array.prototype.slice on a dense array.
1645 - name: ArraySlice
1646   operands:
1647     object: Object
1648     begin: Int32
1649     end: Int32
1650   arguments:
1651     templateObj: JSObject*
1652     initialHeap: gc::Heap
1653   result_type: Object
1654   possibly_calls: true
1656 # Array.prototype.slice on an arguments object.
1657 - name: ArgumentsSlice
1658   operands:
1659     object: Object
1660     begin: Int32
1661     end: Int32
1662   arguments:
1663     templateObj: JSObject*
1664     initialHeap: gc::Heap
1665   result_type: Object
1666   possibly_calls: true
1668 # Array.prototype.slice on an arguments object.
1669 - name: FrameArgumentsSlice
1670   operands:
1671     begin: Int32
1672     count: Int32
1673   arguments:
1674     templateObj: JSObject*
1675     initialHeap: gc::Heap
1676   result_type: Object
1677   alias_set: none
1678   possibly_calls: true
1680 # Array.prototype.slice on an inlined arguments object.
1681 - name: InlineArgumentsSlice
1682   gen_boilerplate: false
1684 - name: NormalizeSliceTerm
1685   operands:
1686     value: Int32
1687     length: Int32
1688   result_type: Int32
1689   movable: true
1690   congruent_to: if_operands_equal
1691   alias_set: none
1692   folds_to: custom
1694 # MArrayJoin doesn't override |getAliasSet()|, because Array.prototype.join
1695 # might coerce the elements of the Array to strings. This coercion might
1696 # cause the evaluation of JavaScript code.
1697 - name: ArrayJoin
1698   operands:
1699     array: Object
1700     sep: String
1701   result_type: String
1702   possibly_calls: true
1703   folds_to: custom
1704   # MArrayJoin doesn't override |getAliasSet()|, because Array.prototype.join
1705   # might coerce the elements of the Array to strings. This coercion might
1706   # cause the evaluation of JavaScript code.
1708 # Object.prototype.keys. Used to elide it when possible.
1709 - name: ObjectKeys
1710   operands:
1711     object: Object
1712   result_type: Object
1714   # We can recover Object.keys on bailout as long as the object is not escaped
1715   # or that the object is not mutated by any aliased calls in-between the
1716   # instruction and the recovered location, as the recovered keys array might be
1717   # different.
1718   can_recover: custom
1720 # Used to fold Object.keys(obj).length into a single operation.
1722 # This should not be used with a Proxy, as proxies can have a user-defined
1723 # `ownKeys` function which can have arbitrary outputs.
1725 # This MIR node is created by folding an MObjectKeys with an MArrayLength, as
1726 # part of MArrayLength::foldsTo.
1727 - name: ObjectKeysLength
1728   operands:
1729     object: Object
1730   result_type: Int32
1731   movable: false
1732   congruent_to: if_operands_equal
1733   alias_set: custom
1734   clone: true
1736 - name: LoadUnboxedScalar
1737   gen_boilerplate: false
1739 - name: LoadDataViewElement
1740   gen_boilerplate: false
1742 - name: LoadTypedArrayElementHole
1743   gen_boilerplate: false
1745 - name: StoreUnboxedScalar
1746   gen_boilerplate: false
1748 - name: StoreDataViewElement
1749   gen_boilerplate: false
1751 - name: StoreTypedArrayElementHole
1752   gen_boilerplate: false
1754 - name: EffectiveAddress
1755   gen_boilerplate: false
1757 - name: ClampToUint8
1758   gen_boilerplate: false
1760 - name: LoadFixedSlot
1761   gen_boilerplate: false
1763 - name: LoadFixedSlotAndUnbox
1764   gen_boilerplate: false
1766 - name: LoadDynamicSlotAndUnbox
1767   gen_boilerplate: false
1769 - name: StoreFixedSlot
1770   gen_boilerplate: false
1772 - name: GetPropertyCache
1773   gen_boilerplate: false
1775 - name: HomeObjectSuperBase
1776   operands:
1777     homeObject: Object
1778   result_type: Value
1779   movable: true
1780   congruent_to: if_operands_equal
1781   alias_set: custom
1783 - name: GetPropSuperCache
1784   gen_boilerplate: false
1786 - name: BindNameCache
1787   operands:
1788     envChain: Object
1789   result_type: Object
1791 - name: CallBindVar
1792   operands:
1793     environmentChain: Object
1794   result_type: Object
1795   movable: true
1796   congruent_to: custom
1797   alias_set: none
1799 - name: GuardShape
1800   operands:
1801     object: Object
1802   arguments:
1803     shape: Shape*
1804   result_type: Object
1805   guard: true
1806   movable: true
1807   congruent_to: custom
1808   alias_set: custom
1809   might_alias: custom
1811 - name: GuardFuse
1812   arguments:
1813     fuseIndex: RealmFuses::FuseIndex
1814   result_type: None
1815   guard: true
1816   movable: true
1817   congruent_to: custom
1818   alias_set: custom
1820 - name: GuardMultipleShapes
1821   operands:
1822     object: Object
1823     shapeList: Object
1824   result_type: Object
1825   guard: true
1826   movable: true
1827   congruent_to: if_operands_equal
1828   alias_set: custom
1830 - name: GuardProto
1831   gen_boilerplate: false
1833 - name: GuardNullProto
1834   gen_boilerplate: false
1836 # Guard the object is a native object.
1837 - name: GuardIsNativeObject
1838   operands:
1839     object: Object
1840   result_type: Object
1841   guard: true
1842   movable: true
1843   congruent_to: if_operands_equal
1844   alias_set: none
1846 - name: GuardGlobalGeneration
1847   arguments:
1848    expected: uint32_t
1849    generationAddr: const void*
1850   result_type: None
1851   guard: true
1852   movable: true
1853   alias_set: custom
1854   congruent_to: custom
1856 - name: GuardIsProxy
1857   operands:
1858     object: Object
1859   result_type: Object
1860   guard: true
1861   movable: true
1862   congruent_to: if_operands_equal
1863   alias_set: none
1865 - name: GuardIsNotDOMProxy
1866   operands:
1867     proxy: Object
1868   result_type: Object
1869   guard: true
1870   movable: true
1871   congruent_to: if_operands_equal
1872   alias_set: none
1874 - name: GuardIsNotProxy
1875   operands:
1876     object: Object
1877   result_type: Object
1878   guard: true
1879   movable: true
1880   congruent_to: if_operands_equal
1881   folds_to: custom
1882   alias_set: none
1884 - name: ProxyGet
1885   operands:
1886     proxy: Object
1887   arguments:
1888     id: jsid
1889   result_type: Value
1890   possibly_calls: true
1892 - name: ProxyGetByValue
1893   operands:
1894     proxy: Object
1895     idVal: Value
1896   result_type: Value
1897   possibly_calls: true
1899 - name: ProxyHasProp
1900   operands:
1901     proxy: Object
1902     idVal: Value
1903   arguments:
1904     hasOwn: bool
1905   result_type: Boolean
1906   possibly_calls: true
1908 - name: ProxySet
1909   operands:
1910     proxy: Object
1911     rhs: Value
1912   arguments:
1913     id: jsid
1914     strict: bool
1915   possibly_calls: true
1917 - name: ProxySetByValue
1918   operands:
1919     proxy: Object
1920     idVal: Value
1921     rhs: Value
1922   arguments:
1923     strict: bool
1924   possibly_calls: true
1926 - name: CallSetArrayLength
1927   operands:
1928     obj: Object
1929     rhs: Value
1930   arguments:
1931     strict: bool
1932   possibly_calls: true
1934 - name: MegamorphicLoadSlot
1935   operands:
1936     object: Object
1937   arguments:
1938     name: PropertyKey
1939   result_type: Value
1940   # Bails when non-native or accessor properties are encountered, so we can't
1941   # DCE this instruction.
1942   guard: true
1943   possibly_calls: true
1944   congruent_to: custom
1945   alias_set: custom
1947 - name: MegamorphicLoadSlotByValue
1948   operands:
1949     object: Object
1950     idVal: Value
1951   result_type: Value
1952   # Bails when non-native or accessor properties are encountered, so we can't
1953   # DCE this instruction.
1954   guard: true
1955   folds_to: custom
1956   congruent_to: if_operands_equal
1957   alias_set: custom
1958   possibly_calls: true
1960 - name: MegamorphicStoreSlot
1961   operands:
1962     object: Object
1963     rhs: Value
1964   arguments:
1965     name: PropertyKey
1966     strict: bool
1967   possibly_calls: true
1969 - name: MegamorphicHasProp
1970   operands:
1971     object: Object
1972     idVal: Value
1973   arguments:
1974     hasOwn: bool
1975   result_type: Boolean
1976   # Bails when non-native or accessor properties are encountered, so we can't
1977   # DCE this instruction.
1978   guard: true
1979   congruent_to: custom
1980   alias_set: custom
1981   possibly_calls: true
1983 - name: SmallObjectVariableKeyHasProp
1984   operands:
1985     idStr: String
1986   arguments:
1987     shape: Shape*
1988   congruent_to: custom
1989   result_type: Boolean
1990   alias_set: custom
1992 - name: GuardIsNotArrayBufferMaybeShared
1993   operands:
1994     object: Object
1995   result_type: Object
1996   guard: true
1997   movable: true
1998   congruent_to: if_operands_equal
1999   folds_to: custom
2000   alias_set: none
2002 - name: GuardIsTypedArray
2003   operands:
2004     object: Object
2005   result_type: Object
2006   guard: true
2007   movable: true
2008   congruent_to: if_operands_equal
2009   alias_set: none
2011 - name: GuardIsFixedLengthTypedArray
2012   operands:
2013     object: Object
2014   result_type: Object
2015   guard: true
2016   movable: true
2017   congruent_to: if_operands_equal
2018   alias_set: none
2020 - name: GuardIsResizableTypedArray
2021   operands:
2022     object: Object
2023   result_type: Object
2024   guard: true
2025   movable: true
2026   congruent_to: if_operands_equal
2027   alias_set: none
2029 - name: GuardHasProxyHandler
2030   operands:
2031     object: Object
2032   arguments:
2033     handler: const void*
2034   result_type: Object
2035   guard: true
2036   movable: true
2037   congruent_to: if_operands_equal
2038   alias_set: none
2040 # Loads a specific JSObject* that was originally nursery-allocated.
2041 # See also WarpObjectField.
2042 - name: NurseryObject
2043   arguments:
2044     # Index in the Vector of objects stored in the WarpSnapshot.
2045     nurseryIndex: uint32_t
2046   result_type: Object
2047   movable: true
2048   congruent_to: custom
2049   alias_set: none
2051 - name: GuardValue
2052   gen_boilerplate: false
2054 - name: GuardNullOrUndefined
2055   operands:
2056     value: Value
2057   result_type: Value
2058   guard: true
2059   movable: true
2060   congruent_to: if_operands_equal
2061   folds_to: custom
2062   alias_set: none
2064 - name: GuardIsNotObject
2065   operands:
2066     value: Value
2067   result_type: Value
2068   guard: true
2069   movable: true
2070   congruent_to: if_operands_equal
2071   folds_to: custom
2072   alias_set: none
2074 - name: GuardFunctionFlags
2075   gen_boilerplate: false
2077 - name: GuardFunctionIsNonBuiltinCtor
2078   operands:
2079     function: Object
2080   result_type: Object
2081   guard: true
2082   movable: true
2083   congruent_to: if_operands_equal
2084   alias_set: custom
2086 - name: GuardFunctionKind
2087   operands:
2088     function: Object
2089   arguments:
2090     expected: FunctionFlags::FunctionKind
2091     bailOnEquality: bool
2092   result_type: Object
2093   guard: true
2094   movable: true
2095   congruent_to: custom
2096   alias_set: custom
2098 - name: GuardFunctionScript
2099   operands:
2100     function: Object
2101   arguments:
2102     expected: BaseScript*
2103     nargs: uint16_t
2104     flags: FunctionFlags
2105   result_type: Object
2106   guard: true
2107   movable: true
2108   folds_to: custom
2109   congruent_to: custom
2110   # A JSFunction's BaseScript pointer is immutable. Relazification of
2111   # self-hosted functions is an exception to this, but we don't use this
2112   # guard for self-hosted functions.
2113   alias_set: custom
2115 - name: GuardObjectIdentity
2116   gen_boilerplate: false
2118 - name: GuardSpecificFunction
2119   gen_boilerplate: false
2121 - name: GuardSpecificAtom
2122   operands:
2123     str: String
2124   arguments:
2125     atom: JSAtom*
2126   result_type: String
2127   guard: true
2128   movable: true
2129   congruent_to: custom
2130   folds_to: custom
2131   alias_set: none
2133 - name: GuardSpecificSymbol
2134   gen_boilerplate: false
2136 - name: GuardSpecificInt32
2137   operands:
2138     num: Int32
2139   arguments:
2140     expected: int32_t
2141   result_type: Int32
2142   guard: true
2143   movable: true
2144   folds_to: custom
2145   alias_set: none
2147 - name: GuardStringToIndex
2148   operands:
2149     string: String
2150   result_type: Int32
2151   # Mark as guard because this instruction must not be eliminated. For
2152   # example, if the string is not an index the operation could change from a
2153   # typed array load to a getter call.
2154   guard: true
2155   movable: true
2156   congruent_to: if_operands_equal
2157   folds_to: custom
2158   alias_set: none
2160 - name: GuardStringToInt32
2161   operands:
2162     string: String
2163   result_type: Int32
2164   # Mark as guard to prevent the issue described in MGuardStringToIndex's
2165   # constructor.
2166   guard: true
2167   movable: true
2168   congruent_to: if_operands_equal
2169   folds_to: custom
2170   alias_set: none
2172 - name: GuardStringToDouble
2173   operands:
2174     string: String
2175   result_type: Double
2176   # Mark as guard to prevent the issue described in MGuardStringToIndex's
2177   # constructor.
2178   guard: true
2179   movable: true
2180   congruent_to: if_operands_equal
2181   folds_to: custom
2182   alias_set: none
2184 - name: GuardNoDenseElements
2185   operands:
2186     object: Object
2187   result_type: Object
2188   guard: true
2189   movable: true
2190   alias_set: custom
2192 - name: GuardTagNotEqual
2193   gen_boilerplate: false
2195 - name: LoadDynamicSlot
2196   gen_boilerplate: false
2198 # Inline call to access a function's environment (scope chain).
2199 - name: FunctionEnvironment
2200   operands:
2201     function: Object
2202   result_type: Object
2203   movable: true
2204   folds_to: custom
2205   # A function's environment is fixed.
2206   alias_set: none
2208 # Allocate a new BlockLexicalEnvironmentObject.
2209 - name: NewLexicalEnvironmentObject
2210   operands:
2211     templateObj: Object
2212   result_type: Object
2213   alias_set: none
2215 # Allocate a new ClassBodyEnvironmentObject.
2216 - name: NewClassBodyEnvironmentObject
2217   operands:
2218     templateObj: Object
2219   result_type: Object
2220   alias_set: none
2222 - name: NewVarEnvironmentObject
2223   operands:
2224     templateObj: Object
2225   result_type: Object
2226   alias_set: none
2228 - name: HomeObject
2229   operands:
2230     function: Object
2231   result_type: Object
2232   movable: true
2233   # A function's [[HomeObject]] is fixed.
2234   alias_set: none
2236 - name: AddAndStoreSlot
2237   gen_boilerplate: false
2239 - name: AllocateAndStoreSlot
2240   operands:
2241     object: Object
2242     value: Value
2243   arguments:
2244     slotOffset: uint32_t
2245     shape: Shape*
2246     numNewSlots: uint32_t
2247   possibly_calls: true
2248   alias_set: custom
2250 - name: AddSlotAndCallAddPropHook
2251   operands:
2252     object: Object
2253     value: Value
2254   arguments:
2255     shape: Shape*
2256   possibly_calls: true
2258 - name: StoreDynamicSlot
2259   gen_boilerplate: false
2261 - name: GetNameCache
2262   operands:
2263     envObj: Object
2264   result_type: Value
2266 - name: CallGetIntrinsicValue
2267   arguments:
2268     name: PropertyName*
2269   result_type: Value
2270   possibly_calls: true
2272 - name: DeleteProperty
2273   operands:
2274     value: Value
2275   arguments:
2276     name: PropertyName*
2277     strict: bool
2278   result_type: Boolean
2280 - name: DeleteElement
2281   operands:
2282     value: Value
2283     index: Value
2284   arguments:
2285     strict: bool
2286   result_type: Boolean
2288 - name: SetPropertyCache
2289   gen_boilerplate: false
2291 - name: MegamorphicSetElement
2292   gen_boilerplate: false
2294 - name: SetDOMProperty
2295   gen_boilerplate: false
2297 - name: GetDOMProperty
2298   gen_boilerplate: false
2300 - name: GetDOMMember
2301   gen_boilerplate: false
2303 - name: ObjectToIterator
2304   gen_boilerplate: false
2306 - name: ValueToIterator
2307   operands:
2308     value: Value
2309   result_type: Object
2311 - name: IteratorHasIndices
2312   operands:
2313     object: Object
2314     iterator: Object
2315   result_type: Boolean
2316   alias_set: custom
2318 - name: LoadSlotByIteratorIndex
2319   operands:
2320     object: Object
2321     iterator: Object # TODO: add MIRType::NativeIterator?
2322   result_type: Value
2323   alias_set: custom
2325 - name: StoreSlotByIteratorIndex
2326   operands:
2327     object: Object
2328     iterator: Object
2329     value: Value
2330   alias_set: custom
2332 # Load the private value expando from a DOM proxy. The target is stored in the
2333 # proxy object's private slot.
2334 # This is either an UndefinedValue (no expando), ObjectValue (the expando
2335 # object), or PrivateValue(ExpandoAndGeneration*).
2336 - name: LoadDOMExpandoValue
2337   operands:
2338     proxy: Object
2339   result_type: Value
2340   movable: true
2341   congruent_to: if_operands_equal
2342   alias_set: custom
2344 - name: LoadDOMExpandoValueGuardGeneration
2345   gen_boilerplate: false
2347 - name: LoadDOMExpandoValueIgnoreGeneration
2348   operands:
2349     proxy: Object
2350   result_type: Value
2351   movable: true
2352   congruent_to: if_operands_equal
2353   alias_set: custom
2355 # Takes an expando Value as input, then guards it's either UndefinedValue or
2356 # an object with the expected shape.
2357 - name: GuardDOMExpandoMissingOrGuardShape
2358   operands:
2359     expando: Value
2360   arguments:
2361     shape: Shape*
2362   result_type: Value
2363   guard: true
2364   movable: true
2365   congruent_to: custom
2366   alias_set: custom
2368 - name: StringLength
2369   operands:
2370     string: String
2371   result_type: Int32
2372   movable: true
2373   folds_to: custom
2374   congruent_to: if_operands_equal
2375   # The string |length| property is immutable, so there is no
2376   # implicit dependency.
2377   alias_set: none
2378   compute_range: custom
2379   can_recover: true
2380   clone: true
2382 - name: Floor
2383   gen_boilerplate: false
2385 - name: Ceil
2386   gen_boilerplate: false
2388 - name: Round
2389   gen_boilerplate: false
2391 - name: Trunc
2392   gen_boilerplate: false
2394 - name: NearbyInt
2395   gen_boilerplate: false
2397 - name: GetIteratorCache
2398   gen_boilerplate: false
2400 - name: OptimizeSpreadCallCache
2401   operands:
2402     value: Value
2403   result_type: Value
2405 - name: IteratorMore
2406   operands:
2407     iterator: Object
2408   result_type: Value
2410 - name: IsNoIter
2411   operands:
2412     def: Object
2413   result_type: Boolean
2414   type_policy: none
2415   movable : true
2416   alias_set: none
2418 - name: IteratorEnd
2419   operands:
2420     iterator: Object
2422 - name: CloseIterCache
2423   operands:
2424     iter: Object
2425   arguments:
2426     completionKind: uint8_t
2427   possibly_calls: true
2429 - name: OptimizeGetIteratorCache
2430   operands:
2431     value: Value
2432   result_type: Boolean
2434 - name: InCache
2435   gen_boilerplate: false
2437 - name: InArray
2438   gen_boilerplate: false
2440 - name: GuardElementNotHole
2441   gen_boilerplate: false
2443 - name: NewPrivateName
2444   arguments:
2445     name: JSAtom*
2446   result_type: Symbol
2447   possibly_calls: true
2449 - name: CheckPrivateFieldCache
2450   gen_boilerplate: false
2452 - name: HasOwnCache
2453   gen_boilerplate: false
2455 - name: InstanceOf
2456   gen_boilerplate: false
2458 # Implementation for instanceof operator with unknown rhs.
2459 - name: InstanceOfCache
2460   operands:
2461     obj: Value
2462     proto: Object
2463   result_type: Boolean
2465 - name: ArgumentsLength
2466   result_type: Int32
2467   movable: true
2468   congruent_to: if_operands_equal
2469   # Arguments |length| cannot be mutated by Ion Code.
2470   alias_set: none
2471   compute_range: custom
2472   can_recover: true
2474 # This MIR instruction is used to get an argument from the actual arguments.
2475 - name: GetFrameArgument
2476   operands:
2477     index: Int32
2478   result_type: Value
2479   movable: true
2480   congruent_to: if_operands_equal
2481   # This instruction is never aliased, because ops like JSOp::SetArg don't
2482   # write to the argument frames. We create an arguments object in that case.
2483   alias_set: none
2485 # This MIR instruction is used to get an argument from the actual arguments.
2486 # Returns undefined if |index| is larger-or-equals to |length|. Bails out if
2487 # |index| is negative.
2488 - name: GetFrameArgumentHole
2489   operands:
2490     index: Int32
2491     length: Int32
2492   result_type: Value
2493   guard: true
2494   movable: true
2495   congruent_to: if_operands_equal
2496   # This instruction is never aliased, because ops like JSOp::SetArg don't
2497   # write to the argument frames. We create an arguments object in that case.
2498   alias_set: none
2500 - name: NewTarget
2501   result_type: Value
2502   movable: true
2503   congruent_to: if_operands_equal
2504   alias_set: none
2506 - name: Rest
2507   operands:
2508     numActuals: Int32
2509   arguments:
2510     numFormals: unsigned
2511     shape: Shape*
2512   result_type: Object
2513   possibly_calls: true
2514   alias_set: none
2515   can_recover: true
2517 - name: PostWriteBarrier
2518   gen_boilerplate: false
2520 - name: PostWriteElementBarrier
2521   gen_boilerplate: false
2523 - name: AssertCanElidePostWriteBarrier
2524   operands:
2525     object: Object
2526     value: Value
2527   result_type: None
2528   guard: true
2529   alias_set: none
2531 - name: NewNamedLambdaObject
2532   arguments:
2533     templateObj: NamedLambdaObject*
2534   result_type: Object
2535   alias_set: none
2537 - name: NewCallObject
2538   gen_boilerplate: false
2540 - name: NewStringObject
2541   gen_boilerplate: false
2543 - name: IsCallable
2544   gen_boilerplate: false
2546 - name: IsConstructor
2547   operands:
2548     object: Object
2549   result_type: Boolean
2550   movable: true
2551   congruent_to: if_operands_equal
2552   alias_set: none
2554 - name: IsCrossRealmArrayConstructor
2555   operands:
2556     object: Object
2557   result_type: Boolean
2558   movable: true
2559   congruent_to: if_operands_equal
2560   alias_set: none
2562 - name: IsObject
2563   operands:
2564     object: Value
2565   result_type: Boolean
2566   movable: true
2567   folds_to: custom
2568   congruent_to: if_operands_equal
2569   alias_set: none
2571 - name: IsNullOrUndefined
2572   operands:
2573     value: Value
2574   result_type: Boolean
2575   movable: true
2576   folds_to: custom
2577   congruent_to: if_operands_equal
2578   alias_set: none
2579   type_policy: none
2580   can_consume_float32: true
2582 - name: HasClass
2583   gen_boilerplate: false
2585 - name: GuardToClass
2586   gen_boilerplate: false
2588 - name: GuardToEitherClass
2589   gen_boilerplate: false
2591 - name: GuardToFunction
2592   gen_boilerplate: false
2594 - name: IsArray
2595   gen_boilerplate: false
2597 - name: IsTypedArray
2598   gen_boilerplate: false
2600 - name: ObjectClassToString
2601   operands:
2602     object: Object
2603   result_type: String
2604   guard: true
2605   movable: true
2606   congruent_to: if_operands_equal
2607   possibly_calls: true
2608   # Tests @@toStringTag is neither present on this object nor on any object
2609   # of the prototype chain.
2610   alias_set: custom
2612 - name: CheckReturn
2613   operands:
2614     returnValue: Value
2615     thisValue: Value
2616   result_type: Value
2617   guard: true
2618   folds_to: custom
2619   alias_set: custom
2621 - name: CheckThis
2622   operands:
2623     thisValue: Value
2624   result_type: Value
2625   guard: true
2626   folds_to: custom
2627   alias_set: custom
2629 - name: AsyncResolve
2630   operands:
2631     generator: Object
2632     value: Value
2633   result_type: Object
2635 - name: AsyncReject
2636   operands:
2637     generator: Object
2638     reason: Value
2639     stack: Value
2640   result_type: Object
2642 # Returns from this function to the previous caller; this looks like a regular
2643 # Unary instruction and is used to lie to the MIR generator about suspending
2644 # ops like Yield/Await, which are emitted like returns, but MIR-Build like
2645 # regular instructions.
2646 - name: GeneratorReturn
2647   operands:
2648     input: Value
2649   guard: true
2650   alias_set: none
2652 - name: AsyncAwait
2653   operands:
2654     value: Value
2655     generator: Object
2656   result_type: Object
2658 - name: CheckThisReinit
2659   operands:
2660     thisValue: Value
2661   result_type: Value
2662   guard: true
2663   folds_to: custom
2664   alias_set: custom
2666 - name: Generator
2667   gen_boilerplate: false
2669 - name: CanSkipAwait
2670   operands:
2671     value: Value
2672   result_type: Boolean
2674 - name: MaybeExtractAwaitValue
2675   gen_boilerplate: false
2677 - name: IncrementWarmUpCounter
2678   arguments:
2679     script: JSScript*
2680   alias_set: none
2682 - name: AtomicIsLockFree
2683   gen_boilerplate: false
2685 - name: CompareExchangeTypedArrayElement
2686   gen_boilerplate: false
2688 - name: AtomicExchangeTypedArrayElement
2689   gen_boilerplate: false
2691 - name: AtomicTypedArrayElementBinop
2692   gen_boilerplate: false
2694 - name: Debugger
2695   gen_boilerplate: false
2697 - name: CheckIsObj
2698   operands:
2699     value: Value
2700   arguments:
2701     checkKind: uint8_t
2702   result_type: Object
2703   guard: true
2704   folds_to: custom
2705   alias_set: custom
2707 - name: CheckObjCoercible
2708   operands:
2709     checkValue: Value
2710   result_type: Value
2711   guard: true
2712   folds_to: custom
2713   # Throws on null or undefined.
2714   alias_set: custom
2716 - name: CheckClassHeritage
2717   operands:
2718     heritage: Value
2719   result_type: Value
2720   guard: true
2722 - name: DebugCheckSelfHosted
2723   operands:
2724     checkValue: Value
2725   result_type: Value
2726   guard: true
2728 - name: IsPackedArray
2729   operands:
2730     object: Object
2731   result_type: Boolean
2732   movable: true
2733   alias_set: custom
2735 - name: GuardArrayIsPacked
2736   operands:
2737     array: Object
2738   result_type: Object
2739   guard: true
2740   movable: true
2741   congruent_to: if_operands_equal
2742   alias_set: custom
2744 - name: GetPrototypeOf
2745   operands:
2746     target: Object
2747   result_type: Value
2748   # May throw if target is a proxy.
2749   guard: true
2751 - name: ObjectWithProto
2752   operands:
2753     prototype: Value
2754   result_type: Object
2755   # May throw if prototype is neither an object nor null.
2756   guard: true
2757   possibly_calls: true
2759 - name: ObjectStaticProto
2760   gen_boilerplate: false
2762 # This is basically just a limited case of Constant, for objects which are
2763 # the prototype of another object and will be used for a GuardShape. It
2764 # includes a reference to the receiver object so we can eliminate redundant
2765 # shape guards.
2766 - name: ConstantProto
2767   gen_boilerplate: false
2769 - name: BuiltinObject
2770   arguments:
2771     builtinObjectKind: BuiltinObjectKind
2772   result_type: Object
2773   possibly_calls: true
2775 - name: SuperFunction
2776   operands:
2777     callee: Object
2778   result_type: Value
2779   movable: true
2780   congruent_to: if_operands_equal
2781   alias_set: custom
2783 - name: InitHomeObject
2784   operands:
2785     function: Object
2786     homeObject: Value
2787   result_type: Object
2788   alias_set: custom
2790 # Return true if the object is definitely a TypedArray constructor, but not
2791 # necessarily from the currently active realm. Return false if the object is
2792 # not a TypedArray constructor or if it's a wrapper.
2793 - name: IsTypedArrayConstructor
2794   operands:
2795     object: Object
2796   result_type: Boolean
2797   alias_set: none
2799 # Load the JSValueTag on all platforms except ARM64. See the comments in
2800 # MacroAssembler-arm64.h for the |cmpTag(Register, ImmTag)| method for why
2801 # ARM64 doesn't use the raw JSValueTag, but instead a modified tag value. That
2802 # modified tag value can't be directly compared against JSValueTag constants.
2803 - name: LoadValueTag
2804   operands:
2805     value: Value
2806   result_type: Int32
2807   movable: true
2808   congruent_to: if_operands_equal
2809   alias_set: none
2811 # Load the target object from a proxy wrapper. The target is stored in the
2812 # proxy object's private slot. This operation is fallible if the proxy can
2813 # be revoked.
2814 - name: LoadWrapperTarget
2815   operands:
2816     object: Object
2817   arguments:
2818     fallible: bool
2819   result_type: Object
2820   movable: true
2821   congruent_to: custom
2822   # Can't use |AliasSet::None| because the target changes on navigation.
2823   # TODO: Investigate using a narrower or a custom alias set.
2824   alias_set: custom
2826 # Guard the accessor shape is present on the object or its prototype chain.
2827 - name: GuardHasGetterSetter
2828   operands:
2829     object: Object
2830   arguments:
2831     propId: jsid
2832     getterSetter: GetterSetter*
2833   result_type: Object
2834   guard: true
2835   movable: true
2836   possibly_calls: true
2837   congruent_to: custom
2838   alias_set: custom
2840 - name: GuardIsExtensible
2841   operands:
2842     object: Object
2843   result_type: Object
2844   guard: true
2845   movable: true
2846   congruent_to: if_operands_equal
2847   alias_set: custom
2849 - name: GuardInt32IsNonNegative
2850   operands:
2851     index: Int32
2852   result_type: Int32
2853   guard: true
2854   movable: true
2855   congruent_to: if_operands_equal
2856   folds_to: custom
2857   alias_set: none
2859 - name: GuardInt32Range
2860   operands:
2861     input: Int32
2862   arguments:
2863     minimum: int32_t
2864     maximum: int32_t
2865   result_type: Int32
2866   guard: true
2867   movable: true
2868   congruent_to: if_operands_equal
2869   folds_to: custom
2870   alias_set: none
2872 # Guard the input index is either greater than the dense initialized length of
2873 # an object, or a hole element.
2874 - name: GuardIndexIsNotDenseElement
2875   operands:
2876     object: Object
2877     index: Int32
2878   result_type: Int32
2879   guard: true
2880   movable: true
2881   congruent_to: if_operands_equal
2882   alias_set: custom
2884 # Guard an array object's length can be updated successfully when adding an
2885 # element at the input index.
2886 - name: GuardIndexIsValidUpdateOrAdd
2887   operands:
2888     object: Object
2889     index: Int32
2890   result_type: Int32
2891   guard: true
2892   movable: true
2893   congruent_to: if_operands_equal
2894   alias_set: custom
2896 # Add or update a sparse element of an ArrayObject or PlainObject. It's allowed
2897 # for the sparse element to be already present on the object. It may also be an
2898 # accessor property, so this instruction is always marked as effectful.
2899 - name: CallAddOrUpdateSparseElement
2900   operands:
2901     object: Object
2902     index: Int32
2903     value: Value
2904   arguments:
2905     strict: bool
2906   possibly_calls: true
2908 # Get a sparse element from an ArrayObject or PlainObject, possibly by calling
2909 # an accessor property.
2910 - name: CallGetSparseElement
2911   operands:
2912     object: Object
2913     index: Int32
2914   result_type: Value
2915   possibly_calls: true
2917 - name: CallNativeGetElement
2918   operands:
2919     object: Object
2920     index: Int32
2921   result_type: Value
2922   possibly_calls: true
2924 - name: CallNativeGetElementSuper
2925   operands:
2926     object: Object
2927     index: Int32
2928     receiver: Value
2929   result_type: Value
2930   possibly_calls: true
2932 # Test if a native object has an own element (sparse or dense) at an index.
2933 - name: CallObjectHasSparseElement
2934   operands:
2935     object: Object
2936     index: Int32
2937   result_type: Boolean
2938   guard: true
2939   congruent_to: if_operands_equal
2940   possibly_calls: true
2941   alias_set: custom
2943 - name: BigIntAsIntN
2944   operands:
2945     bits: Int32
2946     input: BigInt
2947   result_type: BigInt
2948   movable: true
2949   congruent_to: if_operands_equal
2950   possibly_calls: true
2951   alias_set: none
2952   can_recover: true
2953   clone: true
2955 - name: BigIntAsUintN
2956   operands:
2957     bits: Int32
2958     input: BigInt
2959   result_type: BigInt
2960   movable: true
2961   congruent_to: if_operands_equal
2962   possibly_calls: true
2963   alias_set: none
2964   can_recover: true
2965   clone: true
2967 - name: GuardNonGCThing
2968   operands:
2969     input: Value
2970   result_type: Value
2971   guard: true
2972   movable: true
2973   congruent_to: if_operands_equal
2974   folds_to: custom
2975   alias_set: none
2977 - name: ToHashableNonGCThing
2978   operands:
2979     input: Value
2980   result_type: Value
2981   movable: true
2982   congruent_to: if_operands_equal
2983   alias_set: none
2985 - name: ToHashableString
2986   operands:
2987     input: String
2988   result_type: String
2989   movable: true
2990   congruent_to: if_operands_equal
2991   alias_set: none
2992   possibly_calls: true
2994 - name: ToHashableValue
2995   operands:
2996     input: Value
2997   result_type: Value
2998   movable: true
2999   congruent_to: if_operands_equal
3000   alias_set: none
3001   possibly_calls: true
3003 - name: HashNonGCThing
3004   operands:
3005     input: Value
3006   result_type: Int32
3007   movable: true
3008   congruent_to: if_operands_equal
3009   alias_set: none
3011 - name: HashString
3012   operands:
3013     input: String
3014   result_type: Int32
3015   movable: true
3016   congruent_to: if_operands_equal
3017   alias_set: none
3019 - name: HashSymbol
3020   operands:
3021     input: Symbol
3022   result_type: Int32
3023   movable: true
3024   congruent_to: if_operands_equal
3025   alias_set: none
3027 - name: HashBigInt
3028   operands:
3029     input: BigInt
3030   result_type: Int32
3031   movable: true
3032   congruent_to: if_operands_equal
3033   alias_set: none
3035 - name: HashObject
3036   operands:
3037     set: Object
3038     input: Value
3039   result_type: Int32
3040   # In contrast to the previous hash operations, we can't move this
3041   # instruction, because the hashcode is computed from the object's address,
3042   # which can change when the object is moved by the GC.
3043   movable: false
3044   alias_set: none
3046 - name: HashValue
3047   operands:
3048     set: Object
3049     input: Value
3050   result_type: Int32
3051   movable: false
3052   alias_set: none
3054 - name: SetObjectHasNonBigInt
3055   operands:
3056     set: Object
3057     value: Value
3058     hash: Int32
3059   result_type: Boolean
3060   movable: true
3061   congruent_to: if_operands_equal
3062   alias_set: custom
3064 - name: SetObjectHasBigInt
3065   operands:
3066     set: Object
3067     value: Value
3068     hash: Int32
3069   result_type: Boolean
3070   movable: true
3071   congruent_to: if_operands_equal
3072   alias_set: custom
3074 - name: SetObjectHasValue
3075   operands:
3076     set: Object
3077     value: Value
3078     hash: Int32
3079   result_type: Boolean
3080   movable: true
3081   congruent_to: if_operands_equal
3082   alias_set: custom
3084 - name: SetObjectHasValueVMCall
3085   operands:
3086     set: Object
3087     value: Value
3088   result_type: Boolean
3089   movable: true
3090   congruent_to: if_operands_equal
3091   alias_set: custom
3092   possibly_calls: true
3094 - name: SetObjectSize
3095   operands:
3096     set: Object
3097   result_type: Int32
3098   movable: true
3099   congruent_to: if_operands_equal
3100   alias_set: custom
3102 - name: MapObjectHasNonBigInt
3103   operands:
3104     map: Object
3105     value: Value
3106     hash: Int32
3107   result_type: Boolean
3108   movable: true
3109   congruent_to: if_operands_equal
3110   alias_set: custom
3112 - name: MapObjectHasBigInt
3113   operands:
3114     map: Object
3115     value: Value
3116     hash: Int32
3117   result_type: Boolean
3118   movable: true
3119   congruent_to: if_operands_equal
3120   alias_set: custom
3122 - name: MapObjectHasValue
3123   operands:
3124     map: Object
3125     value: Value
3126     hash: Int32
3127   result_type: Boolean
3128   movable: true
3129   congruent_to: if_operands_equal
3130   alias_set: custom
3132 - name: MapObjectHasValueVMCall
3133   operands:
3134     map: Object
3135     value: Value
3136   result_type: Boolean
3137   movable: true
3138   congruent_to: if_operands_equal
3139   alias_set: custom
3140   possibly_calls: true
3142 - name: MapObjectGetNonBigInt
3143   operands:
3144     map: Object
3145     value: Value
3146     hash: Int32
3147   result_type: Value
3148   movable: true
3149   congruent_to: if_operands_equal
3150   alias_set: custom
3152 - name: MapObjectGetBigInt
3153   operands:
3154     map: Object
3155     value: Value
3156     hash: Int32
3157   result_type: Value
3158   movable: true
3159   congruent_to: if_operands_equal
3160   alias_set: custom
3162 - name: MapObjectGetValue
3163   operands:
3164     map: Object
3165     value: Value
3166     hash: Int32
3167   result_type: Value
3168   movable: true
3169   congruent_to: if_operands_equal
3170   alias_set: custom
3172 - name: MapObjectGetValueVMCall
3173   operands:
3174     map: Object
3175     value: Value
3176   result_type: Value
3177   movable: true
3178   congruent_to: if_operands_equal
3179   alias_set: custom
3180   possibly_calls: true
3182 - name: MapObjectSize
3183   operands:
3184     map: Object
3185   result_type: Int32
3186   movable: true
3187   congruent_to: if_operands_equal
3188   alias_set: custom
3190 - name: PostIntPtrConversion
3191   gen_boilerplate: false
3193 - name: WasmNeg
3194   gen_boilerplate: false
3196 - name: WasmBinaryBitwise
3197   gen_boilerplate: false
3199 - name: WasmLoadInstance
3200   gen_boilerplate: false
3202 - name: WasmStoreInstance
3203   gen_boilerplate: false
3205 - name: WasmHeapReg
3206   gen_boilerplate: false
3208 - name: WasmBoundsCheck
3209   gen_boilerplate: false
3211 - name: WasmBoundsCheckRange32
3212   operands:
3213     index: Int32
3214     length: Int32
3215     limit: Int32
3216   arguments:
3217     bytecodeOffset: wasm::BytecodeOffset
3218   result_type: Int32
3219   congruent_to: if_operands_equal
3220   type_policy: none
3222 - name: WasmExtendU32Index
3223   operands:
3224     input: Int32
3225   result_type: Int64
3226   movable: true
3227   congruent_to: if_operands_equal
3228   folds_to: custom
3229   type_policy: none
3230   alias_set: none
3232 - name: WasmWrapU32Index
3233   operands:
3234     input: Int64
3235   result_type: Int32
3236   movable: true
3237   congruent_to: if_operands_equal
3238   folds_to: custom
3239   type_policy: none
3240   alias_set: none
3242 - name: WasmAddOffset
3243   gen_boilerplate: false
3245 - name: WasmAlignmentCheck
3246   gen_boilerplate: false
3248 - name: WasmLoad
3249   gen_boilerplate: false
3251 - name: WasmStore
3252   gen_boilerplate: false
3254 - name: AsmJSLoadHeap
3255   gen_boilerplate: false
3257 - name: AsmJSStoreHeap
3258   gen_boilerplate: false
3260 - name: WasmFence
3261   guard: true
3262   alias_set: none
3263   clone: true
3265 - name: WasmCompareExchangeHeap
3266   gen_boilerplate: false
3268 - name: WasmAtomicExchangeHeap
3269   gen_boilerplate: false
3271 - name: WasmAtomicBinopHeap
3272   gen_boilerplate: false
3274 - name: WasmLoadInstanceDataField
3275   gen_boilerplate: false
3277 - name: WasmLoadGlobalCell
3278   gen_boilerplate: false
3280 - name: WasmLoadTableElement
3281   gen_boilerplate: false
3283 - name: WasmStoreInstanceDataField
3284   gen_boilerplate: false
3286 - name: WasmStoreGlobalCell
3287   gen_boilerplate: false
3289 - name: WasmStoreStackResult
3290   gen_boilerplate: false
3292 - name: WasmDerivedPointer
3293   gen_boilerplate: false
3295 - name: WasmDerivedIndexPointer
3296   gen_boilerplate: false
3298 - name: WasmStoreRef
3299   gen_boilerplate: false
3301 - name: WasmPostWriteBarrierImmediate
3302   gen_boilerplate: false
3304 - name: WasmPostWriteBarrierIndex
3305   gen_boilerplate: false
3307 - name: WasmParameter
3308   gen_boilerplate: false
3310 - name: WasmReturn
3311   gen_boilerplate: false
3313 - name: WasmReturnVoid
3314   gen_boilerplate: false
3316 - name: WasmStackArg
3317   gen_boilerplate: false
3319 - name: WasmRegisterResult
3320   gen_boilerplate: false
3322 - name: WasmFloatRegisterResult
3323   gen_boilerplate: false
3325 - name: WasmRegister64Result
3326   gen_boilerplate: false
3328 - name: WasmStackResultArea
3329   gen_boilerplate: false
3331 - name: WasmStackResult
3332   gen_boilerplate: false
3334 - name: WasmCallCatchable
3335   gen_boilerplate: false
3337 - name: WasmCallUncatchable
3338   gen_boilerplate: false
3340 - name: WasmCallLandingPrePad
3341   gen_boilerplate: false
3343 - name: WasmReturnCall
3344   gen_boilerplate: false
3346 - name: WasmSelect
3347   gen_boilerplate: false
3349 - name: WasmReinterpret
3350   gen_boilerplate: false
3352 - name: Rotate
3353   gen_boilerplate: false
3355 - name: WasmBinarySimd128
3356   gen_boilerplate: false
3358 - name: WasmBinarySimd128WithConstant
3359   gen_boilerplate: false
3361 # (v128, i32) -> v128 effect-free shift operations.
3362 - name: WasmShiftSimd128
3363   operands:
3364     lhs: Simd128
3365     rhs: Int32
3366   arguments:
3367     simdOp: wasm::SimdOp
3368   type_policy: none
3369   result_type: Simd128
3370   movable: true
3371   congruent_to: custom
3372   alias_set: none
3373   clone: true
3375 # (v128, v128, mask) -> v128 effect-free operation.
3376 - name: WasmShuffleSimd128
3377   operands:
3378     lhs: Simd128
3379     rhs: Simd128
3380   arguments:
3381     shuffle: SimdShuffle
3382   type_policy: none
3383   result_type: Simd128
3384   movable: true
3385   congruent_to: custom
3386   alias_set: none
3387   clone: true
3389 - name: WasmReplaceLaneSimd128
3390   gen_boilerplate: false
3392 - name: WasmUnarySimd128
3393   operands:
3394     src: Simd128
3395   arguments:
3396     simdOp: wasm::SimdOp
3397   type_policy: none
3398   result_type: Simd128
3399   movable: true
3400   congruent_to: custom
3401   alias_set: none
3402   clone: true
3404 - name: WasmTernarySimd128
3405   gen_boilerplate: false
3407 - name: WasmScalarToSimd128
3408   gen_boilerplate: false
3410 - name: WasmReduceSimd128
3411   gen_boilerplate: false
3413 - name: WasmLoadLaneSimd128
3414   gen_boilerplate: false
3416 - name: WasmStoreLaneSimd128
3417   gen_boilerplate: false
3419 - name: UnreachableResult
3420   gen_boilerplate: false
3422 - name: IonToWasmCall
3423   gen_boilerplate: false
3425 - name: WasmLoadField
3426   gen_boilerplate: false
3428 - name: WasmLoadFieldKA
3429   gen_boilerplate: false
3431 - name: WasmLoadElementKA
3432   gen_boilerplate: false
3434 - name: WasmStoreFieldKA
3435   gen_boilerplate: false
3437 - name: WasmStoreFieldRefKA
3438   gen_boilerplate: false
3440 - name: WasmStoreElementKA
3441   gen_boilerplate: false
3443 - name: WasmStoreElementRefKA
3444   gen_boilerplate: false
3446 - name: WasmRefIsSubtypeOfConcrete
3447   gen_boilerplate: false
3449 - name: WasmRefIsSubtypeOfAbstract
3450   gen_boilerplate: false
3452 - name: WasmNewStructObject
3453   gen_boilerplate: false
3455 - name: WasmNewArrayObject
3456   gen_boilerplate: false
3458 #ifdef FUZZING_JS_FUZZILLI
3459 - name: FuzzilliHash
3460   gen_boilerplate: false
3462 - name: FuzzilliHashStore
3463   gen_boilerplate: false
3464 #endif