|
| 1 | +2022-03-01 Geza Lore <glore@igalia.com> |
| 2 | + |
| 3 | + [JSC] Port EXTRA_CTI_THUNKS to all platforms |
| 4 | + https://bugs.webkit.org/show_bug.cgi?id=233822 |
| 5 | + |
| 6 | + Reviewed by Saam Barati. |
| 7 | + |
| 8 | + Port and enable all code paths under #ifdef ENABLE(EXTRA_CTI_THUNKS) |
| 9 | + on all platforms, and remove the now unused code paths. |
| 10 | + |
| 11 | + To port the extra thunks to all platforms, it was necessary to enable |
| 12 | + them to do function calls to C++ slow path operations, which on some |
| 13 | + platforms require passing arguments on the stack. To enable this, |
| 14 | + CCallHelpers::emitCTIThunkPrologue and |
| 15 | + CCallHelpers::emitCTIThunkEpilogue are introduced that allocate some |
| 16 | + additional stack space on platforms where this is necessary. |
| 17 | + |
| 18 | + Additionally, the thunks that require subsequent exception checking |
| 19 | + now tail call directly to the exception check thunk, rather than |
| 20 | + returning to the baseline code and do a separate call to the exception |
| 21 | + check thunk. This saves an extra call site in the generated baseline |
| 22 | + ops and reduces code size on all platforms (~1.5% reduction on x86_64). |
| 23 | + |
| 24 | + Also factored out the statically allocated register definitions for |
| 25 | + baseline ops into BaselineJITRegisters.h, as there are now quite a lot |
| 26 | + of them and some are somewhat elaborate. This necessitates moving the |
| 27 | + noOverlap and preferredArgumentGPR/preferredArgumentJSR constexpr |
| 28 | + functions out from their previous place, so these now live in |
| 29 | + GPRInfo.h |
| 30 | + |
| 31 | + Enabling the extra CTI thunks on ARMv7/Thumb-2 saves about 25% |
| 32 | + baseline code size, according to --dumpLinkBufferStats. |
| 33 | + |
| 34 | + * assembler/MacroAssembler.h: |
| 35 | + (JSC::MacroAssembler::subPtr): |
| 36 | + * assembler/MacroAssemblerARMv7.h: |
| 37 | + (JSC::MacroAssemblerARMv7::scratchRegister): |
| 38 | + * assembler/MacroAssemblerX86_64.h: |
| 39 | + (JSC::MacroAssemblerX86_64::sub64): |
| 40 | + * bytecode/PolymorphicAccess.cpp: |
| 41 | + (JSC::AccessGenerationState::emitExplicitExceptionHandler): |
| 42 | + * bytecode/StructureStubInfo.cpp: |
| 43 | + (JSC::StructureStubInfo::initializeFromUnlinkedStructureStubInfo): |
| 44 | + * dfg/DFGJITCompiler.cpp: |
| 45 | + (JSC::DFG::JITCompiler::link): |
| 46 | + (JSC::DFG::JITCompiler::compile): |
| 47 | + (JSC::DFG::JITCompiler::compileFunction): |
| 48 | + * dfg/DFGJITCompiler.h: |
| 49 | + * ftl/FTLCompile.cpp: |
| 50 | + (JSC::FTL::compile): |
| 51 | + * ftl/FTLLink.cpp: |
| 52 | + (JSC::FTL::link): |
| 53 | + * jit/CCallHelpers.h: |
| 54 | + (JSC::CCallHelpers::emitCTIThunkPrologue): |
| 55 | + (JSC::CCallHelpers::emitCTIThunkEpilogue): |
| 56 | + * jit/JIT.cpp: |
| 57 | + (JSC::JIT::emitSlowCaseCall): |
| 58 | + (JSC::JIT::privateCompileSlowCases): |
| 59 | + (JSC::JIT::compileAndLinkWithoutFinalizing): |
| 60 | + (JSC::JIT::link): |
| 61 | + * jit/JIT.h: |
| 62 | + * jit/JITArithmetic.cpp: |
| 63 | + (JSC::JIT::emitSlow_op_mod): |
| 64 | + (JSC::JIT::emit_op_mod): |
| 65 | + (JSC::JIT::emit_op_div): |
| 66 | + * jit/JITCall.cpp: |
| 67 | + (JSC::JIT::emit_op_iterator_open): |
| 68 | + (JSC::JIT::emit_op_iterator_next): |
| 69 | + (JSC::JIT::emitSlow_op_iterator_next): |
| 70 | + * jit/JITInlineCacheGenerator.cpp: |
| 71 | + (JSC::JITGetByIdGenerator::generateBaselineDataICFastPath): |
| 72 | + (JSC::JITGetByIdWithThisGenerator::generateBaselineDataICFastPath): |
| 73 | + (JSC::JITPutByIdGenerator::generateBaselineDataICFastPath): |
| 74 | + * jit/JITInlineCacheGenerator.h: |
| 75 | + * jit/JITOpcodes.cpp: |
| 76 | + (JSC::JIT::emit_op_jfalse): |
| 77 | + (JSC::JIT::valueIsFalseyGenerator): |
| 78 | + (JSC::JIT::emit_op_jtrue): |
| 79 | + (JSC::JIT::valueIsTruthyGenerator): |
| 80 | + (JSC::JIT::emit_op_throw): |
| 81 | + (JSC::JIT::op_throw_handlerGenerator): |
| 82 | + (JSC::JIT::emit_op_enter): |
| 83 | + (JSC::JIT::op_enter_handlerGenerator): |
| 84 | + (JSC::JIT::emitSlow_op_check_traps): |
| 85 | + (JSC::JIT::op_check_traps_handlerGenerator): |
| 86 | + * jit/JITPropertyAccess.cpp: |
| 87 | + (JSC::JIT::emit_op_get_by_val): |
| 88 | + (JSC::JIT::generateGetByValSlowCase): |
| 89 | + (JSC::JIT::slow_op_get_by_val_callSlowOperationThenCheckExceptionGenerator): |
| 90 | + (JSC::JIT::emit_op_get_private_name): |
| 91 | + (JSC::JIT::emitSlow_op_get_private_name): |
| 92 | + (JSC::JIT::slow_op_get_private_name_callSlowOperationThenCheckExceptionGenerator): |
| 93 | + (JSC::JIT::emit_op_set_private_brand): |
| 94 | + (JSC::JIT::emitSlow_op_set_private_brand): |
| 95 | + (JSC::JIT::emit_op_check_private_brand): |
| 96 | + (JSC::JIT::emitSlow_op_check_private_brand): |
| 97 | + (JSC::JIT::emit_op_put_by_val): |
| 98 | + (JSC::JIT::emitSlow_op_put_by_val): |
| 99 | + (JSC::JIT::slow_op_put_by_val_callSlowOperationThenCheckExceptionGenerator): |
| 100 | + (JSC::JIT::emit_op_put_private_name): |
| 101 | + (JSC::JIT::emitSlow_op_put_private_name): |
| 102 | + (JSC::JIT::slow_op_put_private_name_callSlowOperationThenCheckExceptionGenerator): |
| 103 | + (JSC::JIT::emit_op_del_by_id): |
| 104 | + (JSC::JIT::emitSlow_op_del_by_id): |
| 105 | + (JSC::JIT::slow_op_del_by_id_callSlowOperationThenCheckExceptionGenerator): |
| 106 | + (JSC::JIT::emit_op_del_by_val): |
| 107 | + (JSC::JIT::emitSlow_op_del_by_val): |
| 108 | + (JSC::JIT::slow_op_del_by_val_callSlowOperationThenCheckExceptionGenerator): |
| 109 | + (JSC::JIT::emit_op_try_get_by_id): |
| 110 | + (JSC::JIT::emitSlow_op_try_get_by_id): |
| 111 | + (JSC::JIT::emit_op_get_by_id_direct): |
| 112 | + (JSC::JIT::emitSlow_op_get_by_id_direct): |
| 113 | + (JSC::JIT::emit_op_get_by_id): |
| 114 | + (JSC::JIT::emitSlow_op_get_by_id): |
| 115 | + (JSC::JIT::slow_op_get_by_id_callSlowOperationThenCheckExceptionGenerator): |
| 116 | + (JSC::JIT::emit_op_get_by_id_with_this): |
| 117 | + (JSC::JIT::emitSlow_op_get_by_id_with_this): |
| 118 | + (JSC::JIT::slow_op_get_by_id_with_this_callSlowOperationThenCheckExceptionGenerator): |
| 119 | + (JSC::JIT::emit_op_put_by_id): |
| 120 | + (JSC::JIT::emitSlow_op_put_by_id): |
| 121 | + (JSC::JIT::slow_op_put_by_id_callSlowOperationThenCheckExceptionGenerator): |
| 122 | + (JSC::JIT::emitSlow_op_in_by_id): |
| 123 | + (JSC::JIT::emitSlow_op_in_by_val): |
| 124 | + (JSC::JIT::emitHasPrivateSlow): |
| 125 | + (JSC::JIT::emitSlow_op_has_private_name): |
| 126 | + (JSC::JIT::emitSlow_op_has_private_brand): |
| 127 | + (JSC::JIT::emitSlow_op_put_to_scope): |
| 128 | + (JSC::JIT::slow_op_put_to_scopeGenerator): |
| 129 | + (JSC::JIT::emit_op_get_property_enumerator): |
| 130 | + (JSC::JIT::emit_op_enumerator_next): |
| 131 | + (JSC::JIT::emit_enumerator_has_propertyImpl): |
| 132 | + (JSC::JIT::emit_op_enumerator_get_by_val): |
| 133 | + (JSC::JIT::emit_op_enumerator_in_by_val): |
| 134 | + (JSC::JIT::emit_op_enumerator_has_own_property): |
| 135 | + * jit/JITThunks.cpp: |
| 136 | + * jit/JITThunks.h: |
| 137 | + * jit/SlowPathCall.cpp: |
| 138 | + (JSC::JITSlowPathCall::call): |
| 139 | + (JSC::JITSlowPathCall::generateThunk): |
| 140 | + * jit/SlowPathCall.h: |
| 141 | + (JSC::JITSlowPathCall::JITSlowPathCall): |
| 142 | + * jit/ThunkGenerators.cpp: |
| 143 | + (JSC::handleExceptionGenerator): |
| 144 | + (JSC::checkExceptionGenerator): |
| 145 | + * jit/ThunkGenerators.h: |
| 146 | + |
1 | 147 | 2022-02-28 Devin Rousso <drousso@apple.com> |
2 | 148 |
|
3 | 149 | Web Inspector: [Flexbox] Add options to show each area's CSS `order` and/or DOM index in the parent flex container |
|
0 commit comments