|
| 1 | +2021-11-30 Geza Lore <glore@igalia.com> |
| 2 | + |
| 3 | + [JSC] Unify most Baseline ops between JSVALUE64 and JSVALUE32_64 |
| 4 | + https://bugs.webkit.org/show_bug.cgi?id=233424 |
| 5 | + |
| 6 | + Reviewed by Yusuke Suzuki. |
| 7 | + |
| 8 | + This patch unifies the Baseline JIT implementations of most bytecode |
| 9 | + ops between the JSVALUE32_64 and JSVALUE64 platforms. There are very |
| 10 | + few changes to the generated code on JSVALUE64 (and all are fairly |
| 11 | + trivial, e.g.: removal of redundant moves in the slow path), apart |
| 12 | + from machine register substitutions. My measurements on x86_64 |
| 13 | + indicate the patch is performance neutral there (which is what we |
| 14 | + expect). |
| 15 | + |
| 16 | + On ARMv7/Thumb-2 JetStream2 shows a 0.4% improvement. This is due to |
| 17 | + some of the improved implementations picked up from the JSVALUE64 |
| 18 | + versions. |
| 19 | + |
| 20 | + Also remove various unused code. |
| 21 | + |
| 22 | + * JavaScriptCore.xcodeproj/project.pbxproj: |
| 23 | + * Sources.txt: |
| 24 | + * bytecode/StructureStubInfo.cpp: |
| 25 | + (JSC::StructureStubInfo::initializeFromUnlinkedStructureStubInfo): |
| 26 | + * jit/AssemblyHelpers.h: |
| 27 | + (JSC::AssemblyHelpers::branchIfBoolean): |
| 28 | + (JSC::AssemblyHelpers::branchIfNotBoolean): |
| 29 | + (JSC::AssemblyHelpers::isUndefined): |
| 30 | + * jit/GPRInfo.h: |
| 31 | + * jit/JIT.cpp: |
| 32 | + * jit/JIT.h: |
| 33 | + * jit/JITArithmetic.cpp: |
| 34 | + (JSC::JIT::emit_op_unsigned): |
| 35 | + (JSC::JIT::emit_compareAndJumpImpl): |
| 36 | + (JSC::JIT::emit_compareUnsignedAndJumpImpl): |
| 37 | + (JSC::JIT::emit_compareUnsignedImpl): |
| 38 | + (JSC::JIT::emit_compareAndJumpSlowImpl): |
| 39 | + (JSC::JIT::emit_op_inc): |
| 40 | + (JSC::JIT::emit_op_dec): |
| 41 | + (JSC::JIT::emit_op_mod): |
| 42 | + (JSC::JIT::emitBitBinaryOpFastPath): |
| 43 | + (JSC::JIT::emit_op_bitnot): |
| 44 | + (JSC::JIT::emitRightShiftFastPath): |
| 45 | + (JSC::JIT::emitMathICFast): |
| 46 | + (JSC::JIT::emitMathICSlow): |
| 47 | + (JSC::JIT::emit_op_div): |
| 48 | + * jit/JITArithmetic32_64.cpp: Removed. |
| 49 | + * jit/JITInlineCacheGenerator.h: |
| 50 | + * jit/JITInlines.h: |
| 51 | + (JSC::JIT::emitGetVirtualRegisterPayload): |
| 52 | + (JSC::JIT::emitPutVirtualRegister): |
| 53 | + (JSC::JIT::emitJumpSlowCaseIfNotInt): |
| 54 | + (JSC::JIT::loadCodeBlockConstantPayload): |
| 55 | + * jit/JITOpcodes.cpp: |
| 56 | + (JSC::JIT::emit_op_overrides_has_instance): |
| 57 | + (JSC::JIT::emit_op_instanceof): |
| 58 | + (JSC::JIT::emitSlow_op_instanceof): |
| 59 | + (JSC::JIT::emit_op_is_empty): |
| 60 | + (JSC::JIT::emit_op_typeof_is_undefined): |
| 61 | + (JSC::JIT::emit_op_is_boolean): |
| 62 | + (JSC::JIT::emit_op_is_number): |
| 63 | + (JSC::JIT::emit_op_is_big_int): |
| 64 | + (JSC::JIT::emit_op_is_cell_with_type): |
| 65 | + (JSC::JIT::emit_op_is_object): |
| 66 | + (JSC::JIT::emit_op_to_primitive): |
| 67 | + (JSC::JIT::emit_op_to_property_key): |
| 68 | + (JSC::JIT::emit_op_not): |
| 69 | + (JSC::JIT::emit_op_jundefined_or_null): |
| 70 | + (JSC::JIT::emit_op_jnundefined_or_null): |
| 71 | + (JSC::JIT::emit_op_jeq_ptr): |
| 72 | + (JSC::JIT::emit_op_jneq_ptr): |
| 73 | + (JSC::JIT::emit_op_eq): |
| 74 | + (JSC::JIT::emit_op_neq): |
| 75 | + (JSC::JIT::compileOpStrictEq): |
| 76 | + (JSC::JIT::emit_op_to_number): |
| 77 | + (JSC::JIT::emit_op_to_numeric): |
| 78 | + (JSC::JIT::emit_op_to_string): |
| 79 | + (JSC::JIT::emit_op_to_object): |
| 80 | + (JSC::JIT::emit_op_catch): |
| 81 | + (JSC::JIT::emit_op_get_parent_scope): |
| 82 | + (JSC::JIT::emit_op_get_scope): |
| 83 | + (JSC::JIT::emit_op_to_this): |
| 84 | + (JSC::JIT::emit_op_check_tdz): |
| 85 | + (JSC::JIT::emit_op_new_regexp): |
| 86 | + (JSC::JIT::emit_op_get_rest_length): |
| 87 | + (JSC::JIT::emit_op_get_prototype_of): |
| 88 | + * jit/JITOpcodes32_64.cpp: |
| 89 | + (JSC::JIT::compileOpEqCommon): |
| 90 | + (JSC::JIT::compileOpEqSlowCommon): |
| 91 | + (JSC::JIT::emit_op_eq): |
| 92 | + (JSC::JIT::emit_op_neq): |
| 93 | + (JSC::JIT::emit_op_jeq): |
| 94 | + (JSC::JIT::emit_op_jneq): |
| 95 | + (JSC::JIT::emitSlow_op_eq): |
| 96 | + (JSC::JIT::emitSlow_op_neq): |
| 97 | + (JSC::JIT::emitSlow_op_jeq): |
| 98 | + (JSC::JIT::emitSlow_op_jneq): |
| 99 | + (JSC::JIT::compileOpStrictEqCommon): |
| 100 | + (JSC::JIT::emit_op_stricteq): |
| 101 | + (JSC::JIT::emit_op_nstricteq): |
| 102 | + (JSC::JIT::emit_op_jstricteq): |
| 103 | + (JSC::JIT::emit_op_jnstricteq): |
| 104 | + (JSC::JIT::emitSlow_op_jstricteq): |
| 105 | + (JSC::JIT::emitSlow_op_jnstricteq): |
| 106 | + * jit/JITPropertyAccess.cpp: |
| 107 | + (JSC::JIT::generateGetByValSlowCase): |
| 108 | + (JSC::JIT::emitSlow_op_get_private_name): |
| 109 | + (JSC::JIT::emitSlow_op_get_by_id_direct): |
| 110 | + (JSC::JIT::emitSlow_op_get_by_id): |
| 111 | + (JSC::JIT::emitSlow_op_get_by_id_with_this): |
| 112 | + (JSC::JIT::emit_op_enumerator_get_by_val): |
| 113 | + (JSC::JIT::emit_enumerator_has_propertyImpl): |
| 114 | + (JSC::JIT::emitWriteBarrier): |
| 115 | + * jit/JSInterfaceJIT.h: |
| 116 | + (JSC::JSInterfaceJIT::emitLoadJSCell): |
| 117 | + |
1 | 118 | 2021-11-29 Yusuke Suzuki <ysuzuki@apple.com> |
2 | 119 |
|
3 | 120 | [JSC] jumpForTypedArrayOutOfBounds should use asAnyInt since it uses isAnyInt |
|
0 commit comments