v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
common-operator.h
Go to the documentation of this file.
1// Copyright 2014 the V8 project authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#ifndef V8_COMPILER_COMMON_OPERATOR_H_
6#define V8_COMPILER_COMMON_OPERATOR_H_
7
8#include <optional>
9
13#include "src/common/globals.h"
21
22namespace v8 {
23namespace internal {
24
25V8_EXPORT_PRIVATE std::ostream& operator<<(std::ostream&, BranchHint);
26
27namespace compiler {
28
29// Forward declarations.
30class CallDescriptor;
31struct CommonOperatorGlobalCache;
32class Operator;
33class Type;
34class Node;
35
36// The semantics of IrOpcode::kBranch changes throughout the pipeline, and in
37// particular is not the same before SimplifiedLowering (JS semantics) and after
38// (machine branch semantics). Some passes are applied both before and after
39// SimplifiedLowering, and use the BranchSemantics enum to know how branches
40// should be treated.
41// TODO(nicohartmann@): Need to remove BranchSemantics::kUnspecified once all
42// branch uses have been updated.
44
45V8_EXPORT_PRIVATE std::ostream& operator<<(std::ostream&, BranchSemantics);
46
48 switch (hint) {
50 return hint;
52 return BranchHint::kFalse;
54 return BranchHint::kTrue;
55 }
57}
58
59#if V8_ENABLE_WEBASSEMBLY
60enum class TrapId : int32_t {
61#define DEF_ENUM(Name, ...) \
62 k##Name = static_cast<uint32_t>(Builtin::kThrowWasm##Name),
64#undef DEF_ENUM
65};
66
67static_assert(std::is_same_v<std::underlying_type_t<Builtin>,
68 std::underlying_type_t<TrapId>>);
69
70inline size_t hash_value(TrapId id) { return static_cast<uint32_t>(id); }
71
72std::ostream& operator<<(std::ostream&, TrapId trap_id);
73
74TrapId TrapIdOf(const Operator* const op);
75#endif
76
89
90bool operator==(const BranchParameters& lhs, const BranchParameters& rhs);
91inline bool operator!=(const BranchParameters& lhs,
92 const BranchParameters& rhs) {
93 return !(lhs == rhs);
94}
95
96size_t hash_value(const BranchParameters& p);
97
98std::ostream& operator<<(std::ostream&, const BranchParameters& p);
99
100V8_EXPORT_PRIVATE const BranchParameters& BranchParametersOf(
101 const Operator* const) V8_WARN_UNUSED_RESULT;
102
103V8_EXPORT_PRIVATE BranchHint BranchHintOf(const Operator* const)
105
106class AssertParameters final {
107 public:
109 const char* file, int line)
112 file_(file),
113 line_(line) {}
114
116 const char* condition_string() const { return condition_string_; }
117 const char* file() const { return file_; }
118 int line() const { return line_; }
119
120 private:
122 const char* condition_string_;
123 const char* file_;
124 const int line_;
125};
126
127bool operator==(const AssertParameters& lhs, const AssertParameters& rhs);
128size_t hash_value(const AssertParameters& p);
129std::ostream& operator<<(std::ostream&, const AssertParameters& p);
130
132 const Operator* const) V8_WARN_UNUSED_RESULT;
133
134// Helper function for return nodes, because returns have a hidden value input.
135int ValueInputCountOfReturn(Operator const* const op);
136
137// Parameters for the {Deoptimize} operator.
139 public:
142
143 DeoptimizeReason reason() const { return reason_; }
144 const FeedbackSource& feedback() const { return feedback_; }
145
146 private:
149};
150
153
155
156std::ostream& operator<<(std::ostream&, DeoptimizeParameters p);
157
160
177
178bool operator==(SelectParameters const&, SelectParameters const&);
179bool operator!=(SelectParameters const&, SelectParameters const&);
180
181size_t hash_value(SelectParameters const& p);
182
183std::ostream& operator<<(std::ostream&, SelectParameters const& p);
184
186 const Operator* const) V8_WARN_UNUSED_RESULT;
187
190
193
196
199
200// The {IrOpcode::kParameter} opcode represents an incoming parameter to the
201// function. This class bundles the index and a debug name for such operators.
202class ParameterInfo final {
203 public:
205
206 ParameterInfo(int index, const char* debug_name)
207 : index_(index), debug_name_(debug_name) {
208 DCHECK_LE(kMinIndex, index);
209 }
210
211 int index() const { return index_; }
212 const char* debug_name() const { return debug_name_; }
213
214 private:
216 const char* debug_name_;
217};
218
219std::ostream& operator<<(std::ostream&, ParameterInfo const&);
220
223const ParameterInfo& ParameterInfoOf(const Operator* const)
225
226struct ObjectStateInfo final : std::pair<uint32_t, int> {
227 ObjectStateInfo(uint32_t object_id, int size)
228 : std::pair<uint32_t, int>(object_id, size) {}
229 uint32_t object_id() const { return first; }
230 int size() const { return second; }
231};
232std::ostream& operator<<(std::ostream&, ObjectStateInfo const&);
233size_t hash_value(ObjectStateInfo const& p);
234
236 : std::pair<uint32_t, const ZoneVector<MachineType>*> {
241 uint32_t object_id() const { return first; }
243};
244std::ostream& operator<<(std::ostream&, TypedObjectStateInfo const&);
245size_t hash_value(TypedObjectStateInfo const& p);
246
248 public:
249 enum Type { kInt32, kInt64 };
250
255
256 intptr_t value() const { return value_; }
257 RelocInfo::Mode rmode() const { return rmode_; }
258 Type type() const { return type_; }
259
260 private:
261 intptr_t value_;
264};
265
267 RelocatablePtrConstantInfo const& rhs);
269 RelocatablePtrConstantInfo const& rhs);
270
271std::ostream& operator<<(std::ostream&, RelocatablePtrConstantInfo const&);
272
274
275// Used to define a sparse set of inputs. This can be used to efficiently encode
276// nodes that can have a lot of inputs, but where many inputs can have the same
277// value.
278class SparseInputMask final {
279 public:
280 using BitMaskType = uint32_t;
281
282 // The mask representing a dense input set.
283 static const BitMaskType kDenseBitMask = 0x0;
284 // The bits representing the end of a sparse input set.
285 static const BitMaskType kEndMarker = 0x1;
286 // The mask for accessing a sparse input entry in the bitmask.
287 static const BitMaskType kEntryMask = 0x1;
288
289 // The number of bits in the mask, minus one for the end marker.
290 static const int kMaxSparseInputs = (sizeof(BitMaskType) * kBitsPerByte - 1);
291
292 // An iterator over a node's sparse inputs.
293 class InputIterator final {
294 public:
295 InputIterator() = default;
297
298 Node* parent() const { return parent_; }
299 int real_index() const { return real_index_; }
300
301 // Advance the iterator to the next sparse input. Only valid if the iterator
302 // has not reached the end.
303 void Advance();
304
305 // Get the current sparse input's real node value. Only valid if the
306 // current sparse input is real.
307 Node* GetReal() const;
308
309 // Advance to the next real value or the end. Only valid if the iterator is
310 // not dense. Returns the number of empty values that were skipped. This can
311 // return 0 and in that case, it does not advance.
312 size_t AdvanceToNextRealOrEnd();
313
314 // Get the current sparse input, returning either a real input node if
315 // the current sparse input is real, or the given {empty_value} if the
316 // current sparse input is empty.
317 Node* Get(Node* empty_value) const {
318 return IsReal() ? GetReal() : empty_value;
319 }
320
321 // True if the current sparse input is a real input node.
322 bool IsReal() const;
323
324 // True if the current sparse input is an empty value.
325 bool IsEmpty() const { return !IsReal(); }
326
327 // True if the iterator has reached the end of the sparse inputs.
328 bool IsEnd() const;
329
330 private:
334 };
335
336 explicit SparseInputMask(BitMaskType bit_mask) : bit_mask_(bit_mask) {}
337
338 // Provides a SparseInputMask representing a dense input set.
340
341 BitMaskType mask() const { return bit_mask_; }
342
344
345 // Counts how many real values are in the sparse array. Only valid for
346 // non-dense masks.
347 int CountReal() const;
348
349 // Returns an iterator over the sparse inputs of {node}.
350 InputIterator IterateOverInputs(Node* node);
351
352 private:
353 //
354 // The sparse input mask has a bitmask specifying if the node's inputs are
355 // represented sparsely. If the bitmask value is 0, then the inputs are dense;
356 // otherwise, they should be interpreted as follows:
357 //
358 // * The bitmask represents which values are real, with 1 for real values
359 // and 0 for empty values.
360 // * The inputs to the node are the real values, in the order of the 1s from
361 // least- to most-significant.
362 // * The top bit of the bitmask is a guard indicating the end of the values,
363 // whether real or empty (and is not representative of a real input
364 // itself). This is used so that we don't have to additionally store a
365 // value count.
366 //
367 // So, for N 1s in the bitmask, there are N - 1 inputs into the node.
369};
370
371bool operator==(SparseInputMask const& lhs, SparseInputMask const& rhs);
372bool operator!=(SparseInputMask const& lhs, SparseInputMask const& rhs);
373
389
390bool operator==(TypedStateValueInfo const& lhs, TypedStateValueInfo const& rhs);
391bool operator!=(TypedStateValueInfo const& lhs, TypedStateValueInfo const& rhs);
392
393std::ostream& operator<<(std::ostream&, TypedStateValueInfo const&);
394
395size_t hash_value(TypedStateValueInfo const& p);
396
397// Used to mark a region (as identified by BeginRegion/FinishRegion) as either
398// JavaScript-observable or not (i.e. allocations are not JavaScript observable
399// themselves, but transitioning stores are).
401
403
404std::ostream& operator<<(std::ostream&, RegionObservability);
405
408
409std::ostream& operator<<(std::ostream& os,
410 const ZoneVector<MachineType>* types);
411
413
414int OsrValueIndexOf(Operator const*) V8_WARN_UNUSED_RESULT;
415
416SparseInputMask SparseInputMaskOf(Operator const*) V8_WARN_UNUSED_RESULT;
417
418ZoneVector<MachineType> const* MachineTypesOf(Operator const*)
420
421// The ArgumentsElementsState and ArgumentsLengthState can describe the layout
422// for backing stores of arguments objects of various types:
423//
424// +------------------------------------+
425// - kUnmappedArguments: | arg0, ... argK-1, argK, ... argN-1 | {length:N}
426// +------------------------------------+
427// +------------------------------------+
428// - kMappedArguments: | hole, ... hole, argK, ... argN-1 | {length:N}
429// +------------------------------------+
430// +------------------+
431// - kRestParameter: | argK, ... argN-1 | {length:N-K}
432// +------------------+
433//
434// Here {K} represents the number for formal parameters of the active function,
435// whereas {N} represents the actual number of arguments passed at runtime.
436// Note that {N < K} can happen and causes {K} to be capped accordingly.
437//
438// Also note that it is possible for an arguments object of {kMappedArguments}
439// type to carry a backing store of {kUnappedArguments} type when {K == 0}.
441
443
444uint32_t ObjectIdOf(Operator const*);
445
448
449class IfValueParameters final {
450 public:
454
455 int32_t value() const { return value_; }
456 int32_t comparison_order() const { return comparison_order_; }
457 BranchHint hint() const { return hint_; }
458
459 private:
460 int32_t value_;
463};
464
466 IfValueParameters const&);
467
468size_t hash_value(IfValueParameters const&);
469
470V8_EXPORT_PRIVATE std::ostream& operator<<(std::ostream&,
471 IfValueParameters const&);
472
475
478
481
482const char* StaticAssertSourceOf(const Operator* op);
483
485 public:
489
490 const Operator* semantics() const { return semantics_; }
491 const std::optional<Type>& override_output_type() const {
493 }
494
495 private:
497 std::optional<Type> override_output_type_;
498};
499
502
503size_t hash_value(const SLVerifierHintParameters& p);
504
505V8_EXPORT_PRIVATE std::ostream& operator<<(std::ostream& out,
506 const SLVerifierHintParameters& p);
507
510
528
530 const ExitMachineGraphParameters& rhs);
531
533
534V8_EXPORT_PRIVATE std::ostream& operator<<(std::ostream& os,
536
539
540// Interface for building common operators that can be used at any level of IR,
541// including JavaScript, mid-level, and low-level.
543 : public NON_EXPORTED_BASE(ZoneObject) {
544 public:
545 explicit CommonOperatorBuilder(Zone* zone);
548
549 // A dummy value node temporarily used as input when the actual value doesn't
550 // matter. This operator is inserted only in SimplifiedLowering and is
551 // expected to not survive dead code elimination.
552 const Operator* Plug();
553
554 // Chained operator serves as a temporary solution to fix allocating operators
555 // at a specific position in the effect and control chain during
556 // effect control linearization, such that its position is non-floating
557 // and cannot interfere with other inlined allocations when recomputing a
558 // schedule (e.g. in Turboshaft's graph builder) when regions are gone.
559 const Operator* Chained(const Operator* op);
560
561 const Operator* Dead();
562 const Operator* DeadValue(MachineRepresentation rep);
564 const Operator* StaticAssert(const char* source);
565 // SLVerifierHint is used only during SimplifiedLowering. It may be introduced
566 // during lowering to provide additional hints for the verifier. These nodes
567 // are removed at the end of SimplifiedLowering after verification.
568 const Operator* SLVerifierHint(
569 const Operator* semantics,
570 const std::optional<Type>& override_output_type);
571 const Operator* End(size_t control_input_count);
572 // TODO(nicohartmann@): Remove the default argument for {semantics} once all
573 // uses are updated.
574 const Operator* Branch(
575 BranchHint = BranchHint::kNone,
576 BranchSemantics semantics = BranchSemantics::kUnspecified);
577 const Operator* IfTrue();
581 const Operator* Switch(size_t control_output_count);
582 const Operator* IfValue(int32_t value, int32_t order = 0,
583 BranchHint hint = BranchHint::kNone);
584 const Operator* IfDefault(BranchHint hint = BranchHint::kNone);
585 const Operator* Throw();
586 const Operator* Deoptimize(DeoptimizeReason reason,
587 FeedbackSource const& feedback);
588 const Operator* DeoptimizeIf(DeoptimizeReason reason,
589 FeedbackSource const& feedback);
590 const Operator* DeoptimizeUnless(DeoptimizeReason reason,
591 FeedbackSource const& feedback);
592 const Operator* Assert(BranchSemantics semantics,
593 const char* condition_string, const char* file,
594 int line);
595
596#if V8_ENABLE_WEBASSEMBLY
597 const Operator* TrapIf(TrapId trap_id, bool has_frame_state);
598 const Operator* TrapUnless(TrapId trap_id, bool has_frame_state);
599#endif
600 const Operator* Return(int value_input_count = 1);
602
603 const Operator* Start(int value_output_count);
604 const Operator* Loop(int control_input_count);
605 const Operator* Merge(int control_input_count);
606 const Operator* Parameter(int index, const char* debug_name = nullptr);
607
608 const Operator* OsrValue(int index);
609
610 const Operator* Int32Constant(int32_t);
611 const Operator* Int64Constant(int64_t);
612 const Operator* TaggedIndexConstant(int32_t value);
613 const Operator* Float32Constant(float);
614 const Operator* Float64Constant(double);
615 const Operator* ExternalConstant(const ExternalReference&);
616 const Operator* NumberConstant(double);
617 const Operator* PointerConstant(intptr_t);
618 const Operator* HeapConstant(const Handle<HeapObject>&);
619 const Operator* CompressedHeapConstant(const Handle<HeapObject>&);
620 const Operator* TrustedHeapConstant(const Handle<HeapObject>&);
621 const Operator* ObjectId(uint32_t);
622
623 const Operator* RelocatableInt32Constant(int32_t value,
624 RelocInfo::Mode rmode);
625 const Operator* RelocatableInt64Constant(int64_t value,
626 RelocInfo::Mode rmode);
627
628 const Operator* Select(
629 MachineRepresentation, BranchHint = BranchHint::kNone,
630 BranchSemantics semantics = BranchSemantics::kUnspecified);
631 const Operator* Phi(MachineRepresentation representation,
632 int value_input_count);
633 const Operator* EffectPhi(int effect_input_count);
634 const Operator* InductionVariablePhi(int value_input_count);
636 const Operator* LoopExitValue(MachineRepresentation rep);
639 const Operator* BeginRegion(RegionObservability);
641 const Operator* StateValues(int arguments, SparseInputMask bitmask);
642 const Operator* TypedStateValues(const ZoneVector<MachineType>* types,
643 SparseInputMask bitmask);
644 const Operator* ArgumentsElementsState(ArgumentsStateType type);
645 const Operator* ArgumentsLengthState();
646 const Operator* ObjectState(uint32_t object_id, int pointer_slots);
647 const Operator* TypedObjectState(uint32_t object_id,
648 const ZoneVector<MachineType>* types);
649 const Operator* FrameState(BytecodeOffset bailout_id,
650 OutputFrameStateCombine state_combine,
651 const FrameStateFunctionInfo* function_info);
652 const Operator* Call(const CallDescriptor* call_descriptor);
653 const Operator* TailCall(const CallDescriptor* call_descriptor);
654 const Operator* Projection(size_t index);
655 const Operator* Retain();
656 const Operator* TypeGuard(Type type);
657 const Operator* EnterMachineGraph(UseInfo use_info);
658 const Operator* ExitMachineGraph(MachineRepresentation output_representation,
659 Type output_type);
660
661 // Constructs a new merge or phi operator with the same opcode as {op}, but
662 // with {size} inputs.
663 const Operator* ResizeMergeOrPhi(const Operator* op, int size);
664
665 // Constructs function info for frame state construction.
666 const FrameStateFunctionInfo* CreateFrameStateFunctionInfo(
667 FrameStateType type, uint16_t parameter_count, uint16_t max_arguments,
668 int local_count, IndirectHandle<SharedFunctionInfo> shared_info,
669 IndirectHandle<BytecodeArray> bytecode_array);
670#if V8_ENABLE_WEBASSEMBLY
671 const FrameStateFunctionInfo* CreateJSToWasmFrameStateFunctionInfo(
672 FrameStateType type, uint16_t parameter_count, int local_count,
673 Handle<SharedFunctionInfo> shared_info,
674 const wasm::CanonicalSig* signature);
675#endif // V8_ENABLE_WEBASSEMBLY
676
677 private:
678 Zone* zone() const { return zone_; }
679
681 Zone* const zone_;
682};
683
684// Node wrappers.
685
687 public:
688 explicit constexpr CommonNodeWrapperBase(Node* node) : NodeWrapper(node) {}
689
690 // Valid iff this node has exactly one effect input.
691 Effect effect() const {
692 DCHECK_EQ(node()->op()->EffectInputCount(), 1);
694 }
695
696 // Valid iff this node has exactly one control input.
697 Control control() const {
698 DCHECK_EQ(node()->op()->ControlInputCount(), 1);
700 }
701};
702
703#define DEFINE_INPUT_ACCESSORS(Name, name, TheIndex, Type) \
704 static constexpr int Name##Index() { return TheIndex; } \
705 TNode<Type> name() const { \
706 return TNode<Type>::UncheckedCast( \
707 NodeProperties::GetValueInput(node(), TheIndex)); \
708 }
709
710// TODO(jgruber): This class doesn't match the usual OpcodeNode naming
711// convention for historical reasons (it was originally a very basic typed node
712// wrapper similar to Effect and Control). Consider updating the name, with low
713// priority.
715 public:
716 explicit constexpr FrameState(Node* node) : CommonNodeWrapperBase(node) {
717 DCHECK_EQ(node->opcode(), IrOpcode::kFrameState);
718 }
719
721 return FrameStateInfoOf(node()->op());
722 }
723
724 static constexpr int kFrameStateParametersInput = 0;
725 static constexpr int kFrameStateLocalsInput = 1;
726 static constexpr int kFrameStateStackInput = 2;
727 static constexpr int kFrameStateContextInput = 3;
728 static constexpr int kFrameStateFunctionInput = 4;
729 static constexpr int kFrameStateOuterStateInput = 5;
730 static constexpr int kFrameStateInputCount = 6;
731
732 // Note: The parameters should be accessed through StateValuesAccess.
733 Node* parameters() const {
735 DCHECK(n->opcode() == IrOpcode::kStateValues ||
736 n->opcode() == IrOpcode::kTypedStateValues ||
737 n->opcode() == IrOpcode::kDeadValue);
738 return n;
739 }
740 Node* locals() const {
742 DCHECK(n->opcode() == IrOpcode::kStateValues ||
743 n->opcode() == IrOpcode::kTypedStateValues);
744 return n;
745 }
746 // TODO(jgruber): Consider renaming this to the more meaningful
747 // 'accumulator'.
748 Node* stack() const { return node()->InputAt(kFrameStateStackInput); }
751
752 // An outer frame state exists for inlined functions; otherwise it points at
753 // the start node. Could also be dead.
756 DCHECK(result->opcode() == IrOpcode::kFrameState ||
757 result->opcode() == IrOpcode::kStart ||
758 result->opcode() == IrOpcode::kDeadValue);
759 return result;
760 }
761};
762
763class StartNode final : public CommonNodeWrapperBase {
764 public:
765 explicit constexpr StartNode(Node* node) : CommonNodeWrapperBase(node) {
766 DCHECK_EQ(IrOpcode::kStart, node->opcode());
767 }
768
769 // The receiver is counted as part of formal parameters.
770 static constexpr int kReceiverOutputCount = 1;
771 // These outputs are in addition to formal parameters.
772 static constexpr int kExtraOutputCount =
774
775 // Takes the formal parameter count of the current function (including
776 // receiver) and returns the number of value outputs of the start node.
777 static constexpr int OutputArityForFormalParameterCount(int argc) {
778 constexpr int kClosure = 1;
779 constexpr int kNewTarget = 1;
780 constexpr int kArgCount = 1;
781 constexpr int kDispatchHandle =
783 constexpr int kContext = 1;
784 static_assert(kClosure + kNewTarget + kArgCount + kDispatchHandle +
785 kContext ==
787 // Checking related linkage methods here since they rely on Start node
788 // layout.
792#ifdef V8_JS_LINKAGE_INCLUDES_DISPATCH_HANDLE
793 DCHECK_EQ(argc + 2, Linkage::GetJSCallDispatchHandleParamIndex(argc));
795#else
797#endif
798 return argc + kClosure + kNewTarget + kArgCount + kDispatchHandle +
799 kContext;
800 }
801
803 DCHECK_GE(node()->op()->ValueOutputCount(),
805 return node()->op()->ValueOutputCount() - kExtraOutputCount;
806 }
807
809 DCHECK_GE(node()->op()->ValueOutputCount(),
811 return node()->op()->ValueOutputCount() - kExtraOutputCount -
813 }
814
815 // Note these functions don't return the index of the Start output; instead
816 // they return the index assigned to the Parameter node.
817 // TODO(jgruber): Consider unifying the two.
824#ifdef V8_JS_LINKAGE_INCLUDES_DISPATCH_HANDLE
825 int DispatchHandleOutputIndex() const {
826 return Linkage::GetJSCallDispatchHandleParamIndex(FormalParameterCount());
827 }
828#endif
832
833 // TODO(jgruber): Remove this function and use
834 // Linkage::GetJSCallContextParamIndex instead. This currently doesn't work
835 // because tests don't create valid Start nodes - for example, they may add
836 // only two context outputs (and not the closure, new target, argc). Once
837 // tests are fixed, remove this function.
839 // The context is always the last parameter to a JavaScript function, and
840 // {Parameter} indices start at -1, so value outputs of {Start} look like
841 // this: closure, receiver, param0, ..., paramN, context.
842 //
843 // TODO(jgruber): This function is called from spots that operate on
844 // CSA/Torque graphs; Start node layout appears to be different there.
845 // These should be unified to avoid confusion. Once done, enable this
846 // DCHECK: DCHECK_EQ(LastOutputIndex(), ContextOutputIndex());
847 return node()->op()->ValueOutputCount() - 2;
848 }
852
853 // Unlike ContextParameterIndex_MaybeNonStandardLayout above, these return
854 // output indices (and not the index assigned to a Parameter).
856 // Indices assigned to parameters are off-by-one (Parameters indices start
857 // at -1). TODO(jgruber): Consider starting at 0.
859 }
861 // Indices assigned to parameters are off-by-one (Parameters indices start
862 // at -1). TODO(jgruber): Consider starting at 0.
864 }
865 int ContextOutputIndex() const {
866 // Indices assigned to parameters are off-by-one (Parameters indices start
867 // at -1). TODO(jgruber): Consider starting at 0.
869 }
870 int LastOutputIndex() const { return ContextOutputIndex(); }
871};
872
873#undef DEFINE_INPUT_ACCESSORS
874
875} // namespace compiler
876} // namespace internal
877} // namespace v8
878
879#endif // V8_COMPILER_COMMON_OPERATOR_H_
#define Assert(condition)
int16_t parameter_count
Definition builtins.cc:67
AssertParameters(BranchSemantics semantics, const char *condition_string, const char *file, int line)
BranchParameters(BranchSemantics semantics, BranchHint hint)
CommonOperatorBuilder & operator=(const CommonOperatorBuilder &)=delete
const CommonOperatorGlobalCache & cache_
CommonOperatorBuilder(const CommonOperatorBuilder &)=delete
DeoptimizeParameters(DeoptimizeReason reason, FeedbackSource const &feedback)
const FeedbackSource & feedback() const
ExitMachineGraphParameters(MachineRepresentation output_representation, Type output_type)
static constexpr int kFrameStateLocalsInput
static constexpr int kFrameStateInputCount
static constexpr int kFrameStateContextInput
const FrameStateInfo & frame_state_info() const
static constexpr int kFrameStateParametersInput
static constexpr int kFrameStateFunctionInput
static constexpr int kFrameStateOuterStateInput
static constexpr int kFrameStateStackInput
IfValueParameters(int32_t value, int32_t comparison_order, BranchHint hint=BranchHint::kNone)
static constexpr int GetJSCallNewTargetParamIndex(int parameter_count)
Definition linkage.h:477
static constexpr int GetJSCallContextParamIndex(int parameter_count)
Definition linkage.h:495
static constexpr int GetJSCallArgCountParamIndex(int parameter_count)
Definition linkage.h:482
static constexpr int kJSCallClosureParamIndex
Definition linkage.h:504
static Node * GetEffectInput(Node *node, int index=0)
static Node * GetControlInput(Node *node, int index=0)
const Operator * op() const
Definition node.h:50
Node * InputAt(int index) const
Definition node.h:70
ParameterInfo(int index, const char *debug_name)
RelocatablePtrConstantInfo(int64_t value, RelocInfo::Mode rmode)
RelocatablePtrConstantInfo(int32_t value, RelocInfo::Mode rmode)
const std::optional< Type > & override_output_type() const
SLVerifierHintParameters(const Operator *semantics, std::optional< Type > override_output_type)
MachineRepresentation representation() const
SelectParameters(MachineRepresentation representation, BranchHint hint=BranchHint::kNone, BranchSemantics semantics=BranchSemantics::kUnspecified)
const MachineRepresentation representation_
InputIterator IterateOverInputs(Node *node)
static constexpr int kExtraOutputCount
static constexpr int OutputArityForFormalParameterCount(int argc)
static constexpr int kReceiverOutputCount
int ContextParameterIndex_MaybeNonStandardLayout() const
ZoneVector< MachineType > const * machine_types_
TypedStateValueInfo(ZoneVector< MachineType > const *machine_types, SparseInputMask sparse_input_mask)
ZoneVector< MachineType > const * machine_types() const
Zone * zone_
#define FOREACH_WASM_TRAPREASON(V)
Definition globals.h:2650
#define V8_JS_LINKAGE_INCLUDES_DISPATCH_HANDLE_BOOL
Definition globals.h:161
double second
ZoneVector< RpoNumber > & result
int n
Definition mul-fft.cc:296
STL namespace.
uint32_t ObjectIdOf(Operator const *op)
const BranchParameters & BranchParametersOf(const Operator *const op)
IfValueParameters const & IfValueParametersOf(const Operator *op)
RegionObservability RegionObservabilityOf(Operator const *op)
ZoneVector< MachineType > const * MachineTypesOf(Operator const *op)
size_t ProjectionIndexOf(const Operator *const op)
int ValueInputCountOfReturn(Operator const *const op)
ArgumentsStateType ArgumentsStateTypeOf(Operator const *op)
NumberConstant(std::numeric_limits< double >::quiet_NaN())) DEFINE_GETTER(EmptyStateValues
BranchHint BranchHintOf(const Operator *const op)
Handle< HeapObject > HeapConstantOf(const Operator *op)
const AssertParameters & AssertParametersOf(const Operator *const op)
const char * StaticAssertSourceOf(const Operator *op)
CallDescriptor const * CallDescriptorOf(const Operator *const op)
int ParameterIndexOf(const Operator *const op)
BranchHint NegateBranchHint(BranchHint hint)
const ParameterInfo & ParameterInfoOf(const Operator *const op)
const FrameStateInfo & FrameStateInfoOf(const Operator *op)
size_t hast_value(DeoptimizeParameters p)
DeoptimizeParameters const & DeoptimizeParametersOf(Operator const *const op)
Type TypeGuardTypeOf(Operator const *op)
size_t hash_value(const BranchParameters &p)
SelectParameters const & SelectParametersOf(const Operator *const op)
const SLVerifierHintParameters & SLVerifierHintParametersOf(const Operator *op)
bool operator!=(DeoptimizeParameters lhs, DeoptimizeParameters rhs)
bool operator==(const BranchParameters &lhs, const BranchParameters &rhs)
std::ostream & operator<<(std::ostream &os, AccessMode access_mode)
const ExitMachineGraphParameters & ExitMachineGraphParametersOf(const Operator *op)
MachineRepresentation LoopExitValueRepresentationOf(const Operator *const op)
SparseInputMask SparseInputMaskOf(Operator const *op)
MachineRepresentation PhiRepresentationOf(const Operator *const op)
MachineRepresentation DeadValueRepresentationOf(Operator const *op)
int OsrValueIndexOf(Operator const *op)
constexpr int kBitsPerByte
Definition globals.h:682
std::ostream & operator<<(std::ostream &os, AtomicMemoryOrder order)
#define NON_EXPORTED_BASE(code)
#define DCHECK_LE(v1, v2)
Definition logging.h:490
#define DCHECK_GE(v1, v2)
Definition logging.h:488
#define DCHECK(condition)
Definition logging.h:482
#define DCHECK_EQ(v1, v2)
Definition logging.h:485
#define V8_EXPORT_PRIVATE
Definition macros.h:460
ObjectStateInfo(uint32_t object_id, int size)
const ZoneVector< MachineType > * machine_types() const
TypedObjectStateInfo(uint32_t object_id, const ZoneVector< MachineType > *machine_types)
#define V8_WARN_UNUSED_RESULT
Definition v8config.h:671