32#include "torque-generated/exported-macros-assembler.h"
36namespace interpreter {
42using compiler::CodeAssemblerState;
45#define IGNITION_HANDLER(Name, BaseAssembler) \
46 class Name##Assembler : public BaseAssembler { \
48 explicit Name##Assembler(compiler::CodeAssemblerState* state, \
49 Bytecode bytecode, OperandScale scale) \
50 : BaseAssembler(state, bytecode, scale) {} \
51 Name##Assembler(const Name##Assembler&) = delete; \
52 Name##Assembler& operator=(const Name##Assembler&) = delete; \
53 static void Generate(compiler::CodeAssemblerState* state, \
54 OperandScale scale); \
57 void GenerateImpl(); \
59 void Name##Assembler::Generate(compiler::CodeAssemblerState* state, \
60 OperandScale scale) { \
61 Name##Assembler assembler(state, Bytecode::k##Name, scale); \
62 state->SetInitialDebugInformation(#Name, __FILE__, __LINE__); \
63 assembler.GenerateImpl(); \
65 void Name##Assembler::GenerateImpl()
71 TNode<Number> zero_value = NumberConstant(0.0);
72 SetAccumulator(zero_value);
80 TNode<Smi> smi_int = BytecodeOperandImmSmi(0);
81 SetAccumulator(smi_int);
89 TNode<Object> constant = LoadConstantPoolEntryAtOperandIndex(0);
90 SetAccumulator(constant);
106 SetAccumulator(NullConstant());
114 SetAccumulator(TheHoleConstant());
122 SetAccumulator(TrueConstant());
130 SetAccumulator(FalseConstant());
138 TNode<Object> value = LoadRegisterAtOperandIndex(0);
139 SetAccumulator(value);
147 TNode<Object> accumulator = GetAccumulator();
148 StoreRegisterAtOperandIndex(accumulator, 0);
160 TNode<Object> accumulator = GetAccumulator();
161 TNode<WordT> opcode = LoadBytecode(BytecodeOffset());
162 StoreRegisterForShortStar(accumulator, opcode);
170 TNode<Object> src_value = LoadRegisterAtOperandIndex(0);
171 StoreRegisterAtOperandIndex(src_value, 1);
175class InterpreterLoadGlobalAssembler :
public InterpreterAssembler {
179 : InterpreterAssembler(state, bytecode, operand_scale) {}
181 void LdaGlobal(
int slot_operand_index,
int name_operand_index,
183 TNode<Union<FeedbackVector, Undefined>> maybe_feedback_vector =
184 LoadFeedbackVector();
186 AccessorAssembler accessor_asm(
state());
187 ExitPoint exit_point(
this, [=,
this](TNode<Object>
result) {
192 LazyNode<TaggedIndex> lazy_slot = [=,
this] {
193 return BytecodeOperandIdxTaggedIndex(slot_operand_index);
196 LazyNode<Context> lazy_context = [=,
this] {
return GetContext(); };
198 LazyNode<Name> lazy_name = [=,
this] {
200 CAST(LoadConstantPoolEntryAtOperandIndex(name_operand_index));
204 accessor_asm.LoadGlobalIC(maybe_feedback_vector, lazy_slot, lazy_context,
205 lazy_name, typeof_mode, &exit_point);
214 static const int kNameOperandIndex = 0;
215 static const int kSlotOperandIndex = 1;
225 static const int kNameOperandIndex = 0;
226 static const int kSlotOperandIndex = 1;
236 TNode<Context> context = GetContext();
239 TNode<Name> name =
CAST(LoadConstantPoolEntryAtOperandIndex(0));
240 TNode<Object> value = GetAccumulator();
241 TNode<TaggedIndex> slot = BytecodeOperandIdxTaggedIndex(1);
242 TNode<HeapObject> maybe_vector = LoadFeedbackVector();
244 TNode<Object>
result = CallBuiltin(Builtin::kStoreGlobalIC, context, name,
245 value, slot, maybe_vector);
251 ClobberAccumulator(
result);
261 TNode<Context> context =
CAST(LoadRegisterAtOperandIndex(0));
262 TNode<IntPtrT> slot_index =
Signed(BytecodeOperandIdx(1));
263 TNode<Uint32T> depth = BytecodeOperandUImm(2);
264 TNode<Context> slot_context = GetContextAtDepth(context, depth);
265 TNode<Object>
result = LoadContextElement(slot_context, slot_index);
275 TNode<Context> context =
CAST(LoadRegisterAtOperandIndex(0));
276 TNode<IntPtrT> slot_index =
Signed(BytecodeOperandIdx(1));
277 TNode<Uint32T> depth = BytecodeOperandUImm(2);
278 TNode<Context> slot_context = GetContextAtDepth(context, depth);
279 TNode<Object>
result = LoadScriptContextElement(slot_context, slot_index);
289 TNode<Context> context =
CAST(LoadRegisterAtOperandIndex(0));
290 TNode<IntPtrT> slot_index =
Signed(BytecodeOperandIdx(1));
291 TNode<Uint32T> depth = BytecodeOperandUImm(2);
292 TNode<Context> slot_context = GetContextAtDepth(context, depth);
293 TNode<Object>
result = LoadContextElement(slot_context, slot_index);
302 TNode<IntPtrT> slot_index =
Signed(BytecodeOperandIdx(0));
303 TNode<Context> slot_context = GetContext();
304 TNode<Object>
result = LoadContextElement(slot_context, slot_index);
313 TNode<IntPtrT> slot_index =
Signed(BytecodeOperandIdx(0));
314 TNode<Context> slot_context = GetContext();
315 TNode<Object>
result = LoadScriptContextElement(slot_context, slot_index);
324 TNode<IntPtrT> slot_index =
Signed(BytecodeOperandIdx(0));
325 TNode<Context> slot_context = GetContext();
326 TNode<Object>
result = LoadContextElement(slot_context, slot_index);
336 TNode<Object> value = GetAccumulator();
337 TNode<Context> context =
CAST(LoadRegisterAtOperandIndex(0));
338 TNode<IntPtrT> slot_index =
Signed(BytecodeOperandIdx(1));
339 TNode<Uint32T> depth = BytecodeOperandUImm(2);
340 TNode<Context> slot_context = GetContextAtDepth(context, depth);
341 StoreContextElement(slot_context, slot_index, value);
350 TNode<Object> value = GetAccumulator();
351 TNode<IntPtrT> slot_index =
Signed(BytecodeOperandIdx(0));
352 TNode<Context> slot_context = GetContext();
353 StoreContextElement(slot_context, slot_index, value);
362 TNode<Object> value = GetAccumulator();
363 TNode<Context> context =
CAST(LoadRegisterAtOperandIndex(0));
364 TNode<IntPtrT> slot_index =
Signed(BytecodeOperandIdx(1));
365 TNode<Uint32T> depth = BytecodeOperandUImm(2);
366 TNode<Context> slot_context = GetContextAtDepth(context, depth);
367 StoreContextElementAndUpdateSideData(slot_context, slot_index, value);
376 TNode<Object> value = GetAccumulator();
377 TNode<IntPtrT> slot_index =
Signed(BytecodeOperandIdx(0));
378 TNode<Context> slot_context = GetContext();
379 StoreContextElementAndUpdateSideData(slot_context, slot_index, value);
388 TNode<Name> name =
CAST(LoadConstantPoolEntryAtOperandIndex(0));
389 TNode<Context> context = GetContext();
390 TNode<Object>
result = CallRuntime(Runtime::kLoadLookupSlot, context, name);
400 TNode<Name> name =
CAST(LoadConstantPoolEntryAtOperandIndex(0));
401 TNode<Context> context = GetContext();
403 CallRuntime(Runtime::kLoadLookupSlotInsideTypeof, context, name);
408class InterpreterLookupContextSlotAssembler :
public InterpreterAssembler {
413 : InterpreterAssembler(state, bytecode, operand_scale) {}
416 TNode<Context> context = GetContext();
417 TNode<IntPtrT> slot_index =
Signed(BytecodeOperandIdx(1));
418 TNode<Uint32T> depth = BytecodeOperandUImm(2);
420 Label slowpath(
this, Label::kDeferred);
423 TNode<Context> slot_context =
424 GotoIfHasContextExtensionUpToDepth(context, depth, &slowpath);
430 ? LoadScriptContextElement(slot_context, slot_index)
431 : LoadContextElement(slot_context, slot_index);
439 TNode<Name> name =
CAST(LoadConstantPoolEntryAtOperandIndex(0));
440 TNode<Object>
result = CallRuntime(function_id, context, name);
451IGNITION_HANDLER(LdaLookupContextSlot, InterpreterLookupContextSlotAssembler) {
460 InterpreterLookupContextSlotAssembler) {
469 InterpreterLookupContextSlotAssembler) {
470 LookupContextSlot(Runtime::kLoadLookupSlotInsideTypeof,
479 InterpreterLookupContextSlotAssembler) {
480 LookupContextSlot(Runtime::kLoadLookupSlotInsideTypeof,
484class InterpreterLookupGlobalAssembler :
public InterpreterLoadGlobalAssembler {
488 : InterpreterLoadGlobalAssembler(state, bytecode, operand_scale) {}
491 TNode<Context> context = GetContext();
492 TNode<Uint32T> depth = BytecodeOperandUImm(2);
494 Label slowpath(
this, Label::kDeferred);
497 GotoIfHasContextExtensionUpToDepth(context, depth, &slowpath);
501 static const int kNameOperandIndex = 0;
502 static const int kSlotOperandIndex = 1;
505 function_id == Runtime::kLoadLookupSlotInsideTypeof
509 LdaGlobal(kSlotOperandIndex, kNameOperandIndex, typeof_mode);
515 TNode<Name> name =
CAST(LoadConstantPoolEntryAtOperandIndex(0));
516 TNode<Object>
result = CallRuntime(function_id, context, name);
528 LookupGlobalSlot(Runtime::kLoadLookupSlot);
536 InterpreterLookupGlobalAssembler) {
537 LookupGlobalSlot(Runtime::kLoadLookupSlotInsideTypeof);
545 TNode<Object> value = GetAccumulator();
546 TNode<Name> name =
CAST(LoadConstantPoolEntryAtOperandIndex(0));
547 TNode<Uint32T> bytecode_flags = BytecodeOperandFlag8(1);
548 TNode<Context> context = GetContext();
551 Label sloppy(
this), strict(
this),
end(
this);
556 Branch(IsSetWord32<StoreLookupSlotFlags::LanguageModeBit>(bytecode_flags),
561 CSA_DCHECK(
this, IsClearWord32<StoreLookupSlotFlags::LookupHoistingModeBit>(
564 CallRuntime(Runtime::kStoreLookupSlot_Strict, context, name, value);
570 Label hoisting(
this), ordinary(
this);
571 Branch(IsSetWord32<StoreLookupSlotFlags::LookupHoistingModeBit>(
573 &hoisting, &ordinary);
577 var_result = CallRuntime(Runtime::kStoreLookupSlot_SloppyHoisting,
578 context, name, value);
585 CallRuntime(Runtime::kStoreLookupSlot_Sloppy, context, name, value);
592 SetAccumulator(var_result.value());
602 TNode<HeapObject> feedback_vector = LoadFeedbackVector();
605 TNode<JSAny> recv =
CAST(LoadRegisterAtOperandIndex(0));
608 LazyNode<TaggedIndex> lazy_slot = [=,
this] {
609 return BytecodeOperandIdxTaggedIndex(2);
611 LazyNode<Name> lazy_name = [=,
this] {
612 return CAST(LoadConstantPoolEntryAtOperandIndex(1));
614 LazyNode<Context> lazy_context = [=,
this] {
return GetContext(); };
618 ExitPoint exit_point(
this, &done, &var_result);
620 AccessorAssembler::LazyLoadICParameters params(lazy_context, recv, lazy_name,
621 lazy_slot, feedback_vector);
622 AccessorAssembler accessor_asm(
state());
623 accessor_asm.LoadIC_BytecodeHandler(¶ms, &exit_point);
627 SetAccumulator(var_result.value());
638 TNode<Object>
receiver = LoadRegisterAtOperandIndex(0);
639 TNode<HeapObject> home_object =
CAST(GetAccumulator());
640 TNode<Object> home_object_prototype = LoadMapPrototype(LoadMap(home_object));
641 TNode<Object> name = LoadConstantPoolEntryAtOperandIndex(1);
642 TNode<TaggedIndex> slot = BytecodeOperandIdxTaggedIndex(2);
643 TNode<HeapObject> feedback_vector = LoadFeedbackVector();
644 TNode<Context> context = GetContext();
647 CallBuiltin(Builtin::kLoadSuperIC, context,
receiver,
648 home_object_prototype, name, slot, feedback_vector);
658 TNode<Object>
object = LoadRegisterAtOperandIndex(0);
659 TNode<Object> name = GetAccumulator();
660 TNode<TaggedIndex> slot = BytecodeOperandIdxTaggedIndex(1);
661 TNode<HeapObject> feedback_vector = LoadFeedbackVector();
662 TNode<Context> context = GetContext();
665 var_result = CallBuiltin(Builtin::kKeyedLoadIC, context,
object, name, slot,
667 SetAccumulator(var_result.value());
677 TNode<Object>
object = LoadRegisterAtOperandIndex(0);
678 TNode<Object> name = GetAccumulator();
679 TNode<Smi> enum_index =
CAST(LoadRegisterAtOperandIndex(1));
680 TNode<Object> cache_type = LoadRegisterAtOperandIndex(2);
681 TNode<TaggedIndex> slot = BytecodeOperandIdxTaggedIndex(3);
682 TNode<HeapObject> feedback_vector = LoadFeedbackVector();
683 TNode<Context> context = GetContext();
686 var_result = CallBuiltin(Builtin::kEnumeratedKeyedLoadIC, context,
object,
687 name, enum_index, cache_type, slot, feedback_vector);
688 SetAccumulator(var_result.value());
692class InterpreterSetNamedPropertyAssembler :
public InterpreterAssembler {
697 : InterpreterAssembler(state, bytecode, operand_scale) {}
700 TNode<Object>
object = LoadRegisterAtOperandIndex(0);
701 TNode<Name> name =
CAST(LoadConstantPoolEntryAtOperandIndex(1));
702 TNode<Object> value = GetAccumulator();
703 TNode<TaggedIndex> slot = BytecodeOperandIdxTaggedIndex(2);
704 TNode<HeapObject> maybe_vector = LoadFeedbackVector();
705 TNode<Context> context = GetContext();
707 TNode<Object>
result = CallBuiltin(ic_bultin, context,
object, name, value,
714 ClobberAccumulator(
result);
738IGNITION_HANDLER(DefineNamedOwnProperty, InterpreterSetNamedPropertyAssembler) {
748 TNode<Object>
object = LoadRegisterAtOperandIndex(0);
749 TNode<Object> name = LoadRegisterAtOperandIndex(1);
750 TNode<Object> value = GetAccumulator();
751 TNode<TaggedIndex> slot = BytecodeOperandIdxTaggedIndex(2);
752 TNode<HeapObject> maybe_vector = LoadFeedbackVector();
753 TNode<Context> context = GetContext();
760 TNode<Object>
result = CallBuiltin(Builtin::kKeyedStoreIC, context,
object,
761 name, value, slot, maybe_vector);
767 ClobberAccumulator(
result);
781 TNode<Object>
object = LoadRegisterAtOperandIndex(0);
782 TNode<Object> name = LoadRegisterAtOperandIndex(1);
783 TNode<Object> value = GetAccumulator();
786 TNode<TaggedIndex> slot = BytecodeOperandIdxTaggedIndex(3);
787 TNode<HeapObject> maybe_vector = LoadFeedbackVector();
788 TNode<Context> context = GetContext();
791 CallBuiltin(Builtin::kDefineKeyedOwnIC, context,
object, name, value,
792 flags, slot, maybe_vector);
798 ClobberAccumulator(
result);
807 TNode<Object> array = LoadRegisterAtOperandIndex(0);
808 TNode<Object> index = LoadRegisterAtOperandIndex(1);
809 TNode<Object> value = GetAccumulator();
810 TNode<TaggedIndex> slot = BytecodeOperandIdxTaggedIndex(2);
811 TNode<HeapObject> feedback_vector = LoadFeedbackVector();
812 TNode<Context> context = GetContext();
815 CallBuiltin(Builtin::kStoreInArrayLiteralIC, context, array, index, value,
816 slot, feedback_vector);
822 ClobberAccumulator(
result);
835 TNode<Object>
object = LoadRegisterAtOperandIndex(0);
836 TNode<Object> name = LoadRegisterAtOperandIndex(1);
837 TNode<Object> value = GetAccumulator();
840 TNode<TaggedIndex> slot = BytecodeOperandIdxTaggedIndex(3);
842 TNode<HeapObject> feedback_vector = LoadFeedbackVector();
843 TNode<Context> context = GetContext();
845 CallRuntime(Runtime::kDefineKeyedOwnPropertyInLiteral, context,
object, name,
846 value, flags, feedback_vector, slot);
856 TNode<IntPtrT> cell_index = BytecodeOperandImmIntPtr(0);
857 TNode<Uint32T> depth = BytecodeOperandUImm(1);
859 TNode<Context> module_context = GetContextAtDepth(GetContext(), depth);
860 TNode<SourceTextModule> module =
863 Label if_export(
this), if_import(
this),
end(
this);
864 Branch(IntPtrGreaterThan(cell_index, IntPtrConstant(0)), &if_export,
869 TNode<FixedArray> regular_exports = LoadObjectField<FixedArray>(
870 module, SourceTextModule::kRegularExportsOffset);
872 TNode<IntPtrT> export_index = IntPtrSub(cell_index, IntPtrConstant(1));
874 CAST(LoadFixedArrayElement(regular_exports, export_index));
875 SetAccumulator(LoadObjectField(cell, Cell::kValueOffset));
881 TNode<FixedArray> regular_imports = LoadObjectField<FixedArray>(
882 module, SourceTextModule::kRegularImportsOffset);
884 TNode<IntPtrT> import_index = IntPtrSub(IntPtrConstant(-1), cell_index);
886 CAST(LoadFixedArrayElement(regular_imports, import_index));
887 SetAccumulator(LoadObjectField(cell, Cell::kValueOffset));
900 TNode<Object> value = GetAccumulator();
901 TNode<IntPtrT> cell_index = BytecodeOperandImmIntPtr(0);
902 TNode<Uint32T> depth = BytecodeOperandUImm(1);
904 TNode<Context> module_context = GetContextAtDepth(GetContext(), depth);
905 TNode<SourceTextModule> module =
908 Label if_export(
this), if_import(
this),
end(
this);
909 Branch(IntPtrGreaterThan(cell_index, IntPtrConstant(0)), &if_export,
914 TNode<FixedArray> regular_exports = LoadObjectField<FixedArray>(
915 module, SourceTextModule::kRegularExportsOffset);
917 TNode<IntPtrT> export_index = IntPtrSub(cell_index, IntPtrConstant(1));
918 TNode<HeapObject> cell =
919 CAST(LoadFixedArrayElement(regular_exports, export_index));
920 StoreObjectField(cell, Cell::kValueOffset, value);
927 Abort(AbortReason::kUnsupportedModuleOperation);
940 TNode<Context> new_context =
CAST(GetAccumulator());
941 TNode<Context> old_context = GetContext();
942 StoreRegisterAtOperandIndex(old_context, 0);
943 SetContext(new_context);
951 TNode<Context> context =
CAST(LoadRegisterAtOperandIndex(0));
956class InterpreterBinaryOpAssembler :
public InterpreterAssembler {
960 : InterpreterAssembler(state, bytecode, operand_scale) {}
962 using BinaryOpGenerator = TNode<Object> (BinaryOpAssembler::*)(
963 const LazyNode<Context>&
context, TNode<Object> left, TNode<Object> right,
964 TNode<UintPtrT> slot,
const LazyNode<HeapObject>& maybe_feedback_vector,
967 void BinaryOpWithFeedback(BinaryOpGenerator generator) {
968 TNode<Object> lhs = LoadRegisterAtOperandIndex(0);
969 TNode<Object> rhs = GetAccumulator();
970 TNode<Context> context = GetContext();
971 TNode<UintPtrT> slot_index = BytecodeOperandIdx(1);
972 TNode<Union<FeedbackVector, Undefined>> maybe_feedback_vector =
973 LoadFeedbackVectorOrUndefinedIfJitless();
976 BinaryOpAssembler binop_asm(
state());
977 TNode<Object>
result = (binop_asm.*generator)(
978 [=] {
return context; }, lhs, rhs, slot_index,
979 [=] {
return maybe_feedback_vector; },
mode,
false);
984 void BinaryOpSmiWithFeedback(BinaryOpGenerator generator) {
985 TNode<Object> lhs = GetAccumulator();
986 TNode<Smi> rhs = BytecodeOperandImmSmi(0);
987 TNode<Context> context = GetContext();
988 TNode<UintPtrT> slot_index = BytecodeOperandIdx(1);
989 TNode<Union<FeedbackVector, Undefined>> maybe_feedback_vector =
990 LoadFeedbackVectorOrUndefinedIfJitless();
993 BinaryOpAssembler binop_asm(
state());
994 TNode<Object>
result = (binop_asm.*generator)(
995 [=] {
return context; }, lhs, rhs, slot_index,
996 [=] {
return maybe_feedback_vector; },
mode,
true);
1083 BinaryOpSmiWithFeedback(
1087class InterpreterBitwiseBinaryOpAssembler :
public InterpreterAssembler {
1092 : InterpreterAssembler(state, bytecode, operand_scale) {}
1094 void BitwiseBinaryOpWithFeedback(
Operation bitwise_op) {
1095 TNode<Object> left = LoadRegisterAtOperandIndex(0);
1096 TNode<Object> right = GetAccumulator();
1097 TNode<Context> context = GetContext();
1098 TNode<UintPtrT> slot_index = BytecodeOperandIdx(1);
1099 TNode<Union<FeedbackVector, Undefined>> maybe_feedback_vector =
1100 LoadFeedbackVectorOrUndefinedIfJitless();
1103 BinaryOpAssembler binop_asm(
state());
1104 TNode<Object>
result = binop_asm.Generate_BitwiseBinaryOpWithFeedback(
1105 bitwise_op, left, right, [=] {
return context; }, slot_index,
1106 [=] {
return maybe_feedback_vector; },
mode,
false);
1112 void BitwiseBinaryOpWithSmi(
Operation bitwise_op) {
1113 TNode<Object> left = GetAccumulator();
1114 TNode<Smi> right = BytecodeOperandImmSmi(0);
1115 TNode<UintPtrT> slot_index = BytecodeOperandIdx(1);
1116 TNode<Context> context = GetContext();
1117 TNode<Union<FeedbackVector, Undefined>> maybe_feedback_vector =
1118 LoadFeedbackVectorOrUndefinedIfJitless();
1121 BinaryOpAssembler binop_asm(
state());
1122 TNode<Object>
result = binop_asm.Generate_BitwiseBinaryOpWithFeedback(
1123 bitwise_op, left, right, [=] {
return context; }, slot_index,
1124 [=] {
return maybe_feedback_vector; },
mode,
true);
1135 BitwiseBinaryOpWithFeedback(Operation::kBitwiseOr);
1142 BitwiseBinaryOpWithFeedback(Operation::kBitwiseXor);
1149 BitwiseBinaryOpWithFeedback(Operation::kBitwiseAnd);
1159 BitwiseBinaryOpWithFeedback(Operation::kShiftLeft);
1169 BitwiseBinaryOpWithFeedback(Operation::kShiftRight);
1179 BitwiseBinaryOpWithFeedback(Operation::kShiftRightLogical);
1186 BitwiseBinaryOpWithSmi(Operation::kBitwiseOr);
1193 BitwiseBinaryOpWithSmi(Operation::kBitwiseXor);
1200 BitwiseBinaryOpWithSmi(Operation::kBitwiseAnd);
1203#ifndef V8_ENABLE_EXPERIMENTAL_TSA_BUILTINS
1209 TNode<Object> value = GetAccumulator();
1210 TNode<Context> context = GetContext();
1211 TNode<UintPtrT> slot_index = BytecodeOperandIdx(0);
1212 TNode<Union<FeedbackVector, Undefined>> maybe_feedback_vector =
1213 LoadFeedbackVectorOrUndefinedIfJitless();
1216 UnaryOpAssembler unary_op_asm(
state());
1217 TNode<Object>
result = unary_op_asm.Generate_BitwiseNotWithFeedback(
1218 context, value, slot_index, maybe_feedback_vector, mode);
1232 BitwiseBinaryOpWithSmi(Operation::kShiftLeft);
1241 BitwiseBinaryOpWithSmi(Operation::kShiftRight);
1249IGNITION_HANDLER(ShiftRightLogicalSmi, InterpreterBitwiseBinaryOpAssembler) {
1250 BitwiseBinaryOpWithSmi(Operation::kShiftRightLogical);
1257 TNode<Object> value = GetAccumulator();
1258 TNode<Context> context = GetContext();
1259 TNode<UintPtrT> slot_index = BytecodeOperandIdx(0);
1260 TNode<Union<FeedbackVector, Undefined>> maybe_feedback_vector =
1261 LoadFeedbackVectorOrUndefinedIfJitless();
1264 UnaryOpAssembler unary_op_asm(
state());
1265 TNode<Object>
result = unary_op_asm.Generate_NegateWithFeedback(
1266 context, value, slot_index, maybe_feedback_vector, mode);
1276 TNode<Object>
object = GetAccumulator();
1277 TNode<Context> context = GetContext();
1278 TNode<Object>
result = CallBuiltin(Builtin::kToName, context,
object);
1301 TNode<Object> accumulator = GetAccumulator();
1302 TNode<Context> context = GetContext();
1303 TNode<Object>
result = CallBuiltin(Builtin::kToObject, context, accumulator);
1304 StoreRegisterAtOperandIndex(
result, 0);
1312 SetAccumulator(ToString_Inline(GetContext(), GetAccumulator()));
1320 TNode<Object> value = GetAccumulator();
1322 Label if_true(
this), if_false(
this),
end(
this);
1323 BranchIfToBooleanIsTrue(value, &if_true, &if_false);
1331 result = FalseConstant();
1335 SetAccumulator(
result.value());
1343 TNode<Object> value = GetAccumulator();
1344 TNode<Context> context = GetContext();
1345 TNode<UintPtrT> slot_index = BytecodeOperandIdx(0);
1346 TNode<Union<FeedbackVector, Undefined>> maybe_feedback_vector =
1347 LoadFeedbackVectorOrUndefinedIfJitless();
1350 UnaryOpAssembler unary_op_asm(
state());
1351 TNode<Object>
result = unary_op_asm.Generate_IncrementWithFeedback(
1352 context, value, slot_index, maybe_feedback_vector, mode);
1362 TNode<Object> value = GetAccumulator();
1363 TNode<Context> context = GetContext();
1364 TNode<UintPtrT> slot_index = BytecodeOperandIdx(0);
1365 TNode<Union<FeedbackVector, Undefined>> maybe_feedback_vector =
1366 LoadFeedbackVectorOrUndefinedIfJitless();
1369 UnaryOpAssembler unary_op_asm(
state());
1370 TNode<Object>
result = unary_op_asm.Generate_DecrementWithFeedback(
1371 context, value, slot_index, maybe_feedback_vector, mode);
1382 TNode<Object> value = GetAccumulator();
1384 Label if_true(
this), if_false(
this),
end(
this);
1385 BranchIfToBooleanIsTrue(value, &if_true, &if_false);
1388 result = FalseConstant();
1397 SetAccumulator(
result.value());
1406 TNode<Object> value = GetAccumulator();
1408 Label if_true(
this), if_false(
this),
end(
this);
1409 TNode<True> true_value = TrueConstant();
1410 TNode<False> false_value = FalseConstant();
1411 Branch(TaggedEqual(value, true_value), &if_true, &if_false);
1419 CSA_DCHECK(
this, TaggedEqual(value, false_value));
1424 SetAccumulator(
result.value());
1433 TNode<Object> value = GetAccumulator();
1434 TNode<UintPtrT> slot_id = BytecodeOperandIdx(0);
1435 TNode<Union<FeedbackVector, Undefined>> maybe_feedback_vector =
1436 LoadFeedbackVector();
1437 TNode<String>
result = Typeof(value, slot_id, maybe_feedback_vector);
1447 TNode<Object>
object = LoadRegisterAtOperandIndex(0);
1448 TNode<Object>
key = GetAccumulator();
1449 TNode<Context> context = GetContext();
1451 CallBuiltin(Builtin::kDeleteProperty, context,
object,
key,
1462 TNode<Object>
object = LoadRegisterAtOperandIndex(0);
1463 TNode<Object>
key = GetAccumulator();
1464 TNode<Context> context = GetContext();
1466 CallBuiltin(Builtin::kDeleteProperty, context,
object,
key,
1477 TNode<JSFunction> active_function =
CAST(GetAccumulator());
1478 TNode<Object>
result = GetSuperConstructor(active_function);
1479 StoreRegisterAtOperandIndex(
result, 0);
1483class InterpreterJSCallAssembler :
public InterpreterAssembler {
1487 : InterpreterAssembler(state, bytecode, operand_scale) {}
1491 TNode<JSAny> function =
CAST(LoadRegisterAtOperandIndex(0));
1492 RegListNodePair
args = GetRegisterListAtOperandIndex(1);
1493 TNode<Context> context = GetContext();
1497 LazyNode<JSAny>
receiver = [=,
this] {
1500 : TNode<
JSAny>(
CAST(LoadRegisterAtOperandIndex(1)));
1502 TNode<UintPtrT> slot_id = BytecodeOperandIdx(3);
1503 TNode<Union<FeedbackVector, Undefined>> maybe_feedback_vector =
1504 LoadFeedbackVector();
1505 CollectCallFeedback(function,
receiver, context, maybe_feedback_vector,
1510 CallJSAndDispatch(function, context,
args, receiver_mode);
1517 const int kFirstArgumentOperandIndex = 1;
1518 const int kReceiverOperandCount =
1520 const int kReceiverAndArgOperandCount = kReceiverOperandCount + arg_count;
1522 TNode<JSAny> function =
CAST(LoadRegisterAtOperandIndex(0));
1523 TNode<Context> context = GetContext();
1527 LazyNode<JSAny>
receiver = [=,
this] {
1530 : TNode<
JSAny>(
CAST(LoadRegisterAtOperandIndex(1)));
1532 const int kSlotOperandIndex =
1533 kFirstArgumentOperandIndex + kReceiverAndArgOperandCount;
1534 TNode<UintPtrT> slot_id = BytecodeOperandIdx(kSlotOperandIndex);
1535 TNode<Union<FeedbackVector, Undefined>> maybe_feedback_vector =
1536 LoadFeedbackVector();
1537 CollectCallFeedback(function,
receiver, context, maybe_feedback_vector,
1541 switch (kReceiverAndArgOperandCount) {
1543 CallJSAndDispatch(function, context, Int32Constant(arg_count),
1548 function, context, Int32Constant(arg_count), receiver_mode,
1549 LoadRegisterAtOperandIndex(kFirstArgumentOperandIndex));
1553 function, context, Int32Constant(arg_count), receiver_mode,
1554 LoadRegisterAtOperandIndex(kFirstArgumentOperandIndex + 1),
1555 LoadRegisterAtOperandIndex(kFirstArgumentOperandIndex));
1559 function, context, Int32Constant(arg_count), receiver_mode,
1560 LoadRegisterAtOperandIndex(kFirstArgumentOperandIndex + 2),
1561 LoadRegisterAtOperandIndex(kFirstArgumentOperandIndex + 1),
1562 LoadRegisterAtOperandIndex(kFirstArgumentOperandIndex));
1617 TNode<Uint32T> function_id = BytecodeOperandRuntimeId(0);
1618 RegListNodePair
args = GetRegisterListAtOperandIndex(1);
1619 TNode<Context> context = GetContext();
1620 TNode<Object>
result = CallRuntimeN(function_id, context,
args, 1);
1631 TNode<Uint32T> function_id = BytecodeOperandIntrinsicId(0);
1632 RegListNodePair
args = GetRegisterListAtOperandIndex(1);
1633 TNode<Context> context = GetContext();
1648 TNode<Uint32T> function_id = BytecodeOperandRuntimeId(0);
1649 RegListNodePair
args = GetRegisterListAtOperandIndex(1);
1650 TNode<Context> context = GetContext();
1652 CallRuntimeN<PairT<Object, Object>>(function_id,
context,
args, 2);
1654 TNode<Object> result0 = Projection<0>(result_pair);
1655 TNode<Object> result1 = Projection<1>(result_pair);
1656 StoreRegisterPairAtOperandIndex(result0, result1, 3);
1657 ClobberAccumulator(result0);
1666 TNode<IntPtrT> context_index =
Signed(BytecodeOperandNativeContextIndex(0));
1667 RegListNodePair
args = GetRegisterListAtOperandIndex(1);
1670 TNode<Context> context = GetContext();
1671 TNode<NativeContext>
native_context = LoadNativeContext(context);
1672 TNode<JSAny> function =
1676 CallJSAndDispatch(function, context,
args,
1687 TNode<JSAny> callable =
CAST(LoadRegisterAtOperandIndex(0));
1688 RegListNodePair
args = GetRegisterListAtOperandIndex(1);
1689 TNode<UintPtrT> slot_id = BytecodeOperandIdx(3);
1690 TNode<Context> context = GetContext();
1693 CallJSWithSpreadAndDispatch(callable, context,
args, slot_id);
1704 TNode<JSAny> constructor =
CAST(LoadRegisterAtOperandIndex(0));
1705 RegListNodePair
args = GetRegisterListAtOperandIndex(1);
1706 TNode<UintPtrT> slot_id = BytecodeOperandIdx(3);
1707 TNode<Context> context = GetContext();
1709 ConstructWithSpread(constructor, context,
new_target,
args, slot_id);
1721 TNode<JSAny> constructor =
CAST(LoadRegisterAtOperandIndex(0));
1722 TNode<TaggedIndex> slot_id = BytecodeOperandIdxTaggedIndex(1);
1723 TNode<Context> context = GetContext();
1725 ConstructForwardAllArgs(constructor, context,
new_target, slot_id);
1738 TNode<JSAny> constructor =
CAST(LoadRegisterAtOperandIndex(0));
1739 RegListNodePair
args = GetRegisterListAtOperandIndex(1);
1740 TNode<UintPtrT> slot_id = BytecodeOperandIdx(3);
1741 TNode<Union<FeedbackVector, Undefined>> maybe_feedback_vector =
1742 LoadFeedbackVector();
1743 TNode<Context> context = GetContext();
1745 slot_id, maybe_feedback_vector);
1750class InterpreterCompareOpAssembler :
public InterpreterAssembler {
1754 : InterpreterAssembler(state, bytecode, operand_scale) {}
1756 void CompareOpWithFeedback(
Operation compare_op) {
1757 TNode<Object> lhs = LoadRegisterAtOperandIndex(0);
1758 TNode<Object> rhs = GetAccumulator();
1759 TNode<Context> context = GetContext();
1763 Label if_exception(
this, Label::kDeferred);
1766 ScopedExceptionHandler
handler(
this, &if_exception, &var_exception);
1767 switch (compare_op) {
1768 case Operation::kEqual:
1769 result = Equal(lhs, rhs, context, &var_type_feedback);
1771 case Operation::kStrictEqual:
1772 result = StrictEqual(lhs, rhs, &var_type_feedback);
1774 case Operation::kLessThan:
1775 case Operation::kGreaterThan:
1776 case Operation::kLessThanOrEqual:
1777 case Operation::kGreaterThanOrEqual:
1778 result = RelationalComparison(compare_op, lhs, rhs, context,
1779 &var_type_feedback);
1786 TNode<UintPtrT> slot_index = BytecodeOperandIdx(1);
1788 UpdateFeedback(var_type_feedback.value(),
1789 LoadFeedbackVectorOrUndefinedIfJitless(), slot_index, mode);
1793 BIND(&if_exception);
1795 slot_index = BytecodeOperandIdx(1);
1796 UpdateFeedback(var_type_feedback.value(),
1797 LoadFeedbackVectorOrUndefinedIfJitless(), slot_index,
1799 CallRuntime(Runtime::kReThrow, context, var_exception.value());
1809 CompareOpWithFeedback(Operation::kEqual);
1816 CompareOpWithFeedback(Operation::kStrictEqual);
1823 CompareOpWithFeedback(Operation::kLessThan);
1830 CompareOpWithFeedback(Operation::kGreaterThan);
1838 CompareOpWithFeedback(Operation::kLessThanOrEqual);
1846 CompareOpWithFeedback(Operation::kGreaterThanOrEqual);
1854 TNode<Object> lhs = LoadRegisterAtOperandIndex(0);
1855 TNode<Object> rhs = GetAccumulator();
1856 TNode<Boolean>
result = SelectBooleanConstant(TaggedEqual(lhs, rhs));
1866 TNode<Object> name = LoadRegisterAtOperandIndex(0);
1867 TNode<Object>
object = GetAccumulator();
1868 TNode<TaggedIndex> slot = BytecodeOperandIdxTaggedIndex(1);
1869 TNode<HeapObject> feedback_vector = LoadFeedbackVector();
1870 TNode<Context> context = GetContext();
1873 var_result = CallBuiltin(Builtin::kKeyedHasIC, context,
object, name, slot,
1875 SetAccumulator(var_result.value());
1884 TNode<Object>
object = LoadRegisterAtOperandIndex(0);
1885 TNode<JSAny> callable =
CAST(GetAccumulator());
1886 TNode<Context> context = GetContext();
1889 TNode<Union<FeedbackVector, Undefined>> maybe_feedback_vector =
1890 LoadFeedbackVector();
1891 TNode<UintPtrT> slot_id = BytecodeOperandIdx(1);
1892 CollectInstanceOfFeedback(callable, context, maybe_feedback_vector, slot_id);
1895 SetAccumulator(InstanceOf(
object, callable, context));
1904 Label return_false(
this),
end(
this);
1905 TNode<Object>
object = GetAccumulator();
1908 SetAccumulator(FalseConstant());
1909 GotoIf(TaggedIsSmi(
object), &
end);
1913 SelectBooleanConstant(IsUndetectableMap(LoadMap(
CAST(
object))));
1925 TNode<Object>
object = GetAccumulator();
1927 SelectBooleanConstant(TaggedEqual(
object, NullConstant()));
1936 TNode<Object>
object = GetAccumulator();
1948 TNode<Object>
object = GetAccumulator();
1949 TNode<Uint32T> literal_flag = BytecodeOperandFlag8(0);
1951#define MAKE_LABEL(name, lower_case) Label if_##lower_case(this);
1955#define LABEL_POINTER(name, lower_case) &if_##lower_case,
1959#define CASE(name, lower_case) \
1960 static_cast<int32_t>(TestTypeOfFlags::LiteralFlag::k##name),
1964 Label if_true(
this), if_false(
this),
end(
this);
1969 unsigned const num_cases =
arraysize(cases);
1970 CSA_DCHECK(
this, Uint32LessThan(literal_flag, Int32Constant(num_cases)));
1971 Switch(literal_flag, labels[num_cases - 1], cases, labels, num_cases - 1);
1975 Comment(
"IfNumber");
1976 GotoIfNumber(
object, &if_true);
1981 Comment(
"IfString");
1982 GotoIf(TaggedIsSmi(
object), &if_false);
1983 Branch(IsString(
CAST(
object)), &if_true, &if_false);
1987 Comment(
"IfSymbol");
1988 GotoIf(TaggedIsSmi(
object), &if_false);
1989 Branch(IsSymbol(
CAST(
object)), &if_true, &if_false);
1993 Comment(
"IfBoolean");
1994 GotoIf(TaggedEqual(
object, TrueConstant()), &if_true);
1995 Branch(TaggedEqual(
object, FalseConstant()), &if_true, &if_false);
1999 Comment(
"IfBigInt");
2000 GotoIf(TaggedIsSmi(
object), &if_false);
2001 Branch(IsBigInt(
CAST(
object)), &if_true, &if_false);
2003 BIND(&if_undefined);
2005 Comment(
"IfUndefined");
2006 GotoIf(TaggedIsSmi(
object), &if_false);
2008 GotoIf(
IsNull(
object), &if_false);
2009 Branch(IsUndetectableMap(LoadMap(
CAST(
object))), &if_true, &if_false);
2013 Comment(
"IfFunction");
2014 GotoIf(TaggedIsSmi(
object), &if_false);
2016 TNode<Int32T> map_bitfield = LoadMapBitField(LoadMap(
CAST(
object)));
2017 TNode<Int32T> callable_undetectable = Word32And(
2018 map_bitfield, Int32Constant(Map::Bits1::IsUndetectableBit::kMask |
2019 Map::Bits1::IsCallableBit::kMask));
2021 Int32Constant(Map::Bits1::IsCallableBit::kMask)),
2022 &if_true, &if_false);
2026 Comment(
"IfObject");
2027 GotoIf(TaggedIsSmi(
object), &if_false);
2030 GotoIf(
IsNull(
object), &if_true);
2033 TNode<Map> map = LoadMap(
CAST(
object));
2034 GotoIfNot(IsJSReceiverMap(map), &if_false);
2035 TNode<Int32T> map_bitfield = LoadMapBitField(map);
2036 TNode<Int32T> callable_undetectable = Word32And(
2037 map_bitfield, Int32Constant(Map::Bits1::IsUndetectableBit::kMask |
2038 Map::Bits1::IsCallableBit::kMask));
2039 Branch(
Word32Equal(callable_undetectable, Int32Constant(0)), &if_true,
2050 SetAccumulator(FalseConstant());
2055 SetAccumulator(TrueConstant());
2066 TNode<IntPtrT> relative_jump =
Signed(BytecodeOperandUImmWord(0));
2067 Jump(relative_jump);
2075 TNode<IntPtrT> relative_jump = LoadAndUntagConstantPoolEntryAtOperandIndex(0);
2076 Jump(relative_jump);
2085 TNode<Object> accumulator = GetAccumulator();
2087 JumpIfTaggedEqual(accumulator, TrueConstant(), 0);
2096 TNode<Object> accumulator = GetAccumulator();
2098 JumpIfTaggedEqualConstant(accumulator, TrueConstant(), 0);
2107 TNode<Object> accumulator = GetAccumulator();
2109 JumpIfTaggedEqual(accumulator, FalseConstant(), 0);
2118 TNode<Object> accumulator = GetAccumulator();
2120 JumpIfTaggedEqualConstant(accumulator, FalseConstant(), 0);
2128 TNode<Object> value = GetAccumulator();
2129 Label if_true(
this), if_false(
this);
2130 BranchIfToBooleanIsTrue(value, &if_true, &if_false);
2132 TNode<IntPtrT> relative_jump =
Signed(BytecodeOperandUImmWord(0));
2133 Jump(relative_jump);
2144 TNode<Object> value = GetAccumulator();
2145 Label if_true(
this), if_false(
this);
2146 BranchIfToBooleanIsTrue(value, &if_true, &if_false);
2148 TNode<IntPtrT> relative_jump = LoadAndUntagConstantPoolEntryAtOperandIndex(0);
2149 Jump(relative_jump);
2159 TNode<Object> value = GetAccumulator();
2160 Label if_true(
this), if_false(
this);
2161 BranchIfToBooleanIsTrue(value, &if_true, &if_false);
2165 TNode<IntPtrT> relative_jump =
Signed(BytecodeOperandUImmWord(0));
2166 Jump(relative_jump);
2175 TNode<Object> value = GetAccumulator();
2176 Label if_true(
this), if_false(
this);
2177 BranchIfToBooleanIsTrue(value, &if_true, &if_false);
2181 TNode<IntPtrT> relative_jump = LoadAndUntagConstantPoolEntryAtOperandIndex(0);
2182 Jump(relative_jump);
2190 TNode<Object> accumulator = GetAccumulator();
2191 JumpIfTaggedEqual(accumulator, NullConstant(), 0);
2199 TNode<Object> accumulator = GetAccumulator();
2200 JumpIfTaggedEqualConstant(accumulator, NullConstant(), 0);
2208 TNode<Object> accumulator = GetAccumulator();
2209 JumpIfTaggedNotEqual(accumulator, NullConstant(), 0);
2217 TNode<Object> accumulator = GetAccumulator();
2218 JumpIfTaggedNotEqualConstant(accumulator, NullConstant(), 0);
2226 TNode<Object> accumulator = GetAccumulator();
2235 TNode<Object> accumulator = GetAccumulator();
2244 TNode<Object> accumulator = GetAccumulator();
2254 TNode<Object> accumulator = GetAccumulator();
2263 TNode<Object> accumulator = GetAccumulator();
2265 Label do_jump(
this);
2266 GotoIf(IsUndefined(accumulator), &do_jump);
2267 GotoIf(
IsNull(accumulator), &do_jump);
2271 TNode<IntPtrT> relative_jump =
Signed(BytecodeOperandUImmWord(0));
2272 Jump(relative_jump);
2281 TNode<Object> accumulator = GetAccumulator();
2283 Label do_jump(
this);
2284 GotoIf(IsUndefined(accumulator), &do_jump);
2285 GotoIf(
IsNull(accumulator), &do_jump);
2289 TNode<IntPtrT> relative_jump = LoadAndUntagConstantPoolEntryAtOperandIndex(0);
2290 Jump(relative_jump);
2298 TNode<Object> accumulator = GetAccumulator();
2300 Label if_object(
this), if_notobject(
this, Label::kDeferred), if_notsmi(
this);
2301 Branch(TaggedIsSmi(accumulator), &if_notobject, &if_notsmi);
2304 Branch(IsJSReceiver(
CAST(accumulator)), &if_object, &if_notobject);
2306 TNode<IntPtrT> relative_jump =
Signed(BytecodeOperandUImmWord(0));
2307 Jump(relative_jump);
2309 BIND(&if_notobject);
2318 TNode<Object> accumulator = GetAccumulator();
2320 Label if_object(
this), if_notobject(
this), if_notsmi(
this);
2321 Branch(TaggedIsSmi(accumulator), &if_notobject, &if_notsmi);
2324 Branch(IsJSReceiver(
CAST(accumulator)), &if_object, &if_notobject);
2327 TNode<IntPtrT> relative_jump = LoadAndUntagConstantPoolEntryAtOperandIndex(0);
2328 Jump(relative_jump);
2330 BIND(&if_notobject);
2339 TNode<Object> index = LoadRegisterAtOperandIndex(1);
2340 TNode<Object> cache_length = LoadRegisterAtOperandIndex(2);
2343 Label if_done(
this), if_not_done(
this),
end(
this);
2344 Branch(TaggedEqual(index, cache_length), &if_done, &if_not_done);
2347 TNode<IntPtrT> relative_jump =
Signed(BytecodeOperandUImmWord(0));
2348 Jump(relative_jump);
2359 TNode<Object> index = LoadRegisterAtOperandIndex(1);
2360 TNode<Object> cache_length = LoadRegisterAtOperandIndex(2);
2363 Label if_done(
this), if_not_done(
this),
end(
this);
2364 Branch(TaggedEqual(index, cache_length), &if_done, &if_not_done);
2367 TNode<IntPtrT> relative_jump = LoadAndUntagConstantPoolEntryAtOperandIndex(0);
2368 Jump(relative_jump);
2379 TNode<IntPtrT> relative_jump =
Signed(BytecodeOperandUImmWord(0));
2384 TVARIABLE(HeapObject, maybe_feedback_vector);
2386 Label fbv_loaded(
this);
2389 maybe_feedback_vector = LoadFeedbackVector();
2391 GotoIfNot(IsUndefined(maybe_feedback_vector.value()), &fbv_loaded);
2392 maybe_feedback_vector =
2400 TNode<FeedbackVector> feedback_vector =
CAST(maybe_feedback_vector.value());
2401 TNode<Int8T> osr_state = LoadOsrState(feedback_vector);
2402 TNode<Int32T> loop_depth = BytecodeOperandImm(1);
2404 Label maybe_osr_because_osr_state(
this, Label::kDeferred);
2407 static_assert(FeedbackVector::MaybeHasMaglevOsrCodeBit::encode(
true) >
2409 static_assert(FeedbackVector::MaybeHasTurbofanOsrCodeBit::encode(
true) >
2412 GotoIfNot(Uint32GreaterThanOrEqual(loop_depth, osr_state),
2413 &maybe_osr_because_osr_state);
2416 Label maybe_osr_because_baseline(
this);
2417 TNode<SharedFunctionInfo> sfi = LoadObjectField<SharedFunctionInfo>(
2418 LoadFunctionClosure(), JSFunction::kSharedFunctionInfoOffset);
2419 Branch(SharedFunctionInfoHasBaselineCode(sfi), &maybe_osr_because_baseline,
2427 JumpBackward(relative_jump);
2430 BIND(&maybe_osr_because_baseline);
2432 TNode<Context> context = GetContext();
2433 TNode<IntPtrT> slot_index =
Signed(BytecodeOperandIdx(2));
2434 OnStackReplacement(context, feedback_vector, relative_jump, loop_depth,
2435 slot_index, osr_state,
2436 OnStackReplacementParams::kBaselineCodeIsCached);
2439 BIND(&maybe_osr_because_osr_state);
2441 TNode<Context> context = GetContext();
2442 TNode<IntPtrT> slot_index =
Signed(BytecodeOperandIdx(2));
2443 OnStackReplacement(context, feedback_vector, relative_jump, loop_depth,
2444 slot_index, osr_state,
2445 OnStackReplacementParams::kDefault);
2459 TNode<Object> acc = GetAccumulator();
2460 TNode<UintPtrT> table_start = BytecodeOperandIdx(0);
2461 TNode<UintPtrT> table_length = BytecodeOperandUImmWord(1);
2462 TNode<IntPtrT> case_value_base = BytecodeOperandImmIntPtr(2);
2464 Label fall_through(
this);
2474 TNode<IntPtrT> case_value = IntPtrSub(
SmiUntag(
CAST(acc)), case_value_base);
2476 GotoIf(
IntPtrLessThan(case_value, IntPtrConstant(0)), &fall_through);
2477 GotoIf(IntPtrGreaterThanOrEqual(case_value, table_length), &fall_through);
2479 TNode<WordT> entry =
IntPtrAdd(table_start, case_value);
2480 TNode<IntPtrT> relative_jump = LoadAndUntagConstantPoolEntry(entry);
2481 Jump(relative_jump);
2483 BIND(&fall_through);
2492 TNode<String>
pattern =
CAST(LoadConstantPoolEntryAtOperandIndex(0));
2493 TNode<HeapObject> feedback_vector = LoadFeedbackVector();
2494 TNode<TaggedIndex> slot = BytecodeOperandIdxTaggedIndex(1);
2497 TNode<Context> context = GetContext();
2501 ConstructorBuiltinsAssembler constructor_assembler(
state());
2502 result = constructor_assembler.CreateRegExpLiteral(feedback_vector, slot,
2504 SetAccumulator(
result.value());
2513 TNode<HeapObject> feedback_vector = LoadFeedbackVector();
2514 TNode<TaggedIndex> slot = BytecodeOperandIdxTaggedIndex(1);
2515 TNode<Context> context = GetContext();
2516 TNode<Uint32T> bytecode_flags = BytecodeOperandFlag8(2);
2518 Label fast_shallow_clone(
this), slow_clone(
this, Label::kDeferred),
2519 call_runtime(
this, Label::kDeferred);
2521 TNode<UintPtrT> flags_raw =
2522 DecodeWordFromWord32<CreateArrayLiteralFlags::FlagsBits>(bytecode_flags);
2523 TNode<Smi> flags = SmiTag(
Signed(flags_raw));
2524 TNode<Object> array_boilerplate_description =
2525 LoadConstantPoolEntryAtOperandIndex(0);
2528 GotoIf(IsUndefined(feedback_vector), &call_runtime);
2530 Branch(IsSetWord32<CreateArrayLiteralFlags::FastCloneSupportedBit>(
2532 &fast_shallow_clone, &slow_clone);
2534 BIND(&fast_shallow_clone);
2536 ConstructorBuiltinsAssembler constructor_assembler(
state());
2537 TNode<JSArray>
result = constructor_assembler.CreateShallowArrayLiteral(
2547 Builtin::kCreateArrayFromSlowBoilerplate, context, feedback_vector,
2548 slot, array_boilerplate_description, flags));
2554 BIND(&call_runtime);
2557 CallRuntime(Runtime::kCreateArrayLiteral, context, feedback_vector,
2558 slot, array_boilerplate_description, flags);
2568 TNode<Union<FeedbackVector, Undefined>> maybe_feedback_vector =
2569 LoadFeedbackVector();
2570 TNode<TaggedIndex> slot = BytecodeOperandIdxTaggedIndex(0);
2571 TNode<Context> context = GetContext();
2573 Label no_feedback(
this, Label::kDeferred),
end(
this);
2575 GotoIf(IsUndefined(maybe_feedback_vector), &no_feedback);
2577 ConstructorBuiltinsAssembler constructor_assembler(
state());
2578 result = constructor_assembler.CreateEmptyArrayLiteral(
2579 CAST(maybe_feedback_vector), slot, context);
2585 LoadNativeContext(context));
2586 TNode<Smi> length = SmiConstant(0);
2587 TNode<IntPtrT> capacity = IntPtrConstant(0);
2594 SetAccumulator(
result.value());
2603 TNode<Object> iterable = GetAccumulator();
2604 TNode<Context> context = GetContext();
2606 CallBuiltin(Builtin::kIterableToListWithSymbolLookup, context, iterable);
2616 TNode<HeapObject> feedback_vector = LoadFeedbackVector();
2617 TNode<Context> context = GetContext();
2618 TNode<TaggedIndex> slot = BytecodeOperandIdxTaggedIndex(1);
2619 TNode<Uint32T> bytecode_flags = BytecodeOperandFlag8(2);
2621 TNode<ObjectBoilerplateDescription> object_boilerplate_description =
2622 CAST(LoadConstantPoolEntryAtOperandIndex(0));
2623 TNode<UintPtrT> flags_raw =
2624 DecodeWordFromWord32<CreateObjectLiteralFlags::FlagsBits>(bytecode_flags);
2625 TNode<Smi> flags = SmiTag(
Signed(flags_raw));
2627 Label fast_shallow_clone(
this), Slow_clone(
this, Label::kDeferred),
2628 call_runtime(
this, Label::kDeferred);
2631 GotoIf(IsUndefined(feedback_vector), &call_runtime);
2634 Branch(IsSetWord32<CreateObjectLiteralFlags::FastCloneSupportedBit>(
2636 &fast_shallow_clone, &Slow_clone);
2638 BIND(&fast_shallow_clone);
2641 ConstructorBuiltinsAssembler constructor_assembler(
state());
2642 TNode<HeapObject>
result = constructor_assembler.CreateShallowObjectLiteral(
2643 CAST(feedback_vector), slot, &call_runtime);
2651 Builtin::kCreateObjectFromSlowBoilerplate, context, feedback_vector,
2652 slot, object_boilerplate_description, flags));
2657 BIND(&call_runtime);
2660 CallRuntime(Runtime::kCreateObjectLiteral, context, feedback_vector,
2661 slot, object_boilerplate_description, flags);
2672 TNode<Context> context = GetContext();
2673 ConstructorBuiltinsAssembler constructor_assembler(
state());
2675 constructor_assembler.CreateEmptyObjectLiteral(context);
2685 TNode<Object> source = LoadRegisterAtOperandIndex(0);
2686 TNode<Uint32T> bytecode_flags = BytecodeOperandFlag8(1);
2687 TNode<UintPtrT> raw_flags =
2688 DecodeWordFromWord32<CreateObjectLiteralFlags::FlagsBits>(bytecode_flags);
2689 TNode<Smi> smi_flags = SmiTag(
Signed(raw_flags));
2690 TNode<TaggedIndex> slot = BytecodeOperandIdxTaggedIndex(2);
2691 TNode<Union<FeedbackVector, Undefined>> maybe_feedback_vector =
2692 LoadFeedbackVector();
2693 TNode<Context> context = GetContext();
2695 TNode<Object>
result = CallBuiltin(Builtin::kCloneObjectIC, context, source,
2696 smi_flags, slot, maybe_feedback_vector);
2707 TNode<Context> context = GetContext();
2708 TNode<JSFunction> closure = LoadFunctionClosure();
2709 TNode<SharedFunctionInfo> shared_info = LoadObjectField<SharedFunctionInfo>(
2710 closure, JSFunction::kSharedFunctionInfoOffset);
2711 TNode<Object> description = LoadConstantPoolEntryAtOperandIndex(0);
2712 TNode<UintPtrT> slot = BytecodeOperandIdx(1);
2713 TNode<Union<FeedbackVector, Undefined>> maybe_feedback_vector =
2714 LoadFeedbackVector();
2716 CallBuiltin(Builtin::kGetTemplateObject, context, shared_info,
2717 description, slot, maybe_feedback_vector);
2727 TNode<Object> shared = LoadConstantPoolEntryAtOperandIndex(0);
2728 TNode<Uint32T> flags = BytecodeOperandFlag8(2);
2729 TNode<Context> context = GetContext();
2730 TNode<UintPtrT> slot = BytecodeOperandIdx(1);
2732 Label if_undefined(
this);
2733 TNode<ClosureFeedbackCellArray> feedback_cell_array =
2734 LoadClosureFeedbackArray(LoadFunctionClosure());
2735 TNode<FeedbackCell> feedback_cell =
2736 LoadArrayElement(feedback_cell_array, slot);
2738 Label if_fast(
this), if_slow(
this, Label::kDeferred);
2739 Branch(IsSetWord32<CreateClosureFlags::FastNewClosureBit>(flags), &if_fast,
2745 CallBuiltin(Builtin::kFastNewClosure, context, shared, feedback_cell);
2752 Label if_newspace(
this), if_oldspace(
this);
2753 Branch(IsSetWord32<CreateClosureFlags::PretenuredBit>(flags), &if_oldspace,
2759 CallRuntime(Runtime::kNewClosure, context, shared, feedback_cell);
2766 TNode<Object>
result = CallRuntime(Runtime::kNewClosure_Tenured, context,
2767 shared, feedback_cell);
2778 TNode<ScopeInfo> scope_info =
CAST(LoadConstantPoolEntryAtOperandIndex(0));
2779 TNode<Context> context = GetContext();
2780 SetAccumulator(CallRuntime(Runtime::kPushBlockContext, context, scope_info));
2789 TNode<Object> exception = LoadRegisterAtOperandIndex(0);
2790 TNode<ScopeInfo> scope_info =
CAST(LoadConstantPoolEntryAtOperandIndex(1));
2791 TNode<Context> context = GetContext();
2793 CallRuntime(Runtime::kPushCatchContext, context, exception, scope_info));
2801 TNode<UintPtrT> scope_info_idx = BytecodeOperandIdx(0);
2802 TNode<ScopeInfo> scope_info =
CAST(LoadConstantPoolEntry(scope_info_idx));
2803 TNode<Uint32T> slots = BytecodeOperandUImm(1);
2804 TNode<Context> context = GetContext();
2805 ConstructorBuiltinsAssembler constructor_assembler(
state());
2806 SetAccumulator(constructor_assembler.FastNewFunctionContext(
2815 TNode<UintPtrT> scope_info_idx = BytecodeOperandIdx(0);
2816 TNode<ScopeInfo> scope_info =
CAST(LoadConstantPoolEntry(scope_info_idx));
2817 TNode<Uint32T> slots = BytecodeOperandUImm(1);
2818 TNode<Context> context = GetContext();
2819 ConstructorBuiltinsAssembler constructor_assembler(
state());
2820 SetAccumulator(constructor_assembler.FastNewFunctionContext(
2830 TNode<Object>
object = LoadRegisterAtOperandIndex(0);
2831 TNode<ScopeInfo> scope_info =
CAST(LoadConstantPoolEntryAtOperandIndex(1));
2832 TNode<Context> context = GetContext();
2834 CallRuntime(Runtime::kPushWithContext, context,
object, scope_info));
2842 TNode<JSFunction> closure = LoadFunctionClosure();
2843 TNode<Context> context = GetContext();
2845 Label if_duplicate_parameters(
this, Label::kDeferred);
2846 Label if_not_duplicate_parameters(
this);
2851 TNode<SharedFunctionInfo> shared_info = LoadObjectField<SharedFunctionInfo>(
2852 closure, JSFunction::kSharedFunctionInfoOffset);
2853 TNode<Uint32T> flags =
2854 LoadObjectField<Uint32T>(shared_info, SharedFunctionInfo::kFlagsOffset);
2856 IsSetWord32<SharedFunctionInfo::HasDuplicateParametersBit>(flags);
2858 &if_not_duplicate_parameters);
2860 BIND(&if_not_duplicate_parameters);
2862 TNode<JSObject>
result = EmitFastNewSloppyArguments(context, closure);
2867 BIND(&if_duplicate_parameters);
2870 CallRuntime(Runtime::kNewSloppyArguments, context, closure);
2880 TNode<Context> context = GetContext();
2881 TNode<JSFunction> closure = LoadFunctionClosure();
2882 TorqueGeneratedExportedMacrosAssembler builtins_assembler(
state());
2884 builtins_assembler.EmitFastNewStrictArguments(context, closure);
2893 TNode<JSFunction> closure = LoadFunctionClosure();
2894 TNode<Context> context = GetContext();
2895 TorqueGeneratedExportedMacrosAssembler builtins_assembler(
state());
2897 builtins_assembler.EmitFastNewRestArguments(context, closure);
2907 TNode<HeapObject> previous_message = GetPendingMessage();
2908 SetPendingMessage(
CAST(GetAccumulator()));
2909 SetAccumulator(previous_message);
2917 TNode<Object> exception = GetAccumulator();
2918 TNode<Context> context = GetContext();
2919 CallRuntime(Runtime::kThrow, context, exception);
2921 Abort(AbortReason::kUnexpectedReturnFromThrow);
2929 TNode<Object> exception = GetAccumulator();
2930 TNode<Context> context = GetContext();
2931 CallRuntime(Runtime::kReThrow, context, exception);
2933 Abort(AbortReason::kUnexpectedReturnFromThrow);
2941 TNode<UintPtrT> reason = BytecodeOperandIdx(0);
2942 CallRuntime(Runtime::kAbort, NoContextConstant(), SmiTag(
Signed(reason)));
2950 UpdateInterruptBudgetOnReturn();
2951 TNode<Object> accumulator = GetAccumulator();
2952 Return(accumulator);
2959 TNode<Object> value = GetAccumulator();
2961 Label throw_error(
this, Label::kDeferred);
2962 GotoIf(TaggedEqual(value, TheHoleConstant()), &throw_error);
2967 TNode<Name> name =
CAST(LoadConstantPoolEntryAtOperandIndex(0));
2968 CallRuntime(Runtime::kThrowAccessedUninitializedVariable, GetContext(),
2971 Abort(AbortReason::kUnexpectedReturnFromThrow);
2980 TNode<Object> value = GetAccumulator();
2982 Label throw_error(
this, Label::kDeferred);
2983 GotoIf(TaggedEqual(value, TheHoleConstant()), &throw_error);
2988 CallRuntime(Runtime::kThrowSuperNotCalled, GetContext());
2990 Abort(AbortReason::kUnexpectedReturnFromThrow);
3000 TNode<Object> value = GetAccumulator();
3002 Label throw_error(
this, Label::kDeferred);
3003 GotoIf(TaggedNotEqual(value, TheHoleConstant()), &throw_error);
3008 CallRuntime(Runtime::kThrowSuperAlreadyCalledError, GetContext());
3010 Abort(AbortReason::kUnexpectedReturnFromThrow);
3020 TNode<HeapObject> constructor =
CAST(LoadRegisterAtOperandIndex(0));
3021 TNode<Context> context = GetContext();
3023 Label is_not_constructor(
this, Label::kDeferred);
3024 TNode<Map> constructor_map = LoadMap(constructor);
3025 GotoIfNot(IsConstructorMap(constructor_map), &is_not_constructor);
3028 BIND(&is_not_constructor);
3030 TNode<JSFunction> function = LoadFunctionClosure();
3031 CallRuntime(Runtime::kThrowNotSuperConstructor, context, constructor,
3034 Abort(AbortReason::kUnexpectedReturnFromThrow);
3046IGNITION_HANDLER(FindNonDefaultConstructorOrConstruct, InterpreterAssembler) {
3047 TNode<Context> context = GetContext();
3049 Label found_default_base_ctor(
this, &constructor),
3050 found_something_else(
this, &constructor);
3052 TNode<JSFunction> this_function =
CAST(LoadRegisterAtOperandIndex(0));
3054 FindNonDefaultConstructor(this_function, constructor,
3055 &found_default_base_ctor, &found_something_else);
3057 BIND(&found_default_base_ctor);
3060 TNode<Object>
new_target = LoadRegisterAtOperandIndex(1);
3061 TNode<Object> instance = CallBuiltin(Builtin::kFastNewObject, context,
3064 StoreRegisterPairAtOperandIndex(TrueConstant(), instance, 2);
3068 BIND(&found_something_else);
3071 StoreRegisterPairAtOperandIndex(FalseConstant(), constructor.value(), 2);
3080 TNode<Context> context = GetContext();
3082 CallRuntime(Runtime::kHandleDebuggerStatement, context);
3083 ClobberAccumulator(
result);
3090#define DEBUG_BREAK(Name, ...) \
3091 IGNITION_HANDLER(Name, InterpreterAssembler) { \
3092 TNode<Context> context = GetContext(); \
3093 TNode<Object> accumulator = GetAccumulator(); \
3094 TNode<PairT<Object, Smi>> result_pair = CallRuntime<PairT<Object, Smi>>( \
3095 Runtime::kDebugBreakOnBytecode, context, accumulator); \
3096 TNode<Object> return_value = Projection<0>(result_pair); \
3097 TNode<IntPtrT> original_bytecode = SmiUntag(Projection<1>(result_pair)); \
3098 SetAccumulator(return_value); \
3099 DispatchToBytecodeWithOptionalStarLookahead(original_bytecode); \
3109 TNode<JSFunction> closure = LoadFunctionClosure();
3110 TNode<Smi> coverage_array_slot = BytecodeOperandIdxSmi(0);
3111 TNode<Context> context = GetContext();
3113 CallBuiltin(Builtin::kIncBlockCounter, context, closure, coverage_array_slot);
3124 TNode<JSReceiver>
receiver =
CAST(LoadRegisterAtOperandIndex(0));
3125 TNode<Context> context = GetContext();
3127 Label if_empty(
this), if_runtime(
this, Label::kDeferred);
3128 TNode<Map> receiver_map = CheckEnumCache(
receiver, &if_empty, &if_runtime);
3129 SetAccumulator(receiver_map);
3134 TNode<FixedArray>
result = EmptyFixedArrayConstant();
3142 CallRuntime(Runtime::kForInEnumerate, context,
receiver);
3158 TNode<HeapObject> enumerator =
CAST(GetAccumulator());
3159 TNode<UintPtrT> vector_index = BytecodeOperandIdx(1);
3160 TNode<Union<FeedbackVector, Undefined>> maybe_feedback_vector =
3161 LoadFeedbackVector();
3163 TNode<HeapObject> cache_type = enumerator;
3164 TNode<FixedArray> cache_array;
3165 TNode<Smi> cache_length;
3166 ForInPrepare(enumerator, vector_index, maybe_feedback_vector, &cache_array,
3169 ClobberAccumulator(SmiConstant(0));
3171 StoreRegisterTripleAtOperandIndex(cache_type, cache_array, cache_length, 0);
3179 TNode<JSAnyNotSmi>
receiver =
CAST(LoadRegisterAtOperandIndex(0));
3180 TNode<Smi> index =
CAST(LoadRegisterAtOperandIndex(1));
3181 TNode<Object> cache_type;
3182 TNode<Object> cache_array;
3183 std::tie(cache_type, cache_array) = LoadRegisterPairAtOperandIndex(2);
3184 TNode<UintPtrT> vector_index = BytecodeOperandIdx(3);
3185 TNode<Union<FeedbackVector, Undefined>> maybe_feedback_vector =
3186 LoadFeedbackVector();
3189 TNode<JSAny>
key =
CAST(LoadFixedArrayElement(
CAST(cache_array), index, 0));
3192 Label if_fast(
this), if_slow(
this, Label::kDeferred);
3193 TNode<Map> receiver_map = LoadMap(
receiver);
3194 Branch(TaggedEqual(receiver_map, cache_type), &if_fast, &if_slow);
3198 SetAccumulator(
key);
3203 TNode<Object>
result = ForInNextSlow(GetContext(), vector_index,
receiver,
3204 key, cache_type, maybe_feedback_vector,
3216 TNode<Smi> index =
CAST(LoadRegisterAtOperandIndex(0));
3217 TNode<Smi>
one = SmiConstant(1);
3219 StoreRegisterAtOperandIndex(
result, 0);
3229 TNode<Object>
receiver = LoadRegisterAtOperandIndex(0);
3230 TNode<Context> context = GetContext();
3231 TNode<HeapObject> feedback_vector = LoadFeedbackVector();
3232 TNode<TaggedIndex> load_slot = BytecodeOperandIdxTaggedIndex(1);
3233 TNode<TaggedIndex> call_slot = BytecodeOperandIdxTaggedIndex(2);
3235 TNode<Object> iterator =
3236 CallBuiltin(Builtin::kGetIteratorWithFeedback, context,
receiver,
3237 load_slot, call_slot, feedback_vector);
3238 SetAccumulator(iterator);
3246 DispatchWide(OperandScale::kDouble);
3253 DispatchWide(OperandScale::kQuadruple);
3260 Abort(AbortReason::kInvalidBytecode);
3272 TNode<JSGeneratorObject> generator =
CAST(LoadRegisterAtOperandIndex(0));
3273 TNode<FixedArray> array =
CAST(LoadObjectField(
3274 generator, JSGeneratorObject::kParametersAndRegistersOffset));
3275 TNode<Context> context = GetContext();
3276 RegListNodePair
registers = GetRegisterListAtOperandIndex(1);
3277 TNode<Smi> suspend_id = BytecodeOperandUImmSmi(3);
3279 ExportParametersAndRegisterFile(array,
registers);
3280 StoreObjectField(generator, JSGeneratorObject::kContextOffset, context);
3281 StoreObjectField(generator, JSGeneratorObject::kContinuationOffset,
3286 TNode<Smi>
offset = SmiTag(BytecodeOffset());
3287 StoreObjectField(generator, JSGeneratorObject::kInputOrDebugPosOffset,
3290 Return(GetAccumulator());
3301 TNode<Object> maybe_generator = LoadRegisterAtOperandIndex(0);
3303 Label fallthrough(
this);
3306 TNode<JSGeneratorObject> generator =
CAST(maybe_generator);
3309 CAST(LoadObjectField(generator, JSGeneratorObject::kContinuationOffset));
3311 StoreObjectField(generator, JSGeneratorObject::kContinuationOffset,
3314 TNode<Context> context =
3315 CAST(LoadObjectField(generator, JSGeneratorObject::kContextOffset));
3316 SetContext(context);
3318 TNode<UintPtrT> table_start = BytecodeOperandIdx(1);
3319 TNode<UintPtrT> table_length = BytecodeOperandUImmWord(2);
3324 TNode<IntPtrT> case_value =
SmiUntag(state);
3331 TNode<WordT> entry =
IntPtrAdd(table_start, case_value);
3332 TNode<IntPtrT> relative_jump = LoadAndUntagConstantPoolEntry(entry);
3333 Jump(relative_jump);
3344 TNode<JSGeneratorObject> generator =
CAST(LoadRegisterAtOperandIndex(0));
3345 RegListNodePair
registers = GetRegisterListAtOperandIndex(1);
3348 CAST(LoadObjectField(generator,
3349 JSGeneratorObject::kParametersAndRegistersOffset)),
3354 LoadObjectField(generator, JSGeneratorObject::kInputOrDebugPosOffset));
3359#undef IGNITION_HANDLER
3371#define CALL_GENERATOR(Name, ...) \
3372 case Bytecode::k##Name: \
3373 Name##Assembler::Generate(state, operand_scale); \
3375#define CALL_GENERATOR_TS(Name, ...) \
3378 case Bytecode::k##Name: \
3379 code = compiler::turboshaft::BuildWithTurboshaftAssemblerImpl( \
3380 isolate, builtin, &Name##AssemblerTS_Generate, descriptor_builder, \
3381 debug_name, options, CodeKind::BYTECODE_HANDLER, \
3382 BytecodeHandlerData(bytecode, operand_scale)); \
3385#undef CALL_GENERATOR
3386#undef CALL_GENERATOR_TS
3387 case Bytecode::kIllegal:
3388 IllegalAssembler::Generate(state, operand_scale);
3390 case Bytecode::kStar0:
3391 Star0Assembler::Generate(state, operand_scale);
#define DEBUG_BREAK(Name,...)
#define CSA_SBXCHECK(csa,...)
#define CSA_DCHECK(csa,...)
#define TYPEOF_LITERAL_LIST(V)
#define BYTECODE_LIST_WITH_UNIQUE_HANDLERS(V, V_TSA)
#define DEBUG_BREAK_BYTECODE_LIST(V)
TNode< Object > Generate_ExponentiateWithFeedback(const LazyNode< Context > &context, TNode< Object > base, TNode< Object > exponent, TNode< UintPtrT > slot, const LazyNode< HeapObject > &maybe_feedback_vector, UpdateFeedbackMode update_feedback_mode, bool rhs_known_smi)
TNode< Object > Generate_DivideWithFeedback(const LazyNode< Context > &context, TNode< Object > dividend, TNode< Object > divisor, TNode< UintPtrT > slot, const LazyNode< HeapObject > &maybe_feedback_vector, UpdateFeedbackMode update_feedback_mode, bool rhs_known_smi)
TNode< Object > Generate_AddWithFeedback(const LazyNode< Context > &context, TNode< Object > left, TNode< Object > right, TNode< UintPtrT > slot, const LazyNode< HeapObject > &maybe_feedback_vector, UpdateFeedbackMode update_feedback_mode, bool rhs_known_smi)
TNode< Object > Generate_MultiplyWithFeedback(const LazyNode< Context > &context, TNode< Object > left, TNode< Object > right, TNode< UintPtrT > slot, const LazyNode< HeapObject > &maybe_feedback_vector, UpdateFeedbackMode update_feedback_mode, bool rhs_known_smi)
TNode< Object > Generate_SubtractWithFeedback(const LazyNode< Context > &context, TNode< Object > left, TNode< Object > right, TNode< UintPtrT > slot, const LazyNode< HeapObject > &maybe_feedback_vector, UpdateFeedbackMode update_feedback_mode, bool rhs_known_smi)
TNode< Object > Generate_ModulusWithFeedback(const LazyNode< Context > &context, TNode< Object > dividend, TNode< Object > divisor, TNode< UintPtrT > slot, const LazyNode< HeapObject > &maybe_feedback_vector, UpdateFeedbackMode update_feedback_mode, bool rhs_known_smi)
TNode< HeapObject > LoadFeedbackVector(TNode< JSFunction > closure)
static constexpr int kMaxOsrUrgency
static const int kGeneratorExecuting
static constexpr Tagged< Smi > FromEnum(E value)
static constexpr Register feedback_vector()
base::Vector< const DirectHandle< Object > > args
DirectHandle< Object > new_target
#define CALL_GENERATOR_TS(Name,...)
#define LABEL_POINTER(name, lower_case)
#define CALL_GENERATOR(Name,...)
#define IGNITION_HANDLER(Name, BaseAssembler)
#define MAKE_LABEL(name, lower_case)
ZoneVector< RpoNumber > & result
LiftoffAssembler::CacheState state
RegListBase< RegisterT > registers
constexpr std::make_signed_t< T > Signed(T value)
intptr_t IntPtrAdd(intptr_t a, intptr_t b)
bool IntPtrLessThan(intptr_t a, intptr_t b)
bool UintPtrLessThan(uintptr_t a, uintptr_t b)
bool Word32Equal(uint32_t a, uint32_t b)
TNode< Oddball > UndefinedConstant(JSGraph *jsgraph)
void GenerateBytecodeHandler(compiler::CodeAssemblerState *state, Bytecode bytecode, OperandScale operand_scale)
void BitwiseNotAssemblerTS_Generate(compiler::turboshaft::PipelineData *data, Isolate *isolate, compiler::turboshaft::Graph &graph, Zone *zone)
TNode< Object > GenerateInvokeIntrinsic(InterpreterAssembler *assembler, TNode< Uint32T > function_id, TNode< Context > context, const InterpreterAssembler::RegListNodePair &args)
Union< Smi, HeapNumber, BigInt, String, Symbol, Boolean, Null, Undefined, JSReceiver > JSAny
constexpr const char * ToString(DeoptimizeKind kind)
compiler::CodeAssemblerState CodeAssemblerState
int ToNumber(Register reg)
too high values may cause the compiler to set high thresholds for inlining to as much as possible avoid inlined allocation of objects that cannot escape trace load stores from virtual maglev objects use TurboFan fast string builder analyze liveness of environment slots and zap dead values trace TurboFan load elimination emit data about basic block usage in builtins to this enable builtin reordering when run mksnapshot flag for emit warnings when applying builtin profile data verify register allocation in TurboFan randomly schedule instructions to stress dependency tracking enable store store elimination in TurboFan rewrite far to near simulate GC compiler thread race related to allow float parameters to be passed in simulator mode JS Wasm Run additional turbo_optimize_inlined_js_wasm_wrappers enable experimental feedback collection in generic lowering enable Turboshaft s WasmLoadElimination enable Turboshaft s low level load elimination for JS enable Turboshaft s escape analysis for string concatenation use enable Turbolev features that we want to ship in the not too far future trace individual Turboshaft reduction steps trace intermediate Turboshaft reduction steps invocation count threshold for early optimization Enables optimizations which favor memory size over execution speed Enables sampling allocation profiler with X as a sample interval min size of a semi the new space consists of two semi spaces max size of the Collect garbage after Collect garbage after keeps maps alive for< n > old space garbage collections print one detailed trace line in name
too high values may cause the compiler to set high thresholds for inlining to as much as possible avoid inlined allocation of objects that cannot escape trace load stores from virtual maglev objects use TurboFan fast string builder analyze liveness of environment slots and zap dead values trace TurboFan load elimination emit data about basic block usage in builtins to this enable builtin reordering when run mksnapshot flag for emit warnings when applying builtin profile data verify register allocation in TurboFan randomly schedule instructions to stress dependency tracking enable store store elimination in TurboFan rewrite far to near simulate GC compiler thread race related to allow float parameters to be passed in simulator mode JS Wasm Run additional turbo_optimize_inlined_js_wasm_wrappers enable experimental feedback collection in generic lowering enable Turboshaft s WasmLoadElimination enable Turboshaft s low level load elimination for JS enable Turboshaft s escape analysis for string concatenation use enable Turbolev features that we want to ship in the not too far future trace individual Turboshaft reduction steps trace intermediate Turboshaft reduction steps invocation count threshold for early optimization Enables optimizations which favor memory size over execution speed Enables sampling allocation profiler with X as a sample interval min size of a semi the new space consists of two semi spaces max size of the Collect garbage after Collect garbage after keeps maps alive for< n > old space garbage collections print one detailed trace line in allocation gc speed threshold for starting incremental marking via a task in percent of available threshold for starting incremental marking immediately in percent of available Use a single schedule for determining a marking schedule between JS and C objects schedules the minor GC task with kUserVisible priority max worker number of concurrent for NumberOfWorkerThreads start background threads that allocate memory concurrent_array_buffer_sweeping use parallel threads to clear weak refs in the atomic pause trace progress of the incremental marking trace object counts and memory usage report a tick only when allocated zone memory changes by this amount TracingFlags::gc_stats TracingFlags::gc_stats track native contexts that are expected to be garbage collected verify heap pointers before and after GC memory reducer runs GC with ReduceMemoryFootprint flag Maximum number of memory reducer GCs scheduled Old gen GC speed is computed directly from gc tracer counters Perform compaction on full GCs based on V8 s default heuristics Perform compaction on every full GC Perform code space compaction when finalizing a full GC with stack Stress GC compaction to flush out bugs with moving objects flush of baseline code when it has not been executed recently Use time base code flushing instead of age Use a progress bar to scan large objects in increments when incremental marking is active force incremental marking for small heaps and run it more often force marking at random points between and force scavenge at random points between and reclaim otherwise unreachable unmodified wrapper objects when possible less compaction in non memory reducing mode use high priority threads for concurrent Marking Test mode only flag It allows an unit test to select evacuation candidates use incremental marking for CppHeap cppheap_concurrent_marking c value for membalancer A special constant to balance between memory and space tradeoff The smaller the more memory it uses enable use of SSE4 instructions if available enable use of AVX VNNI instructions if available enable use of POPCNT instruction if available force all emitted branches to be in long mode(MIPS/PPC only)") DEFINE_BOOL(partial_constant_pool
Handle< To > UncheckedCast(Handle< From > value)
SharedFunctionInfo::HasStaticPrivateMethodsOrAccessorsBit SharedFunctionInfo::MaglevCompilationFailedBit SharedFunctionInfo::FunctionSyntaxKindBits has_duplicate_parameters
ElementsKind GetInitialFastElementsKind()
kInstanceDescriptorsOffset kTransitionsOrPrototypeInfoOffset IsNull(value)||IsJSProxy(value)||IsWasmObject(value)||(IsJSObject(value) &&(HeapLayout
!IsContextMap !IsContextMap native_context
#define DCHECK_EQ(v1, v2)