5#ifndef V8_COMPILER_CODE_ASSEMBLER_H_
6#define V8_COMPILER_CODE_ASSEMBLER_H_
8#include <initializer_list>
32#if V8_ENABLE_WEBASSEMBLY
41class AsyncGeneratorRequest;
42struct AssemblerOptions;
44class CallInterfaceDescriptor;
49class JSAsyncFunctionObject;
50class JSAsyncGeneratorObject;
53class JSDateTimeFormat;
55class JSDurationFormat;
60class JSRegExpStringIterator;
61class JSRelativeTimeFormat;
62class JSSegmentIterator;
65class JSV8BreakIterator;
66class JSWeakCollection;
67class JSFinalizationRegistry;
71class OSROptimizedCodeCache;
72class ProfileDataFromFile;
73class PromiseCapability;
74class PromiseFulfillReactionJobTask;
76class PromiseReactionJobTask;
77class PromiseRejectReactionJobTask;
78class TurbofanCompilationJob;
80#define MAKE_FORWARD_DECLARATION(Name) class Name;
82#undef MAKE_FORWARD_DECLARATION
89 switch (check_bounds) {
102#define OBJECT_TYPE_CASE(Name) \
104 struct ObjectTypeOf<Name> { \
105 static constexpr ObjectType value = ObjectType::k##Name; \
107#define OBJECT_TYPE_STRUCT_CASE(NAME, Name, name) \
109 struct ObjectTypeOf<Name> { \
110 static constexpr ObjectType value = ObjectType::k##Name; \
112#define OBJECT_TYPE_TEMPLATE_CASE(Name) \
113 template <class... Args> \
114 struct ObjectTypeOf<Name<Args...>> { \
115 static constexpr ObjectType value = ObjectType::k##Name; \
117#define OBJECT_TYPE_ODDBALL_CASE(Name) \
119 struct ObjectTypeOf<Name> { \
120 static constexpr ObjectType value = ObjectType::kOddball; \
137#undef OBJECT_TYPE_CASE
138#undef OBJECT_TYPE_STRUCT_CASE
139#undef OBJECT_TYPE_TEMPLATE_CASE
150 (kHasSmi || kHasObject) ? ObjectType::kObject :
ObjectType::kHeapObject;
153#if defined(V8_HOST_ARCH_32_BIT)
158#elif defined(V8_HOST_ARCH_64_BIT)
159#define BINT_IS_INTPTR
164#error Unknown architecture.
170class CodeAssemblerLabel;
171class CodeAssemblerVariable;
173class TypedCodeAssemblerVariable;
177class RawMachineAssembler;
178class RawMachineLabel;
185template <
class... Types>
189#define PAIR_TYPE(T1, T2) PairT<T1, T2>
191#define CODE_ASSEMBLER_COMPARE_BINARY_OP_LIST(V) \
192 V(Float32Equal, BoolT, Float32T, Float32T) \
193 V(Float32LessThan, BoolT, Float32T, Float32T) \
194 V(Float32LessThanOrEqual, BoolT, Float32T, Float32T) \
195 V(Float32GreaterThan, BoolT, Float32T, Float32T) \
196 V(Float32GreaterThanOrEqual, BoolT, Float32T, Float32T) \
197 V(Float64Equal, BoolT, Float64T, Float64T) \
198 V(Float64NotEqual, BoolT, Float64T, Float64T) \
199 V(Float64LessThan, BoolT, Float64T, Float64T) \
200 V(Float64LessThanOrEqual, BoolT, Float64T, Float64T) \
201 V(Float64GreaterThan, BoolT, Float64T, Float64T) \
202 V(Float64GreaterThanOrEqual, BoolT, Float64T, Float64T) \
204 V(Int32GreaterThan, BoolT, Word32T, Word32T) \
205 V(Int32GreaterThanOrEqual, BoolT, Word32T, Word32T) \
206 V(Int32LessThan, BoolT, Word32T, Word32T) \
207 V(Int32LessThanOrEqual, BoolT, Word32T, Word32T) \
209 V(IntPtrLessThan, BoolT, WordT, WordT) \
210 V(IntPtrLessThanOrEqual, BoolT, WordT, WordT) \
211 V(IntPtrGreaterThan, BoolT, WordT, WordT) \
212 V(IntPtrGreaterThanOrEqual, BoolT, WordT, WordT) \
214 V(Uint32LessThan, BoolT, Word32T, Word32T) \
215 V(Uint32LessThanOrEqual, BoolT, Word32T, Word32T) \
216 V(Uint32GreaterThan, BoolT, Word32T, Word32T) \
217 V(Uint32GreaterThanOrEqual, BoolT, Word32T, Word32T) \
219 V(Uint64LessThan, BoolT, Word64T, Word64T) \
220 V(Uint64LessThanOrEqual, BoolT, Word64T, Word64T) \
221 V(Uint64GreaterThan, BoolT, Word64T, Word64T) \
222 V(Uint64GreaterThanOrEqual, BoolT, Word64T, Word64T) \
224 V(UintPtrLessThan, BoolT, WordT, WordT) \
225 V(UintPtrLessThanOrEqual, BoolT, WordT, WordT) \
226 V(UintPtrGreaterThan, BoolT, WordT, WordT) \
227 V(UintPtrGreaterThanOrEqual, BoolT, WordT, WordT)
229#define CODE_ASSEMBLER_BINARY_OP_LIST(V) \
230 CODE_ASSEMBLER_COMPARE_BINARY_OP_LIST(V) \
231 V(Float32Sub, Float32T, Float32T, Float32T) \
232 V(Float32Add, Float32T, Float32T, Float32T) \
233 V(Float32Mul, Float32T, Float32T, Float32T) \
234 V(Float64Add, Float64T, Float64T, Float64T) \
235 V(Float64Sub, Float64T, Float64T, Float64T) \
236 V(Float64Mul, Float64T, Float64T, Float64T) \
237 V(Float64Div, Float64T, Float64T, Float64T) \
238 V(Float64Mod, Float64T, Float64T, Float64T) \
239 V(Float64Atan2, Float64T, Float64T, Float64T) \
240 V(Float64Pow, Float64T, Float64T, Float64T) \
241 V(Float64Max, Float64T, Float64T, Float64T) \
242 V(Float64Min, Float64T, Float64T, Float64T) \
243 V(Float64InsertLowWord32, Float64T, Float64T, Word32T) \
244 V(Float64InsertHighWord32, Float64T, Float64T, Word32T) \
245 V(I8x16Eq, I8x16T, I8x16T, I8x16T) \
246 V(IntPtrAdd, WordT, WordT, WordT) \
247 V(IntPtrSub, WordT, WordT, WordT) \
248 V(IntPtrMul, WordT, WordT, WordT) \
249 V(IntPtrMulHigh, IntPtrT, IntPtrT, IntPtrT) \
250 V(UintPtrMulHigh, UintPtrT, UintPtrT, UintPtrT) \
251 V(IntPtrDiv, IntPtrT, IntPtrT, IntPtrT) \
252 V(IntPtrMod, IntPtrT, IntPtrT, IntPtrT) \
253 V(IntPtrAddWithOverflow, PAIR_TYPE(IntPtrT, BoolT), IntPtrT, IntPtrT) \
254 V(IntPtrSubWithOverflow, PAIR_TYPE(IntPtrT, BoolT), IntPtrT, IntPtrT) \
255 V(IntPtrMulWithOverflow, PAIR_TYPE(IntPtrT, BoolT), IntPtrT, IntPtrT) \
256 V(Int32Add, Word32T, Word32T, Word32T) \
257 V(Int32AddWithOverflow, PAIR_TYPE(Int32T, BoolT), Int32T, Int32T) \
258 V(Int32Sub, Word32T, Word32T, Word32T) \
259 V(Int32SubWithOverflow, PAIR_TYPE(Int32T, BoolT), Int32T, Int32T) \
260 V(Int32Mul, Word32T, Word32T, Word32T) \
261 V(Int32MulWithOverflow, PAIR_TYPE(Int32T, BoolT), Int32T, Int32T) \
262 V(Int32Div, Int32T, Int32T, Int32T) \
263 V(Uint32Div, Uint32T, Uint32T, Uint32T) \
264 V(Int32Mod, Int32T, Int32T, Int32T) \
265 V(Uint32Mod, Uint32T, Uint32T, Uint32T) \
266 V(Int64Add, Word64T, Word64T, Word64T) \
267 V(Int64Sub, Word64T, Word64T, Word64T) \
268 V(Int64SubWithOverflow, PAIR_TYPE(Int64T, BoolT), Int64T, Int64T) \
269 V(Int64Mul, Word64T, Word64T, Word64T) \
270 V(Int64MulHigh, Int64T, Int64T, Int64T) \
271 V(Uint64MulHigh, Uint64T, Uint64T, Uint64T) \
272 V(Int64Div, Int64T, Int64T, Int64T) \
273 V(Int64Mod, Int64T, Int64T, Int64T) \
274 V(WordOr, WordT, WordT, WordT) \
275 V(WordAnd, WordT, WordT, WordT) \
276 V(WordXor, WordT, WordT, WordT) \
277 V(WordRor, WordT, WordT, IntegralT) \
278 V(WordShl, WordT, WordT, IntegralT) \
279 V(WordShr, WordT, WordT, IntegralT) \
280 V(WordSar, WordT, WordT, IntegralT) \
281 V(WordSarShiftOutZeros, WordT, WordT, IntegralT) \
282 V(Word32Or, Word32T, Word32T, Word32T) \
283 V(Word32And, Word32T, Word32T, Word32T) \
284 V(Word32Xor, Word32T, Word32T, Word32T) \
285 V(Word32Ror, Word32T, Word32T, Word32T) \
286 V(Word32Shl, Word32T, Word32T, Word32T) \
287 V(Word32Shr, Word32T, Word32T, Word32T) \
288 V(Word32Sar, Word32T, Word32T, Word32T) \
289 V(Word32SarShiftOutZeros, Word32T, Word32T, Word32T) \
290 V(Word64And, Word64T, Word64T, Word64T) \
291 V(Word64Or, Word64T, Word64T, Word64T) \
292 V(Word64Xor, Word64T, Word64T, Word64T) \
293 V(Word64Shl, Word64T, Word64T, Word64T) \
294 V(Word64Shr, Word64T, Word64T, Word64T) \
295 V(Word64Sar, Word64T, Word64T, Word64T)
299#define CODE_ASSEMBLER_UNARY_OP_LIST(V) \
300 V(Float32Abs, Float32T, Float32T) \
301 V(Float64Abs, Float64T, Float64T) \
302 V(Float64Acos, Float64T, Float64T) \
303 V(Float64Acosh, Float64T, Float64T) \
304 V(Float64Asin, Float64T, Float64T) \
305 V(Float64Asinh, Float64T, Float64T) \
306 V(Float64Atan, Float64T, Float64T) \
307 V(Float64Atanh, Float64T, Float64T) \
308 V(Float64Cos, Float64T, Float64T) \
309 V(Float64Cosh, Float64T, Float64T) \
310 V(Float64Exp, Float64T, Float64T) \
311 V(Float64Expm1, Float64T, Float64T) \
312 V(Float64Log, Float64T, Float64T) \
313 V(Float64Log1p, Float64T, Float64T) \
314 V(Float64Log2, Float64T, Float64T) \
315 V(Float64Log10, Float64T, Float64T) \
316 V(Float64Cbrt, Float64T, Float64T) \
317 V(Float64Neg, Float64T, Float64T) \
318 V(Float64Sin, Float64T, Float64T) \
319 V(Float64Sinh, Float64T, Float64T) \
320 V(Float64Sqrt, Float64T, Float64T) \
321 V(Float64Tan, Float64T, Float64T) \
322 V(Float64Tanh, Float64T, Float64T) \
323 V(Float64ExtractLowWord32, Uint32T, Float64T) \
324 V(Float64ExtractHighWord32, Uint32T, Float64T) \
325 V(BitcastTaggedToWord, IntPtrT, Object) \
326 V(BitcastTaggedToWordForTagAndSmiBits, IntPtrT, AnyTaggedT) \
327 V(BitcastMaybeObjectToWord, IntPtrT, MaybeObject) \
328 V(BitcastWordToTagged, Object, WordT) \
329 V(BitcastWordToTaggedSigned, Smi, WordT) \
330 V(TruncateFloat64ToFloat32, Float32T, Float64T) \
331 V(TruncateFloat64ToFloat16RawBits, Float16RawBitsT, Float64T) \
332 V(TruncateFloat64ToWord32, Uint32T, Float64T) \
333 V(TruncateInt64ToInt32, Int32T, Int64T) \
334 V(ChangeFloat32ToFloat64, Float64T, Float32T) \
335 V(ChangeFloat64ToUint32, Uint32T, Float64T) \
336 V(ChangeFloat64ToUint64, Uint64T, Float64T) \
337 V(ChangeFloat64ToInt64, Int64T, Float64T) \
338 V(ChangeInt32ToFloat64, Float64T, Int32T) \
339 V(ChangeInt32ToInt64, Int64T, Int32T) \
340 V(ChangeUint32ToFloat64, Float64T, Word32T) \
341 V(ChangeUint32ToUint64, Uint64T, Word32T) \
342 V(ChangeInt64ToFloat64, Float64T, Int64T) \
343 V(BitcastInt32ToFloat32, Float32T, Word32T) \
344 V(BitcastFloat32ToInt32, Uint32T, Float32T) \
345 V(BitcastFloat64ToInt64, Int64T, Float64T) \
346 V(BitcastInt64ToFloat64, Float64T, Int64T) \
347 V(RoundFloat64ToInt32, Int32T, Float64T) \
348 V(RoundInt32ToFloat32, Float32T, Int32T) \
349 V(Float64SilenceNaN, Float64T, Float64T) \
350 V(Float64RoundDown, Float64T, Float64T) \
351 V(Float64RoundUp, Float64T, Float64T) \
352 V(Float64RoundTiesEven, Float64T, Float64T) \
353 V(Float64RoundTruncate, Float64T, Float64T) \
354 V(Word32Clz, Int32T, Word32T) \
355 V(Word64Clz, Int64T, Word64T) \
356 V(Word32Ctz, Int32T, Word32T) \
357 V(Word64Ctz, Int64T, Word64T) \
358 V(Word32Popcnt, Int32T, Word32T) \
359 V(Word64Popcnt, Int64T, Word64T) \
360 V(Word32BitwiseNot, Word32T, Word32T) \
361 V(WordNot, WordT, WordT) \
362 V(Word64Not, Word64T, Word64T) \
363 V(I8x16BitMask, Int32T, I8x16T) \
364 V(I8x16Splat, I8x16T, Int32T) \
365 V(Int32AbsWithOverflow, PAIR_TYPE(Int32T, BoolT), Int32T) \
366 V(Int64AbsWithOverflow, PAIR_TYPE(Int64T, BoolT), Int64T) \
367 V(IntPtrAbsWithOverflow, PAIR_TYPE(IntPtrT, BoolT), IntPtrT) \
368 V(Word32BinaryNot, BoolT, Word32T) \
369 V(StackPointerGreaterThan, BoolT, WordT)
401 bool IsFloat64RoundUpSupported()
const;
402 bool IsFloat64RoundDownSupported()
const;
403 bool IsFloat64RoundTiesEvenSupported()
const;
404 bool IsFloat64RoundTruncateSupported()
const;
405 bool IsTruncateFloat64ToFloat16RawBitsSupported()
const;
406 bool IsInt32AbsWithOverflowSupported()
const;
407 bool IsInt64AbsWithOverflowSupported()
const;
408 bool IsIntPtrAbsWithOverflowSupported()
const;
409 bool IsWord32PopcntSupported()
const;
410 bool IsWord64PopcntSupported()
const;
411 bool IsWord32CtzSupported()
const;
412 bool IsWord64CtzSupported()
const;
447 void CompileCode(
Isolate* isolate,
448 std::unique_ptr<TurbofanCompilationJob> job);
450 void AwaitAndFinalizeCurrentBatch(
Isolate* isolate);
453 void QueueJob(
Isolate* isolate,
454 std::unique_ptr<TurbofanCompilationJob> job);
458 int builtins_installed_count_ = 0;
461 size_t current_batch_zone_size_ = 0;
466 std::deque<std::unique_ptr<TurbofanCompilationJob>>
480 template <
class PreviousType,
bool FromTyped>
485 :
node_(node), code_assembler_(code_assembler),
location_(location) {}
493 static_assert(!std::is_same<A, Tagged<MaybeObject>>
::value,
494 "Can't cast to Tagged<MaybeObject>, use explicit "
495 "conversion functions. ");
498 "Incompatible types: this cast can never succeed.");
501 "Coercion to untagged values cannot be "
506 "Unnecessary CAST: types are convertible.");
510 ExternalReference::check_object_type());
511 code_assembler_->CallCFunction(
512 function, MachineType::AnyTagged(),
513 std::make_pair(MachineType::AnyTagged(),
node_),
514 std::make_pair(MachineType::TaggedSigned(),
515 code_assembler_->SmiConstant(
517 std::make_pair(MachineType::AnyTagged(),
518 code_assembler_->StringConstant(
location_)));
538 template <
class T,
class U>
541 "Incompatible types: this cast can never succeed.");
553 return {
value,
this, location};
558 return {
value,
this, location};
562#define STRINGIFY(x) #x
563#define TO_STRING_LITERAL(x) STRINGIFY(x)
565 Cast(x, "CAST(" #x ") at " __FILE__ ":" TO_STRING_LITERAL(__LINE__))
566#define TORQUE_CAST(...) \
567 ca_.Cast(__VA_ARGS__, "CAST(" #__VA_ARGS__ ") at " __FILE__ \
568 ":" TO_STRING_LITERAL(__LINE__))
570#define CAST(x) Cast(x)
571#define TORQUE_CAST(...) ca_.Cast(__VA_ARGS__)
575 TNode<Int32T> UniqueInt32Constant(int32_t value);
576 TNode<Int32T> Int32Constant(int32_t value);
577 TNode<Int64T> UniqueInt64Constant(int64_t value);
578 TNode<Int64T> Int64Constant(int64_t value);
580 return Unsigned(Int64Constant(base::bit_cast<int64_t>(value)));
585 return Unsigned(UniqueInt32Constant(base::bit_cast<int32_t>(value)));
588 return Unsigned(Int32Constant(base::bit_cast<int32_t>(value)));
591 return Uint32Constant(value >> 32);
595 return Uint64HighWordConstant(value);
598 return Uint32Constant(
static_cast<uint32_t
>(value));
601 return Unsigned(IntPtrConstant(base::bit_cast<intptr_t>(value)));
605 return ReinterpretCast<RawPtrT>(
606 IntPtrConstant(
reinterpret_cast<intptr_t
>(value)));
611 template <
typename E>
613 requires std::is_enum<E>::value
615 static_assert(
sizeof(E) <=
sizeof(int));
616 return SmiConstant(
static_cast<int>(value));
623 template <
class Type>
625 return UncheckedCast<Type>(UntypedHeapConstantNoHole(
object));
627 template <
class Type>
629 return UncheckedCast<Type>(UntypedHeapConstantMaybeHole(
object));
631 template <
class Type>
633 return UncheckedCast<Type>(UntypedHeapConstantHole(
object));
642 return ReinterpretCast<BoolT>(Int32Constant(1));
645 return ReinterpretCast<BoolT>(Int32Constant(0));
648 return value ? Int32TrueConstant() : Int32FalseConstant();
651 return ReinterpretCast<ExternalPointerHandleT>(Uint32Constant(0));
654 bool IsMapOffsetConstant(
Node* node);
659 bool TryToIntPtrConstant(
TNode<Smi> tnode, intptr_t* out_value);
670 return UncheckedCast<Uint32T>(
x);
673 return UncheckedCast<Uint64T>(
x);
676 return UncheckedCast<UintPtrT>(
x);
691 bool HasDynamicJSParameterCount();
696 static_assert(kTargetParameterIndex == -1);
703 "Parameter is only for tagged types. Use UncheckedParameter instead.");
704 std::stringstream message;
705 message <<
"Parameter " <<
value;
706 if (loc.FileName()) {
707 message <<
" at " << loc.FileName() <<
":" << loc.Line();
709 size_t buf_size = message.str().size() + 1;
710 char* message_dup = zone()->AllocateArray<
char>(buf_size);
711 snprintf(message_dup, buf_size,
"%s", message.str().c_str());
713 return Cast(UntypedParameter(value), message_dup);
718 return UncheckedCast<T>(UntypedParameter(value));
721 Node* UntypedParameter(
int value);
736 void PopAndReturn(
Node* pop,
Node* value);
742 void AbortCSADcheck(
Node* message);
756 : message(message), loc(loc) {}
758 template <
class... Args>
760 if (!
v8_flags.code_comments)
return;
761 std::ostringstream
s;
762 USE(s << message.message, (s << std::forward<Args>(
args))...);
763 if (message.loc.FileName()) {
764 s <<
" - " << message.loc.ToString();
766 EmitComment(std::move(s).str());
770 const char* source =
"unknown position");
774 void SetSourcePosition(
const char* file,
int line);
775 void PushSourcePosition();
776 void PopSourcePosition();
787 const std::vector<FileAndLine>& GetMacroSourcePositionStack()
const;
796 GotoHint goto_hint = GotoHint::kNone);
798 GotoHint goto_hint = GotoHint::kNone);
807 template <
class... T>
809 Bind(
label->plain_label());
810 label->CreatePhis(phis...);
812 template <
class...
T,
class... Args>
820 template <
class...
T,
class...
U>
823 std::vector<Node*> args_true,
825 std::vector<Node*> args_false) {
831 template <
class...
T,
class... Args>
834 Goto(
label->plain_label());
838 const std::function<
void()>& false_body);
840 const std::function<
void()>& false_body);
844 void Switch(
Node* index,
Label* default_label,
const int32_t* case_values,
845 Label** case_labels,
size_t case_count);
852#if V8_ENABLE_WEBASSEMBLY
863 template <
class Type>
867 return UncheckedCast<Type>(
Load(type,
static_cast<Node*
>(
base)));
870 template <
class Type>
874 template <
class Type>
878 template <
class Type>
881 return UncheckedCast<Type>(
884 template <
class Type>
908 template <
typename Type>
911 return UncheckedCast<Type>(UnalignedLoad(
mt,
base,
offset));
943 void OptimizedStoreIndirectPointerFieldNoWriteBarrier(
964 template <
class Type>
970 template <
class Type>
976 template <
class Type>
982 template <
class Type>
988 template <
class Type>
995 template <
class Type>
1006 template <
class Type>
1019#define DECLARE_CODE_ASSEMBLER_BINARY_OP(name, ResType, Arg1Type, Arg2Type) \
1020 TNode<ResType> name(TNode<Arg1Type> a, TNode<Arg2Type> b);
1022#undef DECLARE_CODE_ASSEMBLER_BINARY_OP
1025 TNode<PairT<Word32T, Word32T>> Int32PairAdd(TNode<Word32T> lhs_lo_word,
1026 TNode<Word32T> lhs_hi_word,
1027 TNode<Word32T> rhs_lo_word,
1028 TNode<Word32T> rhs_hi_word);
1029 TNode<PairT<Word32T, Word32T>> Int32PairSub(TNode<Word32T> lhs_lo_word,
1030 TNode<Word32T> lhs_hi_word,
1031 TNode<Word32T> rhs_lo_word,
1032 TNode<Word32T> rhs_hi_word);
1035 return Unsigned(WordShr(
static_cast<TNode<WordT>>(left), right));
1038 return Signed(WordSar(
static_cast<TNode<WordT>>(left), right));
1041 return Signed(WordShl(
static_cast<TNode<WordT>>(left), right));
1044 return Unsigned(WordShl(
static_cast<TNode<WordT>>(left), right));
1048 return Signed(Word32Shl(
static_cast<TNode<Word32T>>(left), right));
1051 return Unsigned(Word32Shl(
static_cast<TNode<Word32T>>(left), right));
1054 return Unsigned(Word32Shr(
static_cast<TNode<Word32T>>(left), right));
1057 return Signed(Word32Sar(
static_cast<TNode<Word32T>>(left), right));
1061 return Signed(Word64Shl(
static_cast<TNode<Word64T>>(left), right));
1064 return Unsigned(Word64Shl(
static_cast<TNode<Word64T>>(left), right));
1067 return Signed(Word64Shr(
static_cast<TNode<Word64T>>(left), right));
1070 return Unsigned(Word64Shr(
static_cast<TNode<Word64T>>(left), right));
1073 return Signed(Word64Sar(
static_cast<TNode<Word64T>>(left), right));
1077 return Signed(Word64And(
static_cast<TNode<Word64T>>(left), right));
1080 return Unsigned(Word64And(
static_cast<TNode<Word64T>>(left), right));
1084 return Signed(Word64Xor(
static_cast<TNode<Word64T>>(left), right));
1087 return Unsigned(Word64Xor(
static_cast<TNode<Word64T>>(left), right));
1102 return Unsigned(WordAnd(
static_cast<TNode<WordT>>(left),
1144 return UncheckedCast<BoolT>(Word32Or(
static_cast<TNode<Word32T>>(left),
1148 return UncheckedCast<BoolT>(Word32And(
static_cast<TNode<Word32T>>(left),
1183 return Signed(Int64Add(
static_cast<TNode<Word64T>>(left), right));
1187 return Unsigned(Int64Add(
static_cast<TNode<Word64T>>(left), right));
1191 return Signed(Int64Sub(
static_cast<TNode<Word64T>>(left), right));
1195 return Unsigned(Int64Sub(
static_cast<TNode<Word64T>>(left), right));
1199 return Signed(Int64Mul(
static_cast<TNode<Word64T>>(left), right));
1203 return Unsigned(Int64Mul(
static_cast<TNode<Word64T>>(left), right));
1207 return Signed(IntPtrAdd(
static_cast<TNode<WordT>>(left),
1211 return Signed(IntPtrSub(
static_cast<TNode<WordT>>(left),
1215 return Signed(IntPtrMul(
static_cast<TNode<WordT>>(left),
1219 return Unsigned(IntPtrAdd(
static_cast<TNode<WordT>>(left),
1223 return Unsigned(IntPtrSub(
static_cast<TNode<WordT>>(left),
1227 return ReinterpretCast<RawPtrT>(IntPtrAdd(left, right));
1230 return ReinterpretCast<RawPtrT>(IntPtrSub(left, right));
1233 return Signed(IntPtrSub(
static_cast<TNode<WordT>>(left),
1241 return UncheckedCast<IntPtrT>(WordShr(
TNode<WordT>(value), shift));
1244 return UncheckedCast<IntPtrT>(WordSar(
TNode<WordT>(value), shift));
1251 return Int32Sub(left, Int32Constant(right));
1254 return Word32And(left, Int32Constant(right));
1257 return Word32Shl(left, Int32Constant(right));
1260 return Word32Equal(left, Int32Constant(right));
1264#define DECLARE_CODE_ASSEMBLER_UNARY_OP(name, ResType, ArgType) \
1265 TNode<ResType> name(TNode<ArgType> a);
1267#undef DECLARE_CODE_ASSEMBLER_UNARY_OP
1269 template <
class Dummy =
void>
1271 static_assert(
sizeof(
Dummy) < 0,
1272 "Should use BitcastTaggedToWordForTagAndSmiBits instead.");
1299 template <
int index,
class T1,
class T2>
1303 typename std::tuple_element<index, std::tuple<T1, T2>>::type>(
1304 Projection(index, value));
1308 template <
class T =
Object,
class... TArgs>
1311 return UncheckedCast<T>(CallRuntimeImpl(
1315 template <
class... TArgs>
1318 int argc =
static_cast<int>(
sizeof...(args));
1320 return TailCallRuntimeImpl(function, arity, context,
1324 template <
class... TArgs>
1327 return TailCallRuntimeImpl(function, arity, context,
1347 template <
typename T =
Object,
class... TArgs>
1349 DCHECK_WITH_MSG(!Builtins::HasJSLinkage(
id),
"Use CallJSBuiltin instead");
1351#if V8_ENABLE_WEBASSEMBLY
1352 bool maybe_needs_switch = wasm::BuiltinLookup::IsWasmBuiltinId(
builtin()) &&
1353 !wasm::BuiltinLookup::IsWasmBuiltinId(
id);
1354 if (maybe_needs_switch) {
1355 old_sp = SwitchToTheCentralStackIfNeeded();
1362#if V8_ENABLE_WEBASSEMBLY
1363 if (maybe_needs_switch) {
1364 SwitchFromTheCentralStack(old_sp);
1370 template <
class... TArgs>
1372 DCHECK_WITH_MSG(!Builtins::HasJSLinkage(
id),
"Use CallJSBuiltin instead");
1375 CallStubR(StubCallMode::kCallCodeObject, callable.
descriptor(), target,
1379 template <
class... TArgs>
1382 "Use TailCallJSBuiltin instead");
1392 template <
class T =
Object,
class... TArgs>
1395 return UncheckedCast<T>(CallStubR(StubCallMode::kCallCodeObject, descriptor,
1396 target, context,
args...));
1399 template <
class T =
Object,
class... TArgs>
1403 return UncheckedCast<T>(CallStubR(StubCallMode::kCallBuiltinPointer,
1404 descriptor, target, context,
args...));
1407 template <
class... TArgs>
1410 TailCallStubImpl(descriptor, target, context, {
args...});
1413 template <
class... TArgs>
1417 template <
class... TArgs>
1422 TailCallStubThenBytecodeDispatchImpl(callable.
descriptor(), target, context,
1428 template <
class... TArgs>
1433 DCHECK(Builtins::HasJSLinkage(builtin));
1435 DCHECK_EQ(Builtins::GetStackParameterCount(builtin), 1 +
sizeof...(
args));
1442 return CAST(CallJSStubImpl(callable.
descriptor(), target, context, function,
1444 {receiver, args...}));
1453 DCHECK(Builtins::HasJSLinkage(
id));
1456#ifdef V8_JS_LINKAGE_INCLUDES_DISPATCH_HANDLE
1458 arg_count, dispatch_handle);
1466 template <
class... TArgs>
1470 DCHECK(Builtins::IsAnyCall(builtin));
1475 return CAST(CallJSStubImpl(callable.
descriptor(), target, context, function,
1476 std::nullopt, arity, std::nullopt,
1477 {receiver, args...}));
1481 template <
class... TArgs>
1487 DCHECK_EQ(builtin, Builtin::kConstruct);
1493 return CAST(CallJSStubImpl(callable.
descriptor(), target, context, function,
1495 {receiver, args...}));
1511 Node*
const* inputs);
1517 template <
class... CArgs>
1521 std::conjunction_v<std::is_convertible<CArgs, CFunctionArg>...>,
1522 "invalid argument types");
1523 return CallCFunction(function, return_type, {cargs...});
1527 template <
class... CArgs>
1532 std::conjunction_v<std::is_convertible<CArgs, CFunctionArg>...>,
1533 "invalid argument types");
1534 return CallCFunctionWithoutFunctionDescriptor(function, return_type,
1539 template <
class... CArgs>
1545 std::conjunction_v<std::is_convertible<CArgs, CFunctionArg>...>,
1546 "invalid argument types");
1547 return CallCFunctionWithCallerSavedRegisters(function, return_type, mode,
1558 void BreakOnNode(
int node_id);
1563 bool IsExceptionHandlerActive()
const;
1566 void RegisterCallGenerationCallbacks(
1569 void UnregisterCallGenerationCallbacks();
1571 bool Word32ShiftIsSafe()
const;
1573 bool IsJSFunctionCall()
const;
1579 std::initializer_list<CFunctionArg>
args);
1583 std::initializer_list<CFunctionArg>
args);
1587 std::initializer_list<CFunctionArg>
args);
1598 std::initializer_list<Node*>
args);
1600 void TailCallStubThenBytecodeDispatchImpl(
1602 std::initializer_list<Node*>
args);
1604 template <
class... TArgs>
1608 return CallStubRImpl(call_mode, descriptor, target, context, {
args...});
1614 std::initializer_list<Node*>
args);
1622 std::initializer_list<Node*>
args);
1626 Node*
const* inputs);
1634 void EmitComment(std::string msg);
1641 Node* Projection(
int index,
Node* value);
1647 void CallPrologue();
1648 void CallEpilogue();
1663 bool IsBound()
const;
1669 Node* initial_value);
1678 void Bind(
Node* value);
1711 TNode<T> initial_value, CodeAssembler* assembler)
1742 &(merged_variables[0]), type) {}
1749 std::initializer_list<CodeAssemblerVariable*> vars,
1764 inline bool is_used()
const {
return merge_count_ != 0; }
1773 void UpdateVariablesAfterBind();
1774 void MergeVariables();
1787 std::map<CodeAssemblerVariable::Impl*, std::vector<Node*>,
1798 :
state_(assembler->state()),
1804 void AddInputs(std::vector<Node*> inputs);
1807 std::vector<MachineRepresentation> representations);
1816template <
class... Types>
1820 static constexpr size_t kArity =
sizeof...(Types);
1833 std::vector<Node*>{inputs...});
1836 const std::vector<Node*>& phi_nodes =
1839 auto it = phi_nodes.begin();
1859 const char* name,
Builtin builtin = Builtin::kNoBuiltinId);
1870 void PrintCurrentBlock(std::ostream& os);
1873 void SetInitialDebugInformation(
const char* msg,
const char* file,
int line);
1879 friend class CodeAssemblerTester;
1886 const char* name,
Builtin builtin);
1889 void PopExceptionHandler();
1927 std::unique_ptr<CodeAssemblerExceptionHandlerLabel>
label_;
constexpr UnderlyingType & value() &
Handle< Code > code() const
CallInterfaceDescriptor descriptor() const
static TNode UncheckedCast(compiler::Node *node)
CodeAssemblerLabel & operator=(const CodeAssemblerLabel &)=delete
std::map< CodeAssemblerVariable::Impl *, std::vector< Node * >, CodeAssemblerVariable::ImplComparator > variable_merges_
CodeAssemblerState * state_
CodeAssemblerLabel(CodeAssembler *assembler, std::initializer_list< CodeAssemblerVariable * > vars, CodeAssemblerLabel::Type type=CodeAssemblerLabel::kNonDeferred)
CodeAssemblerLabel(CodeAssembler *assembler, CodeAssemblerLabel::Type type=CodeAssemblerLabel::kNonDeferred)
std::map< CodeAssemblerVariable::Impl *, Node *, CodeAssemblerVariable::ImplComparator > variable_phis_
CodeAssemblerLabel(CodeAssembler *assembler, const CodeAssemblerVariableList &merged_variables, CodeAssemblerLabel::Type type=CodeAssemblerLabel::kNonDeferred)
CodeAssemblerLabel(CodeAssembler *assembler, CodeAssemblerVariable *merged_variable, CodeAssemblerLabel::Type type=CodeAssemblerLabel::kNonDeferred)
CodeAssemblerLabel(const CodeAssemblerLabel &)=delete
void AddInputs(std::vector< Node * > inputs)
CodeAssemblerState * state_
CodeAssemblerParameterizedLabelBase(CodeAssembler *assembler, size_t arity, CodeAssemblerLabel::Type type)
CodeAssemblerLabel * plain_label()
std::vector< Node * > phi_nodes_
std::vector< std::vector< Node * > > phi_inputs_
CodeAssemblerLabel plain_label_
const std::vector< Node * > & CreatePhis(std::vector< MachineRepresentation > representations)
Node * CreatePhi(MachineRepresentation rep, const std::vector< Node * > &inputs)
CodeAssemblerParameterizedLabel(CodeAssembler *assembler, CodeAssemblerLabel::Type type)
void CreatePhis(TNode< Types > *... results)
static void AssignPhi(TNode< T > *result, Node *phi)
void AddInputsVector(std::vector< Node * > inputs)
void AddInputs(TNode< Types >... inputs)
static constexpr size_t kArity
VariableId NextVariableId()
std::vector< FileAndLine > macro_call_stack_
std::vector< CodeAssemblerExceptionHandlerLabel * > exception_handler_labels_
std::unique_ptr< RawMachineAssembler > raw_assembler_
CodeAssemblerCallback call_epilogue_
CodeAssemblerCallback call_prologue_
CodeAssemblerState(const CodeAssemblerState &)=delete
CodeAssemblerState & operator=(const CodeAssemblerState &)=delete
ZoneSet< CodeAssemblerVariable::Impl *, CodeAssemblerVariable::ImplComparator > variables_
const char * name() const
CodeAssemblerState * state_
CodeAssemblerVariable & operator=(const CodeAssemblerVariable &)=delete
CodeAssemblerVariable(const CodeAssemblerVariable &)=delete
int builtins_installed_count() const
std::deque< std::unique_ptr< TurbofanCompilationJob > > main_thread_output_queue_
CheckedNode(compiler::Node *node, CodeAssembler *, const char *)
SourcePositionScope(CodeAssembler *ca)
CodeAssemblerState * state()
TNode< BoolT > Word32NotEqual(TNode< Word32T > left, TNode< Word32T > right)
Node * CallCFunctionWithoutFunctionDescriptor(Node *function, MachineType return_type, std::initializer_list< CFunctionArg > args)
TNode< T > CallStub(const CallInterfaceDescriptor &descriptor, TNode< Code > target, TNode< Object > context, TArgs... args)
Node * CallCFunctionWithoutFunctionDescriptor(Node *function, MachineType return_type, CArgs... cargs)
TNode< IntPtrT > IntPtrMul(TNode< IntPtrT > left, TNode< IntPtrT > right)
TNode< IntPtrT > IntPtrAdd(TNode< IntPtrT > left, TNode< IntPtrT > right)
TNode< IntPtrT > WordOr(TNode< IntPtrT > left, TNode< IntPtrT > right)
TNode< IntPtrT > WordSar(TNode< IntPtrT > value, int shift)
CodeAssembler(CodeAssemblerState *state)
CodeAssemblerState * state_
TNode< Int32T > Signed(TNode< Word32T > x)
std::pair< MachineType, Node * > CFunctionArg
CodeAssembler & operator=(const CodeAssembler &)=delete
void Comment(MessageWithSourceLocation message, Args &&... args)
TNode< RawPtrT > RawPtrSub(TNode< RawPtrT > left, TNode< IntPtrT > right)
TNode< RawPtrT > SwitchToTheCentralStack()
TNode< T > Uninitialized()
TNode< UintPtrT > Unsigned(TNode< WordT > x)
TNode< Int64T > Signed(TNode< Word64T > x)
Node * CallCFunctionWithCallerSavedRegisters(Node *function, MachineType return_type, SaveFPRegsMode mode, CArgs... cargs)
CodeAssembler(const CodeAssembler &)=delete
TNode< T > UncheckedCast(Node *value)
TNode< IntPtrT > WordShl(TNode< IntPtrT > left, TNode< IntegralT > right)
Node * CallCFunction(Node *function, std::optional< MachineType > return_type, std::initializer_list< CFunctionArg > args)
TNode< Type > Load(Node *base)
TNode< Int64T > Int64Mul(TNode< Int64T > left, TNode< Int64T > right)
TNode< Type > HeapConstantHole(Handle< Type > object)
TNode< Int32T > Int32Mul(TNode< Int32T > left, TNode< Int32T > right)
TNode< BoolT > WordEqual(TNode< WordT > left, TNode< WordT > right)
TNode< Word32T > AtomicOr(MachineType type, TNode< RawPtrT > base, TNode< UintPtrT > offset, TNode< Word32T > value)
void PushSourcePosition()
TNode< Int32T > Word32Shl(TNode< Int32T > left, int right)
TNode< Uint64T > Word64Not(TNode< Uint64T > value)
TNode< UintPtrT > UintPtrSub(TNode< UintPtrT > left, TNode< UintPtrT > right)
TNode< IntPtrT > WordSar(TNode< IntPtrT > left, TNode< IntegralT > right)
void CallBuiltinVoid(Builtin id, TNode< Object > context, TArgs... args)
TNode< Int32T > Word32BitwiseNot(TNode< Int32T > a)
TNode< RawPtrT > SwitchToTheCentralStackIfNeeded()
TNode< Uint32T > Uint64HighWordConstantNoLowWord(uint64_t value)
TNode< Word32T > AtomicExchange(MachineType type, TNode< RawPtrT > base, TNode< UintPtrT > offset, TNode< Word32T > value)
TNode< Type > HeapConstantMaybeHole(Handle< Type > object)
TNode< Uint32T > Unsigned(TNode< Word32T > x)
TNode< Int32T > Word32And(TNode< Int32T > left, TNode< Int32T > right)
Node * CallCFunctionWithCallerSavedRegisters(Node *function, MachineType return_type, SaveFPRegsMode mode, std::initializer_list< CFunctionArg > args)
TNode< Word32T > AtomicAdd(MachineType type, TNode< RawPtrT > base, TNode< UintPtrT > offset, TNode< Word32T > value)
TNode< Int32T > Int32Sub(TNode< Int32T > left, int right)
void TailCallJSBuiltin(Builtin id, TNode< Object > context, TNode< Object > function, TNode< Object > new_target, TNode< Int32T > arg_count, TNode< JSDispatchHandleT > dispatch_handle)
TNode< Uint32T > UniqueUint32Constant(int32_t value)
TNode< Type > Load(MachineType type, TNode< RawPtr< Type > > base)
TNode< Uint64T > Unsigned(TNode< Word64T > x)
void Branch(TNode< BoolT > condition, CodeAssemblerParameterizedLabel< T... > *if_true, std::vector< Node * > args_true, CodeAssemblerParameterizedLabel< U... > *if_false, std::vector< Node * > args_false)
TNode< T > ReinterpretCast(Node *value)
void Goto(CodeAssemblerParameterizedLabel< T... > *label, Args... args)
TNode< Int32T > Int32Add(TNode< Int32T > left, TNode< Int32T > right)
CheckedNode< T, true > Cast(TNode< T > value, const char *location="")
TNode< Uint32T > Word32Shl(TNode< Uint32T > left, TNode< Uint32T > right)
TNode< IntPtrT > BitcastTaggedToWord(TNode< Smi > node)
TNode< Uint32T > Word32And(TNode< Uint32T > left, TNode< Uint32T > right)
TNode< Uint64T > Uint64Constant(uint64_t value)
void TailCallRuntime(Runtime::FunctionId function, TNode< Object > context, TArgs... args)
TNode< JSAny > ConstructJS(Builtin builtin, TNode< Context > context, TNode< Object > function, TNode< JSAny > new_target, TArgs... args)
TNode< BoolT > Word32And(TNode< BoolT > left, TNode< BoolT > right)
TNode< Uint32T > Word32Or(TNode< Uint32T > left, TNode< Uint32T > right)
TNode< Uint64T > Uint64Add(TNode< Uint64T > left, TNode< Uint64T > right)
TNode< Uint32T > Unsigned(TNode< Uint32T > x)
TNode< BoolT > Word32Or(TNode< BoolT > left, TNode< BoolT > right)
TNode< BoolT > Word64NotEqual(TNode< Word64T > left, TNode< Word64T > right)
TNode< BoolT > Int32FalseConstant()
TNode< Type > Load(Node *base, TNode< WordT > offset)
TNode< BoolT > Word32Equal(TNode< Word32T > left, int right)
TNode< IntPtrT > RawPtrSub(TNode< RawPtrT > left, TNode< RawPtrT > right)
TNode< Uint64T > Word64Shr(TNode< Uint64T > left, TNode< Uint64T > right)
TNode< UintPtrT > WordAnd(TNode< UintPtrT > left, TNode< UintPtrT > right)
TNode< Int64T > Word64Sar(TNode< Int64T > left, TNode< Int64T > right)
void Bind(CodeAssemblerParameterizedLabel< T... > *label, TNode< T > *... phis)
TNode< T > UncheckedParameter(int value)
TNode< T > UncheckedCast(TNode< U > value)
TNode< Type > AtomicOr64(TNode< RawPtrT > base, TNode< UintPtrT > offset, TNode< UintPtrT > value, TNode< UintPtrT > value_high)
TNode< Int32T > Int32Sub(TNode< Int32T > left, TNode< Int32T > right)
TNode< Int32T > Word32Or(TNode< Int32T > left, TNode< Int32T > right)
TNode< Object > CallJSBuiltin(Builtin builtin, TNode< Context > context, TNode< Object > function, std::optional< TNode< Object > > new_target, TNode< Object > receiver, TArgs... args)
TNode< Int32T > Word32Shl(TNode< Int32T > left, TNode< Int32T > right)
TNode< BoolT > IntPtrEqual(TNode< WordT > left, TNode< WordT > right)
TNode< IntPtrT > WordAnd(TNode< IntPtrT > left, TNode< IntPtrT > right)
TNode< Type > AtomicSub64(TNode< RawPtrT > base, TNode< UintPtrT > offset, TNode< UintPtrT > value, TNode< UintPtrT > value_high)
TNode< Type > AtomicExchange64(TNode< RawPtrT > base, TNode< UintPtrT > offset, TNode< UintPtrT > value, TNode< UintPtrT > value_high)
void TailCallBuiltinThenBytecodeDispatch(Builtin builtin, Node *context, TArgs... args)
TNode< Uint64T > Uint64Mul(TNode< Uint64T > left, TNode< Uint64T > right)
TNode< Word32T > Word32And(TNode< Word32T > left, int right)
TNode< Int64T > Word64And(TNode< Int64T > left, TNode< Int64T > right)
TNode< ExternalPointerHandleT > ExternalPointerHandleNullConstant()
TNode< Int64T > Int64Sub(TNode< Int64T > left, TNode< Int64T > right)
TNode< IntPtrT > IntPtrSub(TNode< IntPtrT > left, TNode< IntPtrT > right)
TNode< IntPtrT > WordShr(TNode< IntPtrT > value, int shift)
void TailCallBuiltin(Builtin id, TNode< Object > context, TArgs... args)
TNode< Word32T > AtomicXor(MachineType type, TNode< RawPtrT > base, TNode< UintPtrT > offset, TNode< Word32T > value)
TNode< typename std::tuple_element< index, std::tuple< T1, T2 > >::type > Projection(TNode< PairT< T1, T2 > > value)
void TailCallRuntime(Runtime::FunctionId function, TNode< Int32T > arity, TNode< Object > context, TArgs... args)
TNode< Uint32T > Uint64HighWordConstant(uint64_t value)
TNode< Uint32T > Uint32Sub(TNode< Uint32T > left, TNode< Uint32T > right)
TNode< Int64T > Word64Xor(TNode< Int64T > left, TNode< Int64T > right)
TNode< Type > AtomicXor64(TNode< RawPtrT > base, TNode< UintPtrT > offset, TNode< UintPtrT > value, TNode< UintPtrT > value_high)
TNode< BoolT > Int32TrueConstant()
TNode< Int64T > Int64Add(TNode< Int64T > left, TNode< Int64T > right)
TNode< BoolT > BoolConstant(bool value)
TNode< Uint64T > Word64And(TNode< Uint64T > left, TNode< Uint64T > right)
TNode< Int64T > Word64Shr(TNode< Int64T > left, TNode< Uint64T > right)
TNode< Uint32T > Word32Shr(TNode< Uint32T > left, TNode< Uint32T > right)
TNode< Word32T > AtomicSub(MachineType type, TNode< RawPtrT > base, TNode< UintPtrT > offset, TNode< Word32T > value)
TNode< Uint64T > Uint64Sub(TNode< Uint64T > left, TNode< Uint64T > right)
TNode< Uint32T > Uint64LowWordConstant(uint64_t value)
TNode< Uint64T > Word64Xor(TNode< Uint64T > left, TNode< Uint64T > right)
TNode< Smi > SmiConstant(E value)
TNode< BoolT > WordNotEqual(TNode< WordT > left, TNode< WordT > right)
TNode< Type > AtomicAdd64(TNode< RawPtrT > base, TNode< UintPtrT > offset, TNode< UintPtrT > value, TNode< UintPtrT > value_high)
TNode< T > CallBuiltinPointer(const CallInterfaceDescriptor &descriptor, TNode< BuiltinPtr > target, TNode< Object > context, TArgs... args)
Node * CallCFunction(Node *function, std::optional< MachineType > return_type, CArgs... cargs)
TNode< Uint32T > Uint32Add(TNode< Uint32T > left, TNode< Uint32T > right)
TNode< RawPtrT > PointerConstant(void *value)
TNode< Uint32T > Uint32Constant(uint32_t value)
TNode< Type > HeapConstantNoHole(Handle< Type > object)
TNode< Type > UnalignedLoad(TNode< RawPtrT > base, TNode< IntPtrT > offset)
TNode< Int32T > Word32Sar(TNode< Int32T > left, TNode< Int32T > right)
TNode< BoolT > Word32Equal(TNode< Word32T > left, TNode< Word32T > right)
TNode< T > CallRuntime(Runtime::FunctionId function, TNode< Object > context, TArgs... args)
TNode< Word32T > AtomicAnd(MachineType type, TNode< RawPtrT > base, TNode< UintPtrT > offset, TNode< Word32T > value)
void SwitchFromTheCentralStack(TNode< RawPtrT > old_sp)
TNode< Uint64T > Word64Shl(TNode< Uint64T > left, TNode< Uint64T > right)
TNode< Uint32T > Uint32Mul(TNode< Uint32T > left, TNode< Uint32T > right)
TNode< IntPtrT > WordNot(TNode< IntPtrT > a)
TNode< UintPtrT > UintPtrConstant(uintptr_t value)
void TailCallStub(const CallInterfaceDescriptor &descriptor, TNode< Code > target, TNode< Object > context, TArgs... args)
void Branch(TNode< BoolT > condition, CodeAssemblerParameterizedLabel< T... > *if_true, CodeAssemblerParameterizedLabel< T... > *if_false, Args... args)
TNode< UintPtrT > WordShl(TNode< UintPtrT > left, TNode< IntegralT > right)
TNode< JSAny > CallJS(Builtin builtin, TNode< Context > context, TNode< Object > function, TNode< JSAny > receiver, TArgs... args)
TNode< Type > AtomicLoad(AtomicMemoryOrder order, TNode< RawPtrT > base, TNode< WordT > offset)
TNode< RawPtrT > RawPtrAdd(TNode< RawPtrT > left, TNode< IntPtrT > right)
TNode< Int64T > Word64Shl(TNode< Int64T > left, TNode< Int64T > right)
TNode< UintPtrT > WordShr(TNode< UintPtrT > left, TNode< IntegralT > right)
TNode< Int32T > Signed(TNode< Int32T > x)
TNode< IntPtrT > Signed(TNode< WordT > x)
TNode< UintPtrT > UintPtrAdd(TNode< UintPtrT > left, TNode< UintPtrT > right)
TNode< Int64T > Word64Not(TNode< Int64T > value)
TNode< T > CallBuiltin(Builtin id, TNode< Object > context, TArgs... args)
TNode< T > Parameter(int value, const SourceLocation &loc=SourceLocation::Current())
Node * CallStubR(StubCallMode call_mode, const CallInterfaceDescriptor &descriptor, TNode< Object > target, TNode< Object > context, TArgs... args)
TNode< Type > AtomicAnd64(TNode< RawPtrT > base, TNode< UintPtrT > offset, TNode< UintPtrT > value, TNode< UintPtrT > value_high)
CheckedNode< Object, false > Cast(Node *value, const char *location="")
TNode< BoolT > Word64Equal(TNode< Word64T > left, TNode< Word64T > right)
TypedCodeAssemblerVariable< Object > * exception_
CodeAssembler * assembler_
std::unique_ptr< CodeAssemblerExceptionHandlerLabel > label_
CodeAssemblerLabel * compatibility_label_
void operator=(const TypedCodeAssemblerVariable< T > &variable)
void operator=(TNode< T > value)
TypedCodeAssemblerVariable(TNode< T > initial_value, CodeAssembler *assembler)
TypedCodeAssemblerVariable(CodeAssembler *assembler)
#define DECLARE_CODE_ASSEMBLER_UNARY_OP(name, ResType, ArgType)
#define CODE_ASSEMBLER_UNARY_OP_LIST(V)
#define OBJECT_TYPE_STRUCT_CASE(NAME, Name, name)
#define DECLARE_CODE_ASSEMBLER_BINARY_OP(name, ResType, Arg1Type, Arg2Type)
#define OBJECT_TYPE_ODDBALL_CASE(Name)
#define OBJECT_TYPE_CASE(Name)
#define CODE_ASSEMBLER_BINARY_OP_LIST(V)
#define OBJECT_TYPE_TEMPLATE_CASE(Name)
#define MAKE_FORWARD_DECLARATION(Name)
enum v8::internal::@1270::DeoptimizableCodeIterator::@67 state_
base::Vector< const DirectHandle< Object > > args
DirectHandle< Object > new_target
ZoneVector< RpoNumber > & result
LinkageLocation location_
constexpr bool has_type_v
NumberConstant(std::numeric_limits< double >::quiet_NaN())) DEFINE_GETTER(EmptyStateValues
std::function< void()> CodeAssemblerCallback
TNode< Float64T > Float64Add(TNode< Float64T > a, TNode< Float64T > b)
HeapConstantNoHole(BUILTIN_CODE(isolate(), AllocateInOldGeneration))) DEFINE_GETTER(ArrayConstructorStubConstant
std::ostream & operator<<(std::ostream &os, AccessMode access_mode)
Node::Uses::const_iterator begin(const Node::Uses &uses)
constexpr int kJSCallClosureParameterIndex
constexpr JSDispatchHandle kInvalidDispatchHandle(0xffffffff<< kJSDispatchHandleShift)
MaybeWeak< HeapObject > HeapObjectReference
StoreToObjectWriteBarrier
Handle< To > UncheckedCast(Handle< From > value)
bool NeedsBoundsCheck(CheckBounds check_bounds)
bool IsSubtype(MachineRepresentation rep1, MachineRepresentation rep2)
V8_EXPORT_PRIVATE FlagValues v8_flags
constexpr int JSParameterCount(int param_count_without_receiver)
constexpr MachineRepresentation PhiMachineRepresentationOf
Tagged< To > Cast(Tagged< From > value, const v8::SourceLocation &loc=INIT_SOURCE_LOCATION_IN_DEBUG)
V8_INLINE Local< Primitive > Null(Isolate *isolate)
V8_INLINE Local< Boolean > True(Isolate *isolate)
V8_INLINE Local< Boolean > False(Isolate *isolate)
V8_INLINE Local< Primitive > Undefined(Isolate *isolate)
i::Address Load(i::Address address)
#define HEAP_OBJECT_TRUSTED_TYPE_LIST(V)
#define HEAP_OBJECT_TEMPLATE_TYPE_LIST(V)
#define VIRTUAL_OBJECT_TYPE_LIST(V)
#define OBJECT_TYPE_LIST(V)
#define HEAP_OBJECT_ORDINARY_TYPE_LIST(V)
std::ostream & operator<<(std::ostream &os, const Operation &operation)
#define DCHECK_WITH_MSG(condition, msg)
#define DCHECK(condition)
#define DCHECK_EQ(v1, v2)
V8_INLINE A implicit_cast(A x)
#define V8_EXPORT_PRIVATE
MessageWithSourceLocation(const char *message, const SourceLocation &loc=SourceLocation::Current())
const SourceLocation & loc
std::unique_ptr< ValueMirror > value