@@ -409,23 +409,24 @@ class Lowerer
409409 }
410410
411411private:
412- IR::IndirOpnd * GenerateFastElemICommon (
413- IR::Instr * ldElem,
414- bool isStore,
415- IR::IndirOpnd * indirOpnd,
416- IR::LabelInstr * labelHelper,
417- IR::LabelInstr * labelCantUseArray,
418- IR::LabelInstr *labelFallthrough,
419- bool * pIsTypedArrayElement,
420- bool * pIsStringIndex,
421- bool *emitBailoutRef,
422- IR::Opnd** maskOpnd,
423- IR::LabelInstr **pLabelSegmentLengthIncreased = nullptr ,
424- bool checkArrayLengthOverflow = true ,
425- bool forceGenerateFastPath = false ,
426- bool returnLength = false ,
427- IR::LabelInstr *bailOutLabelInstr = nullptr ,
428- bool * indirOpndOverflowed = nullptr );
412+ IR::IndirOpnd* GenerateFastElemICommon (
413+ _In_ IR::Instr* elemInstr,
414+ _In_ bool isStore,
415+ _In_ IR::IndirOpnd* indirOpnd,
416+ _In_ IR::LabelInstr* labelHelper,
417+ _In_ IR::LabelInstr* labelCantUseArray,
418+ _In_opt_ IR::LabelInstr* labelFallthrough,
419+ _Out_ bool * pIsTypedArrayElement,
420+ _Out_ bool * pIsStringIndex,
421+ _Out_opt_ bool * emitBailoutRef,
422+ _Outptr_opt_result_maybenull_ IR::Opnd** maskOpnd,
423+ _Outptr_opt_result_maybenull_ IR::LabelInstr** pLabelSegmentLengthIncreased = nullptr ,
424+ _In_ bool checkArrayLengthOverflow = true ,
425+ _In_ bool forceGenerateFastPath = false ,
426+ _In_ bool returnLength = false ,
427+ _In_opt_ IR::LabelInstr* bailOutLabelInstr = nullptr ,
428+ _Out_opt_ bool * indirOpndOverflowed = nullptr ,
429+ _In_ Js::FldInfoFlags flags = Js::FldInfo_NoInfo);
429430
430431 IR::IndirOpnd * GenerateFastElemIIntIndexCommon (
431432 IR::Instr * ldElem,
@@ -444,11 +445,55 @@ class Lowerer
444445 IR::LabelInstr *bailOutLabelInstr = nullptr ,
445446 bool * indirOpndOverflowed = nullptr );
446447
447- IR::IndirOpnd * GenerateFastElemIStringIndexCommon (IR::Instr * ldElem, bool isStore, IR::IndirOpnd * indirOpnd, IR::LabelInstr * labelHelper);
448- IR::IndirOpnd * GenerateFastElemISymbolIndexCommon (IR::Instr * ldElem, bool isStore, IR::IndirOpnd * indirOpnd, IR::LabelInstr * labelHelper);
448+ IR::IndirOpnd* GenerateFastElemIStringIndexCommon (
449+ _In_ IR::Instr* elemInstr,
450+ _In_ bool isStore,
451+ _In_ IR::IndirOpnd* indirOpnd,
452+ _In_ IR::LabelInstr* labelHelper,
453+ _In_ Js::FldInfoFlags flags);
454+
455+ IR::IndirOpnd* GenerateFastElemISymbolIndexCommon (
456+ _In_ IR::Instr* elemInstr,
457+ _In_ bool isStore,
458+ _In_ IR::IndirOpnd* indirOpnd,
459+ _In_ IR::LabelInstr* labelHelper,
460+ _In_ Js::FldInfoFlags flags);
461+
462+ IR::IndirOpnd* GenerateFastElemISymbolOrStringIndexCommon (
463+ _In_ IR::Instr* instrInsert,
464+ _In_ IR::RegOpnd* indexOpnd,
465+ _In_ IR::RegOpnd* baseOpnd,
466+ _In_ const uint32 inlineCacheOffset,
467+ _In_ const uint32 hitRateOffset,
468+ _In_ IR::LabelInstr* labelHelper,
469+ _In_ Js::FldInfoFlags flags);
470+
471+ void GenerateLookUpInIndexCache (
472+ _In_ IR::Instr* instrInsert,
473+ _In_ IR::RegOpnd* indexOpnd,
474+ _In_ IR::RegOpnd* baseOpnd,
475+ _In_opt_ IR::RegOpnd* opndSlotArray,
476+ _In_opt_ IR::RegOpnd* opndSlotIndex,
477+ _In_ const uint32 inlineCacheOffset,
478+ _In_ const uint32 hitRateOffset,
479+ _In_ IR::LabelInstr* labelHelper,
480+ _In_ Js::FldInfoFlags flags = Js::FldInfo_NoInfo);
481+
482+ template <bool CheckLocal, bool CheckInlineSlot, bool DoAdd>
483+ void GenerateLookUpInIndexCacheHelper (
484+ _In_ IR::Instr* instrInsert,
485+ _In_ IR::RegOpnd* baseOpnd,
486+ _In_opt_ IR::RegOpnd* opndSlotArray,
487+ _In_opt_ IR::RegOpnd* opndSlotIndex,
488+ _In_ IR::RegOpnd* objectTypeOpnd,
489+ _In_ IR::RegOpnd* inlineCacheOpnd,
490+ _In_ IR::LabelInstr* doneLabel,
491+ _In_ IR::LabelInstr* helperLabel,
492+ _Outptr_ IR::LabelInstr** nextLabel,
493+ _Outptr_ IR::BranchInstr** branchToPatch,
494+ _Inout_ IR::RegOpnd** taggedTypeOpnd);
495+
449496 void GenerateFastIsInSymbolOrStringIndex (IR::Instr * instrInsert, IR::RegOpnd *indexOpnd, IR::RegOpnd *baseOpnd, IR::Opnd *dest, uint32 inlineCacheOffset, const uint32 hitRateOffset, IR::LabelInstr * labelHelper, IR::LabelInstr * labelDone);
450- IR::IndirOpnd * GenerateFastElemISymbolOrStringIndexCommon (IR::Instr * instrInsert, IR::RegOpnd *indexOpnd, IR::RegOpnd *baseOpnd, const uint32 inlineCacheOffset, const uint32 hitRateOffset, IR::LabelInstr * labelHelper);
451- void GenerateLookUpInIndexCache (IR::Instr * instrInsert, IR::RegOpnd *indexOpnd, IR::RegOpnd *baseOpnd, IR::RegOpnd *opndSlotArray, IR::RegOpnd *opndSlotIndex, const uint32 inlineCacheOffset, const uint32 hitRateOffset, IR::LabelInstr * labelHelper);
452497 bool GenerateFastLdElemI (IR::Instr *& ldElem, bool *instrIsInHelperBlockRef);
453498 bool GenerateFastStElemI (IR::Instr *& StElem, bool *instrIsInHelperBlockRef);
454499 bool GenerateFastLdLen (IR::Instr *ldLen, bool *instrIsInHelperBlockRef);
0 commit comments