Changeset 240041 in webkit
- Timestamp:
- Jan 16, 2019, 10:44:25 AM (8 years ago)
- Location:
- trunk/Source/JavaScriptCore
- Files:
-
- 35 edited
-
ChangeLog (modified) (1 diff)
-
bytecode/BytecodeGeneratorification.cpp (modified) (2 diffs)
-
bytecode/BytecodeUseDef.h (modified) (4 diffs)
-
bytecode/CallLinkStatus.cpp (modified) (2 diffs)
-
bytecode/CodeBlock.cpp (modified) (31 diffs)
-
bytecode/CodeBlockInlines.h (modified) (5 diffs)
-
bytecode/GetByIdStatus.cpp (modified) (2 diffs)
-
bytecode/LLIntPrototypeLoadAdaptiveStructureWatchpoint.cpp (modified) (2 diffs)
-
bytecode/PreciseJumpTargetsInlines.h (modified) (7 diffs)
-
bytecode/PutByIdStatus.cpp (modified) (4 diffs)
-
bytecode/UnlinkedCodeBlock.cpp (modified) (2 diffs)
-
bytecompiler/BytecodeGenerator.cpp (modified) (8 diffs)
-
dfg/DFGByteCodeParser.cpp (modified) (181 diffs)
-
dfg/DFGOSREntry.cpp (modified) (2 diffs)
-
ftl/FTLOperations.cpp (modified) (3 diffs)
-
generator/Argument.rb (modified) (3 diffs)
-
generator/Metadata.rb (modified) (4 diffs)
-
generator/Opcode.rb (modified) (3 diffs)
-
jit/JIT.h (modified) (1 diff)
-
jit/JITArithmetic.cpp (modified) (23 diffs)
-
jit/JITArithmetic32_64.cpp (modified) (10 diffs)
-
jit/JITCall.cpp (modified) (8 diffs)
-
jit/JITCall32_64.cpp (modified) (8 diffs)
-
jit/JITInlines.h (modified) (5 diffs)
-
jit/JITOpcodes.cpp (modified) (79 diffs)
-
jit/JITOpcodes32_64.cpp (modified) (67 diffs)
-
jit/JITOperations.cpp (modified) (5 diffs)
-
jit/JITPropertyAccess.cpp (modified) (48 diffs)
-
jit/JITPropertyAccess32_64.cpp (modified) (44 diffs)
-
llint/LLIntSlowPaths.cpp (modified) (80 diffs)
-
llint/LowLevelInterpreter.asm (modified) (7 diffs)
-
llint/LowLevelInterpreter32_64.asm (modified) (113 diffs)
-
llint/LowLevelInterpreter64.asm (modified) (120 diffs)
-
runtime/CommonSlowPaths.cpp (modified) (74 diffs)
-
runtime/CommonSlowPaths.h (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r240040 r240041 1 2019-01-16 Mark Lam <mark.lam@apple.com> 2 3 Refactor new bytecode structs so that the fields are prefixed with "m_". 4 https://bugs.webkit.org/show_bug.cgi?id=193467 5 6 Reviewed by Saam Barati and Tadeu Zagallo. 7 8 This makes it easier to do a manual audit of type correctness of the LLInt 9 instructions used to access these fields. Without this change, it would be 10 difficult (and error prone) to distinguish the difference between field names and 11 macro variables. This audit will be done after this patch lands. 12 13 * bytecode/BytecodeGeneratorification.cpp: 14 (JSC::BytecodeGeneratorification::BytecodeGeneratorification): 15 * bytecode/BytecodeUseDef.h: 16 (JSC::computeUsesForBytecodeOffset): 17 * bytecode/CallLinkStatus.cpp: 18 (JSC::CallLinkStatus::computeFromLLInt): 19 * bytecode/CodeBlock.cpp: 20 (JSC::CodeBlock::finishCreation): 21 (JSC::CodeBlock::propagateTransitions): 22 (JSC::CodeBlock::finalizeLLIntInlineCaches): 23 (JSC::CodeBlock::ensureCatchLivenessIsComputedForBytecodeOffset): 24 (JSC::CodeBlock::ensureCatchLivenessIsComputedForBytecodeOffsetSlow): 25 (JSC::CodeBlock::getArrayProfile): 26 (JSC::CodeBlock::notifyLexicalBindingShadowing): 27 (JSC::CodeBlock::tryGetValueProfileForBytecodeOffset): 28 (JSC::CodeBlock::arithProfileForPC): 29 (JSC::CodeBlock::insertBasicBlockBoundariesForControlFlowProfiler): 30 * bytecode/CodeBlockInlines.h: 31 (JSC::CodeBlock::forEachValueProfile): 32 (JSC::CodeBlock::forEachArrayProfile): 33 (JSC::CodeBlock::forEachArrayAllocationProfile): 34 (JSC::CodeBlock::forEachObjectAllocationProfile): 35 (JSC::CodeBlock::forEachLLIntCallLinkInfo): 36 * bytecode/GetByIdStatus.cpp: 37 (JSC::GetByIdStatus::computeFromLLInt): 38 * bytecode/LLIntPrototypeLoadAdaptiveStructureWatchpoint.cpp: 39 (JSC::LLIntPrototypeLoadAdaptiveStructureWatchpoint::clearLLIntGetByIdCache): 40 * bytecode/PreciseJumpTargetsInlines.h: 41 (JSC::jumpTargetForInstruction): 42 (JSC::extractStoredJumpTargetsForInstruction): 43 (JSC::updateStoredJumpTargetsForInstruction): 44 * bytecode/PutByIdStatus.cpp: 45 (JSC::PutByIdStatus::computeFromLLInt): 46 * bytecode/UnlinkedCodeBlock.cpp: 47 (JSC::dumpLineColumnEntry): 48 * bytecompiler/BytecodeGenerator.cpp: 49 (JSC::BytecodeGenerator::fuseCompareAndJump): 50 (JSC::BytecodeGenerator::fuseTestAndJmp): 51 (JSC::BytecodeGenerator::emitEqualityOp): 52 (JSC::BytecodeGenerator::endSwitch): 53 (JSC::StructureForInContext::finalize): 54 * dfg/DFGByteCodeParser.cpp: 55 (JSC::DFG::ByteCodeParser::handleCall): 56 (JSC::DFG::ByteCodeParser::handleVarargsCall): 57 (JSC::DFG::ByteCodeParser::parseGetById): 58 (JSC::DFG::ByteCodeParser::parseBlock): 59 (JSC::DFG::ByteCodeParser::handlePutByVal): 60 (JSC::DFG::ByteCodeParser::handlePutAccessorById): 61 (JSC::DFG::ByteCodeParser::handlePutAccessorByVal): 62 (JSC::DFG::ByteCodeParser::handleNewFunc): 63 (JSC::DFG::ByteCodeParser::handleNewFuncExp): 64 * dfg/DFGOSREntry.cpp: 65 (JSC::DFG::prepareCatchOSREntry): 66 * ftl/FTLOperations.cpp: 67 (JSC::FTL::operationMaterializeObjectInOSR): 68 * generator/Argument.rb: 69 * generator/Metadata.rb: 70 * generator/Opcode.rb: 71 * jit/JIT.h: 72 * jit/JITArithmetic.cpp: 73 (JSC::JIT::emit_op_unsigned): 74 (JSC::JIT::emit_compareAndJump): 75 (JSC::JIT::emit_compareUnsignedAndJump): 76 (JSC::JIT::emit_compareUnsigned): 77 (JSC::JIT::emit_compareAndJumpSlow): 78 (JSC::JIT::emit_op_inc): 79 (JSC::JIT::emit_op_dec): 80 (JSC::JIT::emit_op_mod): 81 (JSC::JIT::emit_op_negate): 82 (JSC::JIT::emitBitBinaryOpFastPath): 83 (JSC::JIT::emit_op_bitnot): 84 (JSC::JIT::emitRightShiftFastPath): 85 (JSC::JIT::emit_op_add): 86 (JSC::JIT::emitMathICFast): 87 (JSC::JIT::emitMathICSlow): 88 (JSC::JIT::emit_op_div): 89 (JSC::JIT::emit_op_mul): 90 (JSC::JIT::emit_op_sub): 91 * jit/JITArithmetic32_64.cpp: 92 (JSC::JIT::emit_compareAndJump): 93 (JSC::JIT::emit_compareUnsignedAndJump): 94 (JSC::JIT::emit_compareUnsigned): 95 (JSC::JIT::emit_compareAndJumpSlow): 96 (JSC::JIT::emit_op_unsigned): 97 (JSC::JIT::emit_op_inc): 98 (JSC::JIT::emit_op_dec): 99 (JSC::JIT::emitBinaryDoubleOp): 100 (JSC::JIT::emit_op_mod): 101 * jit/JITCall.cpp: 102 (JSC::JIT::emitPutCallResult): 103 (JSC::JIT::compileSetupFrame): 104 (JSC::JIT::compileCallEvalSlowCase): 105 (JSC::JIT::compileTailCall): 106 (JSC::JIT::compileOpCall): 107 * jit/JITCall32_64.cpp: 108 (JSC::JIT::emitPutCallResult): 109 (JSC::JIT::emit_op_ret): 110 (JSC::JIT::compileSetupFrame): 111 (JSC::JIT::compileCallEvalSlowCase): 112 (JSC::JIT::compileOpCall): 113 * jit/JITInlines.h: 114 (JSC::JIT::emitValueProfilingSiteIfProfiledOpcode): 115 (JSC::JIT::emitValueProfilingSite): 116 (JSC::JIT::copiedGetPutInfo): 117 (JSC::JIT::copiedArithProfile): 118 * jit/JITOpcodes.cpp: 119 (JSC::JIT::emit_op_mov): 120 (JSC::JIT::emit_op_end): 121 (JSC::JIT::emit_op_jmp): 122 (JSC::JIT::emit_op_new_object): 123 (JSC::JIT::emitSlow_op_new_object): 124 (JSC::JIT::emit_op_overrides_has_instance): 125 (JSC::JIT::emit_op_instanceof): 126 (JSC::JIT::emitSlow_op_instanceof): 127 (JSC::JIT::emit_op_is_empty): 128 (JSC::JIT::emit_op_is_undefined): 129 (JSC::JIT::emit_op_is_undefined_or_null): 130 (JSC::JIT::emit_op_is_boolean): 131 (JSC::JIT::emit_op_is_number): 132 (JSC::JIT::emit_op_is_cell_with_type): 133 (JSC::JIT::emit_op_is_object): 134 (JSC::JIT::emit_op_ret): 135 (JSC::JIT::emit_op_to_primitive): 136 (JSC::JIT::emit_op_set_function_name): 137 (JSC::JIT::emit_op_not): 138 (JSC::JIT::emit_op_jfalse): 139 (JSC::JIT::emit_op_jeq_null): 140 (JSC::JIT::emit_op_jneq_null): 141 (JSC::JIT::emit_op_jneq_ptr): 142 (JSC::JIT::emit_op_eq): 143 (JSC::JIT::emit_op_jeq): 144 (JSC::JIT::emit_op_jtrue): 145 (JSC::JIT::emit_op_neq): 146 (JSC::JIT::emit_op_jneq): 147 (JSC::JIT::emit_op_throw): 148 (JSC::JIT::compileOpStrictEq): 149 (JSC::JIT::compileOpStrictEqJump): 150 (JSC::JIT::emitSlow_op_jstricteq): 151 (JSC::JIT::emitSlow_op_jnstricteq): 152 (JSC::JIT::emit_op_to_number): 153 (JSC::JIT::emit_op_to_string): 154 (JSC::JIT::emit_op_to_object): 155 (JSC::JIT::emit_op_catch): 156 (JSC::JIT::emit_op_get_parent_scope): 157 (JSC::JIT::emit_op_switch_imm): 158 (JSC::JIT::emit_op_switch_char): 159 (JSC::JIT::emit_op_switch_string): 160 (JSC::JIT::emit_op_debug): 161 (JSC::JIT::emit_op_eq_null): 162 (JSC::JIT::emit_op_neq_null): 163 (JSC::JIT::emit_op_get_scope): 164 (JSC::JIT::emit_op_to_this): 165 (JSC::JIT::emit_op_create_this): 166 (JSC::JIT::emit_op_check_tdz): 167 (JSC::JIT::emitSlow_op_eq): 168 (JSC::JIT::emitSlow_op_neq): 169 (JSC::JIT::emitSlow_op_jeq): 170 (JSC::JIT::emitSlow_op_jneq): 171 (JSC::JIT::emitSlow_op_instanceof_custom): 172 (JSC::JIT::emit_op_new_regexp): 173 (JSC::JIT::emitNewFuncCommon): 174 (JSC::JIT::emitNewFuncExprCommon): 175 (JSC::JIT::emit_op_new_array): 176 (JSC::JIT::emit_op_new_array_with_size): 177 (JSC::JIT::emit_op_has_structure_property): 178 (JSC::JIT::emit_op_has_indexed_property): 179 (JSC::JIT::emitSlow_op_has_indexed_property): 180 (JSC::JIT::emit_op_get_direct_pname): 181 (JSC::JIT::emit_op_enumerator_structure_pname): 182 (JSC::JIT::emit_op_enumerator_generic_pname): 183 (JSC::JIT::emit_op_profile_type): 184 (JSC::JIT::emit_op_log_shadow_chicken_prologue): 185 (JSC::JIT::emit_op_log_shadow_chicken_tail): 186 (JSC::JIT::emit_op_profile_control_flow): 187 (JSC::JIT::emit_op_argument_count): 188 (JSC::JIT::emit_op_get_rest_length): 189 (JSC::JIT::emit_op_get_argument): 190 * jit/JITOpcodes32_64.cpp: 191 (JSC::JIT::emit_op_mov): 192 (JSC::JIT::emit_op_end): 193 (JSC::JIT::emit_op_jmp): 194 (JSC::JIT::emit_op_new_object): 195 (JSC::JIT::emitSlow_op_new_object): 196 (JSC::JIT::emit_op_overrides_has_instance): 197 (JSC::JIT::emit_op_instanceof): 198 (JSC::JIT::emitSlow_op_instanceof): 199 (JSC::JIT::emitSlow_op_instanceof_custom): 200 (JSC::JIT::emit_op_is_empty): 201 (JSC::JIT::emit_op_is_undefined): 202 (JSC::JIT::emit_op_is_undefined_or_null): 203 (JSC::JIT::emit_op_is_boolean): 204 (JSC::JIT::emit_op_is_number): 205 (JSC::JIT::emit_op_is_cell_with_type): 206 (JSC::JIT::emit_op_is_object): 207 (JSC::JIT::emit_op_to_primitive): 208 (JSC::JIT::emit_op_set_function_name): 209 (JSC::JIT::emit_op_not): 210 (JSC::JIT::emit_op_jfalse): 211 (JSC::JIT::emit_op_jtrue): 212 (JSC::JIT::emit_op_jeq_null): 213 (JSC::JIT::emit_op_jneq_null): 214 (JSC::JIT::emit_op_jneq_ptr): 215 (JSC::JIT::emit_op_eq): 216 (JSC::JIT::emitSlow_op_eq): 217 (JSC::JIT::emit_op_jeq): 218 (JSC::JIT::emitSlow_op_jeq): 219 (JSC::JIT::emit_op_neq): 220 (JSC::JIT::emitSlow_op_neq): 221 (JSC::JIT::emit_op_jneq): 222 (JSC::JIT::emitSlow_op_jneq): 223 (JSC::JIT::compileOpStrictEq): 224 (JSC::JIT::compileOpStrictEqJump): 225 (JSC::JIT::emitSlow_op_jstricteq): 226 (JSC::JIT::emitSlow_op_jnstricteq): 227 (JSC::JIT::emit_op_eq_null): 228 (JSC::JIT::emit_op_neq_null): 229 (JSC::JIT::emit_op_throw): 230 (JSC::JIT::emit_op_to_number): 231 (JSC::JIT::emit_op_to_string): 232 (JSC::JIT::emit_op_to_object): 233 (JSC::JIT::emit_op_catch): 234 (JSC::JIT::emit_op_get_parent_scope): 235 (JSC::JIT::emit_op_switch_imm): 236 (JSC::JIT::emit_op_switch_char): 237 (JSC::JIT::emit_op_switch_string): 238 (JSC::JIT::emit_op_debug): 239 (JSC::JIT::emit_op_get_scope): 240 (JSC::JIT::emit_op_create_this): 241 (JSC::JIT::emit_op_to_this): 242 (JSC::JIT::emit_op_check_tdz): 243 (JSC::JIT::emit_op_has_structure_property): 244 (JSC::JIT::emit_op_has_indexed_property): 245 (JSC::JIT::emitSlow_op_has_indexed_property): 246 (JSC::JIT::emit_op_get_direct_pname): 247 (JSC::JIT::emit_op_enumerator_structure_pname): 248 (JSC::JIT::emit_op_enumerator_generic_pname): 249 (JSC::JIT::emit_op_profile_type): 250 (JSC::JIT::emit_op_log_shadow_chicken_prologue): 251 (JSC::JIT::emit_op_log_shadow_chicken_tail): 252 * jit/JITOperations.cpp: 253 * jit/JITPropertyAccess.cpp: 254 (JSC::JIT::emit_op_get_by_val): 255 (JSC::JIT::emitGetByValWithCachedId): 256 (JSC::JIT::emitSlow_op_get_by_val): 257 (JSC::JIT::emit_op_put_by_val): 258 (JSC::JIT::emitGenericContiguousPutByVal): 259 (JSC::JIT::emitArrayStoragePutByVal): 260 (JSC::JIT::emitPutByValWithCachedId): 261 (JSC::JIT::emitSlow_op_put_by_val): 262 (JSC::JIT::emit_op_put_getter_by_id): 263 (JSC::JIT::emit_op_put_setter_by_id): 264 (JSC::JIT::emit_op_put_getter_setter_by_id): 265 (JSC::JIT::emit_op_put_getter_by_val): 266 (JSC::JIT::emit_op_put_setter_by_val): 267 (JSC::JIT::emit_op_del_by_id): 268 (JSC::JIT::emit_op_del_by_val): 269 (JSC::JIT::emit_op_try_get_by_id): 270 (JSC::JIT::emitSlow_op_try_get_by_id): 271 (JSC::JIT::emit_op_get_by_id_direct): 272 (JSC::JIT::emitSlow_op_get_by_id_direct): 273 (JSC::JIT::emit_op_get_by_id): 274 (JSC::JIT::emit_op_get_by_id_with_this): 275 (JSC::JIT::emitSlow_op_get_by_id): 276 (JSC::JIT::emitSlow_op_get_by_id_with_this): 277 (JSC::JIT::emit_op_put_by_id): 278 (JSC::JIT::emitSlow_op_put_by_id): 279 (JSC::JIT::emit_op_in_by_id): 280 (JSC::JIT::emitSlow_op_in_by_id): 281 (JSC::JIT::emit_op_resolve_scope): 282 (JSC::JIT::emit_op_get_from_scope): 283 (JSC::JIT::emitSlow_op_get_from_scope): 284 (JSC::JIT::emit_op_put_to_scope): 285 (JSC::JIT::emit_op_get_from_arguments): 286 (JSC::JIT::emit_op_put_to_arguments): 287 (JSC::JIT::emitIntTypedArrayPutByVal): 288 (JSC::JIT::emitFloatTypedArrayPutByVal): 289 * jit/JITPropertyAccess32_64.cpp: 290 (JSC::JIT::emit_op_put_getter_by_id): 291 (JSC::JIT::emit_op_put_setter_by_id): 292 (JSC::JIT::emit_op_put_getter_setter_by_id): 293 (JSC::JIT::emit_op_put_getter_by_val): 294 (JSC::JIT::emit_op_put_setter_by_val): 295 (JSC::JIT::emit_op_del_by_id): 296 (JSC::JIT::emit_op_del_by_val): 297 (JSC::JIT::emit_op_get_by_val): 298 (JSC::JIT::emitGetByValWithCachedId): 299 (JSC::JIT::emitSlow_op_get_by_val): 300 (JSC::JIT::emit_op_put_by_val): 301 (JSC::JIT::emitGenericContiguousPutByVal): 302 (JSC::JIT::emitArrayStoragePutByVal): 303 (JSC::JIT::emitPutByValWithCachedId): 304 (JSC::JIT::emitSlow_op_put_by_val): 305 (JSC::JIT::emit_op_try_get_by_id): 306 (JSC::JIT::emitSlow_op_try_get_by_id): 307 (JSC::JIT::emit_op_get_by_id_direct): 308 (JSC::JIT::emitSlow_op_get_by_id_direct): 309 (JSC::JIT::emit_op_get_by_id): 310 (JSC::JIT::emitSlow_op_get_by_id): 311 (JSC::JIT::emit_op_get_by_id_with_this): 312 (JSC::JIT::emitSlow_op_get_by_id_with_this): 313 (JSC::JIT::emit_op_put_by_id): 314 (JSC::JIT::emitSlow_op_put_by_id): 315 (JSC::JIT::emit_op_in_by_id): 316 (JSC::JIT::emitSlow_op_in_by_id): 317 (JSC::JIT::emit_op_resolve_scope): 318 (JSC::JIT::emit_op_get_from_scope): 319 (JSC::JIT::emitSlow_op_get_from_scope): 320 (JSC::JIT::emit_op_put_to_scope): 321 (JSC::JIT::emit_op_get_from_arguments): 322 (JSC::JIT::emit_op_put_to_arguments): 323 * llint/LLIntSlowPaths.cpp: 324 (JSC::LLInt::LLINT_SLOW_PATH_DECL): 325 (JSC::LLInt::setupGetByIdPrototypeCache): 326 (JSC::LLInt::getByVal): 327 (JSC::LLInt::genericCall): 328 (JSC::LLInt::varargsSetup): 329 (JSC::LLInt::commonCallEval): 330 * llint/LowLevelInterpreter.asm: 331 * llint/LowLevelInterpreter32_64.asm: 332 * llint/LowLevelInterpreter64.asm: 333 * runtime/CommonSlowPaths.cpp: 334 (JSC::SLOW_PATH_DECL): 335 (JSC::updateArithProfileForUnaryArithOp): 336 * runtime/CommonSlowPaths.h: 337 (JSC::CommonSlowPaths::tryCachePutToScopeGlobal): 338 (JSC::CommonSlowPaths::tryCacheGetFromScopeGlobal): 339 1 340 2019-01-15 Mark Lam <mark.lam@apple.com> 2 341 -
trunk/Source/JavaScriptCore/bytecode/BytecodeGeneratorification.cpp
r239427 r240041 1 1 /* 2 2 * Copyright (C) 2016 Yusuke Suzuki <utatane.tea@gmail.com> 3 * Copyright (C) 2016 Apple Inc. All rights reserved.3 * Copyright (C) 2016-2019 Apple Inc. All rights reserved. 4 4 * 5 5 * Redistribution and use in source and binary forms, with or without … … 75 75 case op_yield: { 76 76 auto bytecode = instruction->as<OpYield>(); 77 unsigned liveCalleeLocalsIndex = bytecode. yieldPoint;77 unsigned liveCalleeLocalsIndex = bytecode.m_yieldPoint; 78 78 if (liveCalleeLocalsIndex >= m_yields.size()) 79 79 m_yields.resize(liveCalleeLocalsIndex + 1); 80 80 YieldData& data = m_yields[liveCalleeLocalsIndex]; 81 81 data.point = instruction.offset(); 82 data.argument = bytecode. argument;82 data.argument = bytecode.m_argument; 83 83 break; 84 84 } -
trunk/Source/JavaScriptCore/bytecode/BytecodeUseDef.h
r239761 r240041 1 1 /* 2 * Copyright (C) 2013-201 7Apple Inc. All rights reserved.2 * Copyright (C) 2013-2019 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 33 33 34 34 #define CALL_FUNCTOR(__arg) \ 35 functor(__bytecode. __arg);35 functor(__bytecode.m_##__arg); 36 36 37 37 #define USES_OR_DEFS(__opcode, ...) \ … … 52 52 53 53 auto handleNewArrayLike = [&](auto op) { 54 int base = op. argv.offset();55 for (int i = 0; i < static_cast<int>(op. argc); i++)54 int base = op.m_argv.offset(); 55 for (int i = 0; i < static_cast<int>(op.m_argc); i++) 56 56 functor(VirtualRegister { base - i }); 57 57 }; 58 58 59 59 auto handleOpCallLike = [&](auto op) { 60 functor(op. callee);61 int lastArg = -static_cast<int>(op. argv) + CallFrame::thisArgumentOffset();62 for (int i = 0; i < static_cast<int>(op. argc); i++)60 functor(op.m_callee); 61 int lastArg = -static_cast<int>(op.m_argv) + CallFrame::thisArgumentOffset(); 62 for (int i = 0; i < static_cast<int>(op.m_argc); i++) 63 63 functor(VirtualRegister { lastArg + i }); 64 64 if (opcodeID == op_call_eval) … … 259 259 case op_strcat: { 260 260 auto bytecode = instruction->as<OpStrcat>(); 261 int base = bytecode. src.offset();262 for (int i = 0; i < bytecode. count; i++)261 int base = bytecode.m_src.offset(); 262 for (int i = 0; i < bytecode.m_count; i++) 263 263 functor(VirtualRegister { base - i }); 264 264 return; -
trunk/Source/JavaScriptCore/bytecode/CallLinkStatus.cpp
r237547 r240041 1 1 /* 2 * Copyright (C) 2012-201 8Apple Inc. All rights reserved.2 * Copyright (C) 2012-2019 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 74 74 switch (op) { 75 75 case op_call: 76 callLinkInfo = &instruction->as<OpCall>().metadata(profiledBlock). callLinkInfo;76 callLinkInfo = &instruction->as<OpCall>().metadata(profiledBlock).m_callLinkInfo; 77 77 break; 78 78 case op_construct: 79 callLinkInfo = &instruction->as<OpConstruct>().metadata(profiledBlock). callLinkInfo;79 callLinkInfo = &instruction->as<OpConstruct>().metadata(profiledBlock).m_callLinkInfo; 80 80 break; 81 81 case op_tail_call: 82 callLinkInfo = &instruction->as<OpTailCall>().metadata(profiledBlock). callLinkInfo;82 callLinkInfo = &instruction->as<OpTailCall>().metadata(profiledBlock).m_callLinkInfo; 83 83 break; 84 84 default: -
trunk/Source/JavaScriptCore/bytecode/CodeBlock.cpp
r239898 r240041 1 1 /* 2 * Copyright (C) 2008-201 8Apple Inc. All rights reserved.2 * Copyright (C) 2008-2019 Apple Inc. All rights reserved. 3 3 * Copyright (C) 2008 Cameron Zwarich <cwzwarich@uwaterloo.ca> 4 4 * … … 508 508 auto link_profile = [&](const auto& instruction, auto /*bytecode*/, auto& metadata) { 509 509 m_numberOfNonArgumentValueProfiles++; 510 metadata. profile.m_bytecodeOffset = instruction.offset();510 metadata.m_profile.m_bytecodeOffset = instruction.offset(); 511 511 }; 512 512 513 513 auto link_arrayProfile = [&](const auto& instruction, auto /*bytecode*/, auto& metadata) { 514 metadata. arrayProfile.m_bytecodeOffset = instruction.offset();514 metadata.m_arrayProfile.m_bytecodeOffset = instruction.offset(); 515 515 }; 516 516 517 517 auto link_objectAllocationProfile = [&](const auto& /*instruction*/, auto bytecode, auto& metadata) { 518 metadata. objectAllocationProfile.initializeProfile(vm, m_globalObject.get(), this, m_globalObject->objectPrototype(), bytecode.inlineCapacity);518 metadata.m_objectAllocationProfile.initializeProfile(vm, m_globalObject.get(), this, m_globalObject->objectPrototype(), bytecode.m_inlineCapacity); 519 519 }; 520 520 521 521 auto link_arrayAllocationProfile = [&](const auto& /*instruction*/, auto bytecode, auto& metadata) { 522 metadata. arrayAllocationProfile.initializeIndexingMode(bytecode.recommendedIndexingType);522 metadata.m_arrayAllocationProfile.initializeIndexingMode(bytecode.m_recommendedIndexingType); 523 523 }; 524 524 525 525 auto link_hitCountForLLIntCaching = [&](const auto& /*instruction*/, auto /*bytecode*/, auto& metadata) { 526 metadata. hitCountForLLIntCaching = Options::prototypeHitCountForLLIntCaching();526 metadata.m_hitCountForLLIntCaching = Options::prototypeHitCountForLLIntCaching(); 527 527 }; 528 528 … … 608 608 INITIALIZE_METADATA(OpResolveScope) 609 609 610 const Identifier& ident = identifier(bytecode. var);611 RELEASE_ASSERT(bytecode. resolveType != LocalClosureVar);612 613 ResolveOp op = JSScope::abstractResolve(m_globalObject->globalExec(), bytecode. localScopeDepth, scope, ident, Get, bytecode.resolveType, InitializationMode::NotInitialization);610 const Identifier& ident = identifier(bytecode.m_var); 611 RELEASE_ASSERT(bytecode.m_resolveType != LocalClosureVar); 612 613 ResolveOp op = JSScope::abstractResolve(m_globalObject->globalExec(), bytecode.m_localScopeDepth, scope, ident, Get, bytecode.m_resolveType, InitializationMode::NotInitialization); 614 614 RETURN_IF_EXCEPTION(throwScope, false); 615 615 616 metadata. resolveType = op.type;617 metadata. localScopeDepth = op.depth;616 metadata.m_resolveType = op.type; 617 metadata.m_localScopeDepth = op.depth; 618 618 if (op.lexicalEnvironment) { 619 619 if (op.type == ModuleVar) { … … 621 621 if (stronglyReferencedModuleEnvironments.add(jsCast<JSModuleEnvironment*>(op.lexicalEnvironment)).isNewEntry) 622 622 addConstant(op.lexicalEnvironment); 623 metadata. lexicalEnvironment.set(vm, this, op.lexicalEnvironment);623 metadata.m_lexicalEnvironment.set(vm, this, op.lexicalEnvironment); 624 624 } else 625 metadata. symbolTable.set(vm, this, op.lexicalEnvironment->symbolTable());625 metadata.m_symbolTable.set(vm, this, op.lexicalEnvironment->symbolTable()); 626 626 } else if (JSScope* constantScope = JSScope::constantScopeForCodeBlock(op.type, this)) { 627 metadata. constantScope.set(vm, this, constantScope);627 metadata.m_constantScope.set(vm, this, constantScope); 628 628 if (op.type == GlobalLexicalVar || op.type == GlobalLexicalVarWithVarInjectionChecks) 629 metadata. localScopeDepth = 0;629 metadata.m_localScopeDepth = 0; 630 630 } else 631 metadata. globalObject = nullptr;631 metadata.m_globalObject = nullptr; 632 632 break; 633 633 } … … 637 637 638 638 link_profile(instruction, bytecode, metadata); 639 metadata. watchpointSet = nullptr;640 641 ASSERT(!isInitialization(bytecode. getPutInfo.initializationMode()));642 if (bytecode. getPutInfo.resolveType() == LocalClosureVar) {643 metadata. getPutInfo = GetPutInfo(bytecode.getPutInfo.resolveMode(), ClosureVar, bytecode.getPutInfo.initializationMode());639 metadata.m_watchpointSet = nullptr; 640 641 ASSERT(!isInitialization(bytecode.m_getPutInfo.initializationMode())); 642 if (bytecode.m_getPutInfo.resolveType() == LocalClosureVar) { 643 metadata.m_getPutInfo = GetPutInfo(bytecode.m_getPutInfo.resolveMode(), ClosureVar, bytecode.m_getPutInfo.initializationMode()); 644 644 break; 645 645 } 646 646 647 const Identifier& ident = identifier(bytecode. var);648 ResolveOp op = JSScope::abstractResolve(m_globalObject->globalExec(), bytecode. localScopeDepth, scope, ident, Get, bytecode.getPutInfo.resolveType(), InitializationMode::NotInitialization);647 const Identifier& ident = identifier(bytecode.m_var); 648 ResolveOp op = JSScope::abstractResolve(m_globalObject->globalExec(), bytecode.m_localScopeDepth, scope, ident, Get, bytecode.m_getPutInfo.resolveType(), InitializationMode::NotInitialization); 649 649 RETURN_IF_EXCEPTION(throwScope, false); 650 650 651 metadata. getPutInfo = GetPutInfo(bytecode.getPutInfo.resolveMode(), op.type, bytecode.getPutInfo.initializationMode());651 metadata.m_getPutInfo = GetPutInfo(bytecode.m_getPutInfo.resolveMode(), op.type, bytecode.m_getPutInfo.initializationMode()); 652 652 if (op.type == ModuleVar) 653 metadata. getPutInfo = GetPutInfo(bytecode.getPutInfo.resolveMode(), ClosureVar, bytecode.getPutInfo.initializationMode());653 metadata.m_getPutInfo = GetPutInfo(bytecode.m_getPutInfo.resolveMode(), ClosureVar, bytecode.m_getPutInfo.initializationMode()); 654 654 if (op.type == GlobalVar || op.type == GlobalVarWithVarInjectionChecks || op.type == GlobalLexicalVar || op.type == GlobalLexicalVarWithVarInjectionChecks) 655 metadata. watchpointSet = op.watchpointSet;655 metadata.m_watchpointSet = op.watchpointSet; 656 656 else if (op.structure) 657 metadata. structure.set(vm, this, op.structure);658 metadata. operand = op.operand;657 metadata.m_structure.set(vm, this, op.structure); 658 metadata.m_operand = op.operand; 659 659 break; 660 660 } … … 663 663 INITIALIZE_METADATA(OpPutToScope) 664 664 665 if (bytecode. getPutInfo.resolveType() == LocalClosureVar) {665 if (bytecode.m_getPutInfo.resolveType() == LocalClosureVar) { 666 666 // Only do watching if the property we're putting to is not anonymous. 667 if (bytecode. var != UINT_MAX) {668 SymbolTable* symbolTable = jsCast<SymbolTable*>(getConstant(bytecode. symbolTableOrScopeDepth));669 const Identifier& ident = identifier(bytecode. var);667 if (bytecode.m_var != UINT_MAX) { 668 SymbolTable* symbolTable = jsCast<SymbolTable*>(getConstant(bytecode.m_symbolTableOrScopeDepth)); 669 const Identifier& ident = identifier(bytecode.m_var); 670 670 ConcurrentJSLocker locker(symbolTable->m_lock); 671 671 auto iter = symbolTable->find(locker, ident.impl()); 672 672 ASSERT(iter != symbolTable->end(locker)); 673 673 iter->value.prepareToWatch(); 674 metadata. watchpointSet = iter->value.watchpointSet();674 metadata.m_watchpointSet = iter->value.watchpointSet(); 675 675 } else 676 metadata. watchpointSet = nullptr;676 metadata.m_watchpointSet = nullptr; 677 677 break; 678 678 } 679 679 680 const Identifier& ident = identifier(bytecode. var);681 metadata. watchpointSet = nullptr;682 ResolveOp op = JSScope::abstractResolve(m_globalObject->globalExec(), bytecode. symbolTableOrScopeDepth, scope, ident, Put, bytecode.getPutInfo.resolveType(), bytecode.getPutInfo.initializationMode());680 const Identifier& ident = identifier(bytecode.m_var); 681 metadata.m_watchpointSet = nullptr; 682 ResolveOp op = JSScope::abstractResolve(m_globalObject->globalExec(), bytecode.m_symbolTableOrScopeDepth, scope, ident, Put, bytecode.m_getPutInfo.resolveType(), bytecode.m_getPutInfo.initializationMode()); 683 683 RETURN_IF_EXCEPTION(throwScope, false); 684 684 685 metadata. getPutInfo = GetPutInfo(bytecode.getPutInfo.resolveMode(), op.type, bytecode.getPutInfo.initializationMode());685 metadata.m_getPutInfo = GetPutInfo(bytecode.m_getPutInfo.resolveMode(), op.type, bytecode.m_getPutInfo.initializationMode()); 686 686 if (op.type == GlobalVar || op.type == GlobalVarWithVarInjectionChecks || op.type == GlobalLexicalVar || op.type == GlobalLexicalVarWithVarInjectionChecks) 687 metadata. watchpointSet = op.watchpointSet;687 metadata.m_watchpointSet = op.watchpointSet; 688 688 else if (op.type == ClosureVar || op.type == ClosureVarWithVarInjectionChecks) { 689 689 if (op.watchpointSet) 690 690 op.watchpointSet->invalidate(vm, PutToScopeFireDetail(this, ident)); 691 691 } else if (op.structure) 692 metadata. structure.set(vm, this, op.structure);693 metadata. operand = op.operand;692 metadata.m_structure.set(vm, this, op.structure); 693 metadata.m_operand = op.operand; 694 694 break; 695 695 } … … 707 707 SymbolTable* symbolTable = nullptr; 708 708 709 switch (bytecode. flag) {709 switch (bytecode.m_flag) { 710 710 case ProfileTypeBytecodeClosureVar: { 711 const Identifier& ident = identifier(bytecode. identifier);712 unsigned localScopeDepth = bytecode. symbolTableOrScopeDepth;711 const Identifier& ident = identifier(bytecode.m_identifier); 712 unsigned localScopeDepth = bytecode.m_symbolTableOrScopeDepth; 713 713 // Even though type profiling may be profiling either a Get or a Put, we can always claim a Get because 714 714 // we're abstractly "read"ing from a JSScope. 715 ResolveOp op = JSScope::abstractResolve(m_globalObject->globalExec(), localScopeDepth, scope, ident, Get, bytecode. resolveType, InitializationMode::NotInitialization);715 ResolveOp op = JSScope::abstractResolve(m_globalObject->globalExec(), localScopeDepth, scope, ident, Get, bytecode.m_resolveType, InitializationMode::NotInitialization); 716 716 RETURN_IF_EXCEPTION(throwScope, false); 717 717 … … 734 734 } 735 735 case ProfileTypeBytecodeLocallyResolved: { 736 int symbolTableIndex = bytecode. symbolTableOrScopeDepth;736 int symbolTableIndex = bytecode.m_symbolTableOrScopeDepth; 737 737 SymbolTable* symbolTable = jsCast<SymbolTable*>(getConstant(symbolTableIndex)); 738 const Identifier& ident = identifier(bytecode. identifier);738 const Identifier& ident = identifier(bytecode.m_identifier); 739 739 ConcurrentJSLocker locker(symbolTable->m_lock); 740 740 // If our parent scope was created while profiling was disabled, it will not have prepared for profiling yet. … … 771 771 bool isNewLocation = locationPair.second; 772 772 773 if (bytecode. flag == ProfileTypeBytecodeFunctionReturnStatement)773 if (bytecode.m_flag == ProfileTypeBytecodeFunctionReturnStatement) 774 774 location->m_divotForFunctionOffsetIfReturnStatement = ownerExecutable->typeProfilingStartOffset(); 775 775 … … 777 777 vm.typeProfiler()->insertNewLocation(location); 778 778 779 metadata. typeLocation = location;779 metadata.m_typeLocation = location; 780 780 break; 781 781 } 782 782 783 783 case op_debug: { 784 if (instruction->as<OpDebug>(). debugHookType == DidReachBreakpoint)784 if (instruction->as<OpDebug>().m_debugHookType == DidReachBreakpoint) 785 785 m_hasDebuggerStatement = true; 786 786 break; … … 788 788 789 789 case op_create_rest: { 790 int numberOfArgumentsToSkip = instruction->as<OpCreateRest>(). numParametersToSkip;790 int numberOfArgumentsToSkip = instruction->as<OpCreateRest>().m_numParametersToSkip; 791 791 ASSERT_UNUSED(numberOfArgumentsToSkip, numberOfArgumentsToSkip >= 0); 792 792 // This is used when rematerializing the rest parameter during OSR exit in the FTL JIT."); … … 1096 1096 if (instruction->is<OpPutById>()) { 1097 1097 auto& metadata = instruction->as<OpPutById>().metadata(this); 1098 StructureID oldStructureID = metadata. oldStructure;1099 StructureID newStructureID = metadata. newStructure;1098 StructureID oldStructureID = metadata.m_oldStructure; 1099 StructureID newStructureID = metadata.m_newStructure; 1100 1100 if (!oldStructureID || !newStructureID) 1101 1101 continue; … … 1208 1208 1209 1209 auto handleGetPutFromScope = [](auto& metadata) { 1210 GetPutInfo getPutInfo = metadata. getPutInfo;1210 GetPutInfo getPutInfo = metadata.m_getPutInfo; 1211 1211 if (getPutInfo.resolveType() == GlobalVar || getPutInfo.resolveType() == GlobalVarWithVarInjectionChecks 1212 1212 || getPutInfo.resolveType() == LocalClosureVar || getPutInfo.resolveType() == GlobalLexicalVar || getPutInfo.resolveType() == GlobalLexicalVarWithVarInjectionChecks) 1213 1213 return; 1214 WriteBarrierBase<Structure>& structure = metadata. structure;1214 WriteBarrierBase<Structure>& structure = metadata.m_structure; 1215 1215 if (!structure || Heap::isMarked(structure.get())) 1216 1216 return; … … 1225 1225 case op_get_by_id: { 1226 1226 auto& metadata = curInstruction->as<OpGetById>().metadata(this); 1227 if (metadata.m ode != GetByIdMode::Default)1227 if (metadata.m_mode != GetByIdMode::Default) 1228 1228 break; 1229 StructureID oldStructureID = metadata.m odeMetadata.defaultMode.structure;1229 StructureID oldStructureID = metadata.m_modeMetadata.defaultMode.structure; 1230 1230 if (!oldStructureID || Heap::isMarked(vm.heap.structureIDTable().get(oldStructureID))) 1231 1231 break; … … 1237 1237 case op_get_by_id_direct: { 1238 1238 auto& metadata = curInstruction->as<OpGetByIdDirect>().metadata(this); 1239 StructureID oldStructureID = metadata. structure;1239 StructureID oldStructureID = metadata.m_structure; 1240 1240 if (!oldStructureID || Heap::isMarked(vm.heap.structureIDTable().get(oldStructureID))) 1241 1241 break; 1242 1242 if (Options::verboseOSR()) 1243 1243 dataLogF("Clearing LLInt property access.\n"); 1244 metadata. structure = 0;1245 metadata. offset = 0;1244 metadata.m_structure = 0; 1245 metadata.m_offset = 0; 1246 1246 break; 1247 1247 } 1248 1248 case op_put_by_id: { 1249 1249 auto& metadata = curInstruction->as<OpPutById>().metadata(this); 1250 StructureID oldStructureID = metadata. oldStructure;1251 StructureID newStructureID = metadata. newStructure;1252 StructureChain* chain = metadata. structureChain.get();1250 StructureID oldStructureID = metadata.m_oldStructure; 1251 StructureID newStructureID = metadata.m_newStructure; 1252 StructureChain* chain = metadata.m_structureChain.get(); 1253 1253 if ((!oldStructureID || Heap::isMarked(vm.heap.structureIDTable().get(oldStructureID))) 1254 1254 && (!newStructureID || Heap::isMarked(vm.heap.structureIDTable().get(newStructureID))) … … 1257 1257 if (Options::verboseOSR()) 1258 1258 dataLogF("Clearing LLInt put transition.\n"); 1259 metadata. oldStructure = 0;1260 metadata. offset = 0;1261 metadata. newStructure = 0;1262 metadata. structureChain.clear();1259 metadata.m_oldStructure = 0; 1260 metadata.m_offset = 0; 1261 metadata.m_newStructure = 0; 1262 metadata.m_structureChain.clear(); 1263 1263 break; 1264 1264 } … … 1269 1269 case op_to_this: { 1270 1270 auto& metadata = curInstruction->as<OpToThis>().metadata(this); 1271 if (!metadata. cachedStructure || Heap::isMarked(metadata.cachedStructure.get()))1271 if (!metadata.m_cachedStructure || Heap::isMarked(metadata.m_cachedStructure.get())) 1272 1272 break; 1273 1273 if (Options::verboseOSR()) 1274 dataLogF("Clearing LLInt to_this with structure %p.\n", metadata. cachedStructure.get());1275 metadata. cachedStructure.clear();1276 metadata. toThisStatus = merge(metadata.toThisStatus, ToThisClearedByGC);1274 dataLogF("Clearing LLInt to_this with structure %p.\n", metadata.m_cachedStructure.get()); 1275 metadata.m_cachedStructure.clear(); 1276 metadata.m_toThisStatus = merge(metadata.m_toThisStatus, ToThisClearedByGC); 1277 1277 break; 1278 1278 } 1279 1279 case op_create_this: { 1280 1280 auto& metadata = curInstruction->as<OpCreateThis>().metadata(this); 1281 auto& cacheWriteBarrier = metadata. cachedCallee;1281 auto& cacheWriteBarrier = metadata.m_cachedCallee; 1282 1282 if (!cacheWriteBarrier || cacheWriteBarrier.unvalidatedGet() == JSCell::seenMultipleCalleeObjects()) 1283 1283 break; … … 1295 1295 // to the symbol table strongly. But it's nice to be on the safe side. 1296 1296 auto& metadata = curInstruction->as<OpResolveScope>().metadata(this); 1297 WriteBarrierBase<SymbolTable>& symbolTable = metadata. symbolTable;1297 WriteBarrierBase<SymbolTable>& symbolTable = metadata.m_symbolTable; 1298 1298 if (!symbolTable || Heap::isMarked(symbolTable.get())) 1299 1299 break; … … 1666 1666 OpCatch op = instruction->as<OpCatch>(); 1667 1667 auto& metadata = op.metadata(this); 1668 if (!!metadata. buffer) {1668 if (!!metadata.m_buffer) { 1669 1669 #if !ASSERT_DISABLED 1670 1670 ConcurrentJSLocker locker(m_lock); 1671 1671 bool found = false; 1672 1672 for (auto& profile : m_catchProfiles) { 1673 if (profile.get() == metadata. buffer) {1673 if (profile.get() == metadata.m_buffer) { 1674 1674 found = true; 1675 1675 break; … … 1714 1714 WTF::storeStoreFence(); 1715 1715 1716 op.metadata(this). buffer = profiles.get();1716 op.metadata(this).m_buffer = profiles.get(); 1717 1717 1718 1718 { … … 2492 2492 #define CASE(Op) \ 2493 2493 case Op::opcodeID: \ 2494 return &instruction->as<Op>().metadata(this). arrayProfile;2494 return &instruction->as<Op>().metadata(this).m_arrayProfile; 2495 2495 2496 2496 FOR_EACH_OPCODE_WITH_ARRAY_PROFILE(CASE) … … 2500 2500 auto bytecode = instruction->as<OpGetById>(); 2501 2501 auto& metadata = bytecode.metadata(this); 2502 if (metadata.m ode == GetByIdMode::ArrayLength)2503 return &metadata.m odeMetadata.arrayLengthMode.arrayProfile;2502 if (metadata.m_mode == GetByIdMode::ArrayLength) 2503 return &metadata.m_modeMetadata.arrayLengthMode.arrayProfile; 2504 2504 break; 2505 2505 } … … 2687 2687 auto bytecode = instruction->as<OpResolveScope>(); 2688 2688 auto& metadata = bytecode.metadata(this); 2689 ResolveType originalResolveType = metadata. resolveType;2689 ResolveType originalResolveType = metadata.m_resolveType; 2690 2690 if (originalResolveType == GlobalProperty || originalResolveType == GlobalPropertyWithVarInjectionChecks) { 2691 const Identifier& ident = identifier(bytecode. var);2691 const Identifier& ident = identifier(bytecode.m_var); 2692 2692 if (set.contains(ident.impl())) { 2693 2693 // We pass JSGlobalLexicalScope as a start point of the scope chain. 2694 2694 // It should immediately find the lexical binding because that's the reason why we perform this rewriting now. 2695 ResolveOp op = JSScope::abstractResolve(m_globalObject->globalExec(), bytecode. localScopeDepth, globalObject->globalScope(), ident, Get, bytecode.resolveType, InitializationMode::NotInitialization);2695 ResolveOp op = JSScope::abstractResolve(m_globalObject->globalExec(), bytecode.m_localScopeDepth, globalObject->globalScope(), ident, Get, bytecode.m_resolveType, InitializationMode::NotInitialization); 2696 2696 scope.releaseAssertNoException(); 2697 2697 ASSERT(op.type == GlobalLexicalVarWithVarInjectionChecks || op.type == GlobalLexicalVar); 2698 metadata. resolveType = needsVarInjectionChecks(originalResolveType) ? GlobalLexicalVarWithVarInjectionChecks : GlobalLexicalVar;2699 metadata. localScopeDepth = 0;2698 metadata.m_resolveType = needsVarInjectionChecks(originalResolveType) ? GlobalLexicalVarWithVarInjectionChecks : GlobalLexicalVar; 2699 metadata.m_localScopeDepth = 0; 2700 2700 ASSERT(!op.lexicalEnvironment); 2701 JSScope* constantScope = JSScope::constantScopeForCodeBlock(metadata. resolveType, this);2701 JSScope* constantScope = JSScope::constantScopeForCodeBlock(metadata.m_resolveType, this); 2702 2702 ASSERT(constantScope == globalObject->globalScope()); 2703 metadata. constantScope.set(vm, this, constantScope);2704 dataLogLnIf(CodeBlockInternal::verbose, "Rewrite op_resolve_scope from ", originalResolveType, " to ", metadata. resolveType);2703 metadata.m_constantScope.set(vm, this, constantScope); 2704 dataLogLnIf(CodeBlockInternal::verbose, "Rewrite op_resolve_scope from ", originalResolveType, " to ", metadata.m_resolveType); 2705 2705 } 2706 2706 } … … 2711 2711 auto bytecode = instruction->as<OpGetFromScope>(); 2712 2712 auto& metadata = bytecode.metadata(this); 2713 ResolveType originalResolveType = metadata. getPutInfo.resolveType();2713 ResolveType originalResolveType = metadata.m_getPutInfo.resolveType(); 2714 2714 if (originalResolveType == GlobalProperty || originalResolveType == GlobalPropertyWithVarInjectionChecks) { 2715 const Identifier& ident = identifier(bytecode. var);2715 const Identifier& ident = identifier(bytecode.m_var); 2716 2716 if (set.contains(ident.impl())) { 2717 2717 // We pass JSGlobalLexicalScope as a start point of the scope chain. 2718 2718 // It should immediately find the lexical binding because that's the reason why we perform this rewriting now. 2719 ResolveOp op = JSScope::abstractResolve(m_globalObject->globalExec(), bytecode. localScopeDepth, globalObject->globalScope(), ident, Get, bytecode.getPutInfo.resolveType(), InitializationMode::NotInitialization);2719 ResolveOp op = JSScope::abstractResolve(m_globalObject->globalExec(), bytecode.m_localScopeDepth, globalObject->globalScope(), ident, Get, bytecode.m_getPutInfo.resolveType(), InitializationMode::NotInitialization); 2720 2720 scope.releaseAssertNoException(); 2721 2721 ASSERT(op.type == GlobalLexicalVarWithVarInjectionChecks || op.type == GlobalLexicalVar); 2722 metadata. getPutInfo = GetPutInfo(bytecode.getPutInfo.resolveMode(), needsVarInjectionChecks(originalResolveType) ? GlobalLexicalVarWithVarInjectionChecks : GlobalLexicalVar, bytecode.getPutInfo.initializationMode());2723 metadata. watchpointSet = op.watchpointSet;2724 metadata. operand = op.operand;2725 dataLogLnIf(CodeBlockInternal::verbose, "Rewrite op_get_from_scope from ", originalResolveType, " to ", metadata. getPutInfo.resolveType());2722 metadata.m_getPutInfo = GetPutInfo(bytecode.m_getPutInfo.resolveMode(), needsVarInjectionChecks(originalResolveType) ? GlobalLexicalVarWithVarInjectionChecks : GlobalLexicalVar, bytecode.m_getPutInfo.initializationMode()); 2723 metadata.m_watchpointSet = op.watchpointSet; 2724 metadata.m_operand = op.operand; 2725 dataLogLnIf(CodeBlockInternal::verbose, "Rewrite op_get_from_scope from ", originalResolveType, " to ", metadata.m_getPutInfo.resolveType()); 2726 2726 } 2727 2727 } … … 2732 2732 auto bytecode = instruction->as<OpPutToScope>(); 2733 2733 auto& metadata = bytecode.metadata(this); 2734 ResolveType originalResolveType = metadata. getPutInfo.resolveType();2734 ResolveType originalResolveType = metadata.m_getPutInfo.resolveType(); 2735 2735 if (originalResolveType == GlobalProperty || originalResolveType == GlobalPropertyWithVarInjectionChecks) { 2736 const Identifier& ident = identifier(bytecode. var);2736 const Identifier& ident = identifier(bytecode.m_var); 2737 2737 if (set.contains(ident.impl())) { 2738 2738 // We pass JSGlobalLexicalScope as a start point of the scope chain. 2739 2739 // It should immediately find the lexical binding because that's the reason why we perform this rewriting now. 2740 ResolveOp op = JSScope::abstractResolve(m_globalObject->globalExec(), bytecode. symbolTableOrScopeDepth, globalObject->globalScope(), ident, Put, bytecode.getPutInfo.resolveType(), bytecode.getPutInfo.initializationMode());2740 ResolveOp op = JSScope::abstractResolve(m_globalObject->globalExec(), bytecode.m_symbolTableOrScopeDepth, globalObject->globalScope(), ident, Put, bytecode.m_getPutInfo.resolveType(), bytecode.m_getPutInfo.initializationMode()); 2741 2741 scope.releaseAssertNoException(); 2742 2742 ASSERT(op.type == GlobalLexicalVarWithVarInjectionChecks || op.type == GlobalLexicalVar || op.type == Dynamic); 2743 2743 2744 2744 ResolveType resolveType = op.type; 2745 metadata. watchpointSet = nullptr;2745 metadata.m_watchpointSet = nullptr; 2746 2746 if (resolveType == GlobalLexicalVarWithVarInjectionChecks || resolveType == GlobalLexicalVar) { 2747 2747 resolveType = needsVarInjectionChecks(originalResolveType) ? GlobalLexicalVarWithVarInjectionChecks : GlobalLexicalVar; 2748 metadata. watchpointSet = op.watchpointSet;2748 metadata.m_watchpointSet = op.watchpointSet; 2749 2749 } 2750 metadata. getPutInfo = GetPutInfo(bytecode.getPutInfo.resolveMode(), resolveType, bytecode.getPutInfo.initializationMode());2751 metadata. operand = op.operand;2752 dataLogLnIf(CodeBlockInternal::verbose, "Rewrite op_put_to_scope from ", originalResolveType, " to ", metadata. getPutInfo.resolveType());2750 metadata.m_getPutInfo = GetPutInfo(bytecode.m_getPutInfo.resolveMode(), resolveType, bytecode.m_getPutInfo.initializationMode()); 2751 metadata.m_operand = op.operand; 2752 dataLogLnIf(CodeBlockInternal::verbose, "Rewrite op_put_to_scope from ", originalResolveType, " to ", metadata.m_getPutInfo.resolveType()); 2753 2753 } 2754 2754 } … … 2880 2880 #define CASE(Op) \ 2881 2881 case Op::opcodeID: \ 2882 return &instruction->as<Op>().metadata(this). profile;2882 return &instruction->as<Op>().metadata(this).m_profile; 2883 2883 2884 2884 FOR_EACH_OPCODE_WITH_VALUE_PROFILE(CASE) … … 3019 3019 switch (pc->opcodeID()) { 3020 3020 case op_negate: 3021 return &pc->as<OpNegate>().metadata(this). arithProfile;3021 return &pc->as<OpNegate>().metadata(this).m_arithProfile; 3022 3022 case op_add: 3023 return &pc->as<OpAdd>().metadata(this). arithProfile;3023 return &pc->as<OpAdd>().metadata(this).m_arithProfile; 3024 3024 case op_mul: 3025 return &pc->as<OpMul>().metadata(this). arithProfile;3025 return &pc->as<OpMul>().metadata(this).m_arithProfile; 3026 3026 case op_sub: 3027 return &pc->as<OpSub>().metadata(this). arithProfile;3027 return &pc->as<OpSub>().metadata(this).m_arithProfile; 3028 3028 case op_div: 3029 return &pc->as<OpDiv>().metadata(this). arithProfile;3029 return &pc->as<OpDiv>().metadata(this).m_arithProfile; 3030 3030 default: 3031 3031 break; … … 3067 3067 auto bytecode = instruction->as<OpProfileControlFlow>(); 3068 3068 auto& metadata = bytecode.metadata(this); 3069 int basicBlockStartOffset = bytecode. textOffset;3069 int basicBlockStartOffset = bytecode.m_textOffset; 3070 3070 int basicBlockEndOffset; 3071 3071 if (i + 1 < offsetsLength) { … … 3073 3073 auto endInstruction = m_instructions->at(endIdx); 3074 3074 RELEASE_ASSERT(endInstruction->opcodeID() == op_profile_control_flow); 3075 basicBlockEndOffset = endInstruction->as<OpProfileControlFlow>(). textOffset - 1;3075 basicBlockEndOffset = endInstruction->as<OpProfileControlFlow>().m_textOffset - 1; 3076 3076 } else { 3077 3077 basicBlockEndOffset = m_sourceOffset + ownerScriptExecutable()->source().length() - 1; // Offset before the closing brace. … … 3099 3099 if (basicBlockEndOffset < basicBlockStartOffset) { 3100 3100 RELEASE_ASSERT(i + 1 < offsetsLength); // We should never encounter dummy blocks at the end of a CodeBlock. 3101 metadata. basicBlockLocation = vm()->controlFlowProfiler()->dummyBasicBlock();3101 metadata.m_basicBlockLocation = vm()->controlFlowProfiler()->dummyBasicBlock(); 3102 3102 continue; 3103 3103 } … … 3123 3123 insertFunctionGaps(executable); 3124 3124 3125 metadata. basicBlockLocation = basicBlockLocation;3125 metadata.m_basicBlockLocation = basicBlockLocation; 3126 3126 } 3127 3127 } -
trunk/Source/JavaScriptCore/bytecode/CodeBlockInlines.h
r239626 r240041 40 40 if (m_metadata) { 41 41 #define VISIT(__op) \ 42 m_metadata->forEach<__op>([&] (auto& metadata) { func(metadata. profile); });42 m_metadata->forEach<__op>([&] (auto& metadata) { func(metadata.m_profile); }); 43 43 44 44 FOR_EACH_OPCODE_WITH_VALUE_PROFILE(VISIT) … … 54 54 if (m_metadata) { 55 55 m_metadata->forEach<OpGetById>([&] (auto& metadata) { 56 if (metadata.m ode == GetByIdMode::ArrayLength)57 func(metadata.m odeMetadata.arrayLengthMode.arrayProfile);56 if (metadata.m_mode == GetByIdMode::ArrayLength) 57 func(metadata.m_modeMetadata.arrayLengthMode.arrayProfile); 58 58 }); 59 59 60 60 #define VISIT(__op) \ 61 m_metadata->forEach<__op>([&] (auto& metadata) { func(metadata. arrayProfile); });61 m_metadata->forEach<__op>([&] (auto& metadata) { func(metadata.m_arrayProfile); }); 62 62 63 63 FOR_EACH_OPCODE_WITH_ARRAY_PROFILE(VISIT) … … 72 72 if (m_metadata) { 73 73 #define VISIT(__op) \ 74 m_metadata->forEach<__op>([&] (auto& metadata) { func(metadata. arrayAllocationProfile); });74 m_metadata->forEach<__op>([&] (auto& metadata) { func(metadata.m_arrayAllocationProfile); }); 75 75 76 76 FOR_EACH_OPCODE_WITH_ARRAY_ALLOCATION_PROFILE(VISIT) … … 85 85 if (m_metadata) { 86 86 #define VISIT(__op) \ 87 m_metadata->forEach<__op>([&] (auto& metadata) { func(metadata. objectAllocationProfile); });87 m_metadata->forEach<__op>([&] (auto& metadata) { func(metadata.m_objectAllocationProfile); }); 88 88 89 89 FOR_EACH_OPCODE_WITH_OBJECT_ALLOCATION_PROFILE(VISIT) … … 98 98 if (m_metadata) { 99 99 #define VISIT(__op) \ 100 m_metadata->forEach<__op>([&] (auto& metadata) { func(metadata. callLinkInfo); });100 m_metadata->forEach<__op>([&] (auto& metadata) { func(metadata.m_callLinkInfo); }); 101 101 102 102 FOR_EACH_OPCODE_WITH_LLINT_CALL_LINK_INFO(VISIT) -
trunk/Source/JavaScriptCore/bytecode/GetByIdStatus.cpp
r239427 r240041 1 1 /* 2 * Copyright (C) 2012-201 8Apple Inc. All rights reserved.2 * Copyright (C) 2012-2019 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 65 65 // FIXME: We should not just bail if we see a get_by_id_proto_load. 66 66 // https://bugs.webkit.org/show_bug.cgi?id=158039 67 if (metadata.m ode != GetByIdMode::Default)67 if (metadata.m_mode != GetByIdMode::Default) 68 68 return GetByIdStatus(NoInformation, false); 69 structureID = metadata.m odeMetadata.defaultMode.structure;69 structureID = metadata.m_modeMetadata.defaultMode.structure; 70 70 break; 71 71 } 72 72 case op_get_by_id_direct: 73 structureID = instruction->as<OpGetByIdDirect>().metadata(profiledBlock). structure;73 structureID = instruction->as<OpGetByIdDirect>().metadata(profiledBlock).m_structure; 74 74 break; 75 75 case op_try_get_by_id: { -
trunk/Source/JavaScriptCore/bytecode/LLIntPrototypeLoadAdaptiveStructureWatchpoint.cpp
r237547 r240041 1 1 /* 2 * Copyright (C) 2016-201 7Apple Inc. All rights reserved.2 * Copyright (C) 2016-2019 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 60 60 void LLIntPrototypeLoadAdaptiveStructureWatchpoint::clearLLIntGetByIdCache(OpGetById::Metadata& metadata) 61 61 { 62 metadata.m ode = GetByIdMode::Default;63 metadata.m odeMetadata.defaultMode.cachedOffset = 0;64 metadata.m odeMetadata.defaultMode.structure = 0;62 metadata.m_mode = GetByIdMode::Default; 63 metadata.m_modeMetadata.defaultMode.cachedOffset = 0; 64 metadata.m_modeMetadata.defaultMode.structure = 0; 65 65 } 66 66 -
trunk/Source/JavaScriptCore/bytecode/PreciseJumpTargetsInlines.h
r238499 r240041 1 1 /* 2 * Copyright (C) 2016-201 7Apple Inc. All rights reserved.2 * Copyright (C) 2016-2019 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 59 59 case op_switch_imm: { \ 60 60 auto bytecode = instruction->as<OpSwitchImm>(); \ 61 auto& table = codeBlock->switchJumpTable(bytecode. tableIndex); \61 auto& table = codeBlock->switchJumpTable(bytecode.m_tableIndex); \ 62 62 for (unsigned i = table.branchOffsets.size(); i--;) \ 63 63 SWITCH_CASE(table.branchOffsets[i]); \ … … 67 67 case op_switch_char: { \ 68 68 auto bytecode = instruction->as<OpSwitchChar>(); \ 69 auto& table = codeBlock->switchJumpTable(bytecode. tableIndex); \69 auto& table = codeBlock->switchJumpTable(bytecode.m_tableIndex); \ 70 70 for (unsigned i = table.branchOffsets.size(); i--;) \ 71 71 SWITCH_CASE(table.branchOffsets[i]); \ … … 75 75 case op_switch_string: { \ 76 76 auto bytecode = instruction->as<OpSwitchString>(); \ 77 auto& table = codeBlock->stringSwitchJumpTable(bytecode. tableIndex); \77 auto& table = codeBlock->stringSwitchJumpTable(bytecode.m_tableIndex); \ 78 78 auto iter = table.offsetTable.begin(); \ 79 79 auto end = table.offsetTable.end(); \ … … 109 109 { 110 110 auto bytecode = instruction->as<Op>(); 111 return jumpTargetForInstruction(codeBlock, instruction, bytecode. target);111 return jumpTargetForInstruction(codeBlock, instruction, bytecode.m_target); 112 112 } 113 113 … … 124 124 125 125 #define SWITCH_DEFAULT_OFFSET(__op) \ 126 function(jumpTargetForInstruction(codeBlock, instruction, bytecode. defaultOffset)) \126 function(jumpTargetForInstruction(codeBlock, instruction, bytecode.m_defaultOffset)) \ 127 127 128 128 SWITCH_JMP(CASE_OP, SWITCH_CASE, SWITCH_DEFAULT_OFFSET) … … 155 155 #define SWITCH_DEFAULT_OFFSET(__op) \ 156 156 do { \ 157 int32_t target = jumpTargetForInstruction(codeBlockOrHashMap, instruction, bytecode. defaultOffset); \157 int32_t target = jumpTargetForInstruction(codeBlockOrHashMap, instruction, bytecode.m_defaultOffset); \ 158 158 int32_t newTarget = function(target); \ 159 159 instruction->cast<__op>()->setDefaultOffset(BoundLabel(newTarget), [&]() { \ -
trunk/Source/JavaScriptCore/bytecode/PutByIdStatus.cpp
r240023 r240041 1 1 /* 2 * Copyright (C) 2012-201 8Apple Inc. All rights reserved.2 * Copyright (C) 2012-2019 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 56 56 auto& metadata = bytecode.metadata(profiledBlock); 57 57 58 StructureID structureID = metadata. oldStructure;58 StructureID structureID = metadata.m_oldStructure; 59 59 if (!structureID) 60 60 return PutByIdStatus(NoInformation); … … 62 62 Structure* structure = vm.heap.structureIDTable().get(structureID); 63 63 64 StructureID newStructureID = metadata. newStructure;64 StructureID newStructureID = metadata.m_newStructure; 65 65 if (!newStructureID) { 66 66 PropertyOffset offset = structure->getConcurrently(uid); … … 80 80 81 81 ObjectPropertyConditionSet conditionSet; 82 if (!(bytecode. flags & PutByIdIsDirect)) {82 if (!(bytecode.m_flags & PutByIdIsDirect)) { 83 83 conditionSet = 84 84 generateConditionsForPropertySetterMissConcurrently( -
trunk/Source/JavaScriptCore/bytecode/UnlinkedCodeBlock.cpp
r237547 r240041 1 1 /* 2 * Copyright (C) 2012-201 8Apple Inc. All Rights Reserved.2 * Copyright (C) 2012-2019 Apple Inc. All Rights Reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 146 146 const char* event = ""; 147 147 if (instruction->is<OpDebug>()) { 148 switch (instruction->as<OpDebug>(). debugHookType) {148 switch (instruction->as<OpDebug>().m_debugHookType) { 149 149 case WillExecuteProgram: event = " WillExecuteProgram"; break; 150 150 case DidExecuteProgram: event = " DidExecuteProgram"; break; -
trunk/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp
r239774 r240041 1 1 /* 2 * Copyright (C) 2008-201 8Apple Inc. All rights reserved.2 * Copyright (C) 2008-2019 Apple Inc. All rights reserved. 3 3 * Copyright (C) 2008 Cameron Zwarich <cwzwarich@uwaterloo.ca> 4 4 * Copyright (C) 2012 Igalia, S.L. … … 1390 1390 { 1391 1391 auto binop = m_lastInstruction->as<BinOp>(); 1392 if (cond->index() == binop. dst.offset() && cond->isTemporary() && !cond->refCount()) {1392 if (cond->index() == binop.m_dst.offset() && cond->isTemporary() && !cond->refCount()) { 1393 1393 rewind(); 1394 1394 1395 1395 if (swapOperands) 1396 std::swap(binop. lhs, binop.rhs);1397 1398 JmpOp::emit(this, binop. lhs, binop.rhs, target.bind(this));1396 std::swap(binop.m_lhs, binop.m_rhs); 1397 1398 JmpOp::emit(this, binop.m_lhs, binop.m_rhs, target.bind(this)); 1399 1399 return true; 1400 1400 } … … 1406 1406 { 1407 1407 auto unop = m_lastInstruction->as<UnaryOp>(); 1408 if (cond->index() == unop. dst.offset() && cond->isTemporary() && !cond->refCount()) {1408 if (cond->index() == unop.m_dst.offset() && cond->isTemporary() && !cond->refCount()) { 1409 1409 rewind(); 1410 1410 1411 JmpOp::emit(this, unop. operand, target.bind(this));1411 JmpOp::emit(this, unop.m_operand, target.bind(this)); 1412 1412 return true; 1413 1413 } … … 1710 1710 if (m_lastInstruction->is<OpTypeof>()) { 1711 1711 auto op = m_lastInstruction->as<OpTypeof>(); 1712 if (src1->index() == op. dst.offset()1712 if (src1->index() == op.m_dst.offset() 1713 1713 && src1->isTemporary() 1714 1714 && m_codeBlock->isConstantRegisterIndex(src2->index()) … … 1717 1717 if (value == "undefined") { 1718 1718 rewind(); 1719 OpIsUndefined::emit(this, dst, op. value);1719 OpIsUndefined::emit(this, dst, op.m_value); 1720 1720 return dst; 1721 1721 } 1722 1722 if (value == "boolean") { 1723 1723 rewind(); 1724 OpIsBoolean::emit(this, dst, op. value);1724 OpIsBoolean::emit(this, dst, op.m_value); 1725 1725 return dst; 1726 1726 } 1727 1727 if (value == "number") { 1728 1728 rewind(); 1729 OpIsNumber::emit(this, dst, op. value);1729 OpIsNumber::emit(this, dst, op.m_value); 1730 1730 return dst; 1731 1731 } 1732 1732 if (value == "string") { 1733 1733 rewind(); 1734 OpIsCellWithType::emit(this, dst, op. value, StringType);1734 OpIsCellWithType::emit(this, dst, op.m_value, StringType); 1735 1735 return dst; 1736 1736 } 1737 1737 if (value == "symbol") { 1738 1738 rewind(); 1739 OpIsCellWithType::emit(this, dst, op. value, SymbolType);1739 OpIsCellWithType::emit(this, dst, op.m_value, SymbolType); 1740 1740 return dst; 1741 1741 } 1742 1742 if (Options::useBigInt() && value == "bigint") { 1743 1743 rewind(); 1744 OpIsCellWithType::emit(this, dst, op. value, BigIntType);1744 OpIsCellWithType::emit(this, dst, op.m_value, BigIntType); 1745 1745 return dst; 1746 1746 } 1747 1747 if (value == "object") { 1748 1748 rewind(); 1749 OpIsObjectOrNull::emit(this, dst, op. value);1749 OpIsObjectOrNull::emit(this, dst, op.m_value); 1750 1750 return dst; 1751 1751 } 1752 1752 if (value == "function") { 1753 1753 rewind(); 1754 OpIsFunction::emit(this, dst, op. value);1754 OpIsFunction::emit(this, dst, op.m_value); 1755 1755 return dst; 1756 1756 } … … 3890 3890 }); 3891 3891 3892 UnlinkedSimpleJumpTable& jumpTable = m_codeBlock->switchJumpTable(bytecode. tableIndex);3892 UnlinkedSimpleJumpTable& jumpTable = m_codeBlock->switchJumpTable(bytecode.m_tableIndex); 3893 3893 prepareJumpTableForSwitch( 3894 3894 jumpTable, switchInfo.bytecodeOffset, clauseCount, labels, nodes, min, max, … … 3915 3915 }); 3916 3916 3917 UnlinkedStringJumpTable& jumpTable = m_codeBlock->stringSwitchJumpTable(ref->as<OpSwitchString>(). tableIndex);3917 UnlinkedStringJumpTable& jumpTable = m_codeBlock->stringSwitchJumpTable(ref->as<OpSwitchString>().m_tableIndex); 3918 3918 prepareJumpTableForStringSwitch(jumpTable, switchInfo.bytecodeOffset, clauseCount, labels, nodes); 3919 3919 break; … … 4861 4861 // 2. base stays the same. 4862 4862 // 3. property gets switched to the original property. 4863 OpGetByVal::emit<OpcodeSize::Wide>(&generator, bytecode. dst, bytecode.base, VirtualRegister(propertyRegIndex));4863 OpGetByVal::emit<OpcodeSize::Wide>(&generator, bytecode.m_dst, bytecode.m_base, VirtualRegister(propertyRegIndex)); 4864 4864 4865 4865 // 4. nop out the remaining bytes -
trunk/Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp
r240023 r240041 1 1 /* 2 * Copyright (C) 2011-201 8Apple Inc. All rights reserved.2 * Copyright (C) 2011-2019 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 1232 1232 { 1233 1233 auto bytecode = pc->as<CallOp>(); 1234 Node* callTarget = get(bytecode. callee);1235 int registerOffset = -static_cast<int>(bytecode. argv);1234 Node* callTarget = get(bytecode.m_callee); 1235 int registerOffset = -static_cast<int>(bytecode.m_argv); 1236 1236 1237 1237 CallLinkStatus callLinkStatus = CallLinkStatus::computeFor( … … 1241 1241 InlineCallFrame::Kind kind = InlineCallFrame::kindFor(callMode); 1242 1242 1243 return handleCall(bytecode. dst, op, kind, pc->size(), callTarget,1244 bytecode. argc, registerOffset, callLinkStatus, getPrediction());1243 return handleCall(bytecode.m_dst, op, kind, pc->size(), callTarget, 1244 bytecode.m_argc, registerOffset, callLinkStatus, getPrediction()); 1245 1245 } 1246 1246 … … 1288 1288 { 1289 1289 auto bytecode = pc->as<CallOp>(); 1290 int firstFreeReg = bytecode. firstFree.offset();1291 int firstVarArgOffset = bytecode. firstVarArg;1290 int firstFreeReg = bytecode.m_firstFree.offset(); 1291 int firstVarArgOffset = bytecode.m_firstVarArg; 1292 1292 1293 1293 SpeculatedType prediction = getPrediction(); 1294 1294 1295 Node* callTarget = get(bytecode. callee);1295 Node* callTarget = get(bytecode.m_callee); 1296 1296 1297 1297 CallLinkStatus callLinkStatus = CallLinkStatus::computeFor( … … 1305 1305 addToGraph(FilterCallLinkStatus, OpInfo(m_graph.m_plan.recordedStatuses().addCallLinkStatus(currentCodeOrigin(), callLinkStatus)), callTarget); 1306 1306 1307 if (handleVarargsInlining(callTarget, bytecode. dst,1308 callLinkStatus, firstFreeReg, bytecode. thisValue, bytecode.arguments,1307 if (handleVarargsInlining(callTarget, bytecode.m_dst, 1308 callLinkStatus, firstFreeReg, bytecode.m_thisValue, bytecode.m_arguments, 1309 1309 firstVarArgOffset, op, 1310 1310 InlineCallFrame::varargsKindFor(callMode))) { … … 1318 1318 data->firstVarArgOffset = firstVarArgOffset; 1319 1319 1320 Node* thisChild = get(bytecode. thisValue);1320 Node* thisChild = get(bytecode.m_thisValue); 1321 1321 Node* argumentsChild = nullptr; 1322 1322 if (op != TailCallForwardVarargs) 1323 argumentsChild = get(bytecode. arguments);1323 argumentsChild = get(bytecode.m_arguments); 1324 1324 1325 1325 if (op == TailCallVarargs || op == TailCallForwardVarargs) { … … 1332 1332 1333 1333 Node* call = addToGraph(op, OpInfo(data), OpInfo(prediction), callTarget, thisChild, argumentsChild); 1334 if (bytecode. dst.isValid())1335 set(bytecode. dst, call);1334 if (bytecode.m_dst.isValid()) 1335 set(bytecode.m_dst, call); 1336 1336 return NonTerminal; 1337 1337 } … … 4580 4580 SpeculatedType prediction = getPrediction(); 4581 4581 4582 Node* base = get(bytecode. base);4583 unsigned identifierNumber = m_inlineStackTop->m_identifierRemap[bytecode. property];4582 Node* base = get(bytecode.m_base); 4583 unsigned identifierNumber = m_inlineStackTop->m_identifierRemap[bytecode.m_property]; 4584 4584 4585 4585 UniquedStringImpl* uid = m_graph.identifiers()[identifierNumber]; … … 4597 4597 4598 4598 handleGetById( 4599 bytecode. dst, prediction, base, identifierNumber, getByIdStatus, type, opcodeLength);4599 bytecode.m_dst, prediction, base, identifierNumber, getByIdStatus, type, opcodeLength); 4600 4600 4601 4601 } … … 4734 4734 if (op1->op() != ToThis) { 4735 4735 auto& metadata = currentInstruction->as<OpToThis>().metadata(codeBlock); 4736 Structure* cachedStructure = metadata. cachedStructure.get();4737 if (metadata. toThisStatus != ToThisOK4736 Structure* cachedStructure = metadata.m_cachedStructure.get(); 4737 if (metadata.m_toThisStatus != ToThisOK 4738 4738 || !cachedStructure 4739 4739 || cachedStructure->classInfo()->methodTable.toThis != JSObject::info()->methodTable.toThis … … 4754 4754 case op_create_this: { 4755 4755 auto bytecode = currentInstruction->as<OpCreateThis>(); 4756 Node* callee = get(VirtualRegister(bytecode. callee));4756 Node* callee = get(VirtualRegister(bytecode.m_callee)); 4757 4757 4758 4758 JSFunction* function = callee->dynamicCastConstant<JSFunction*>(*m_vm); 4759 4759 if (!function) { 4760 JSCell* cachedFunction = bytecode.metadata(codeBlock). cachedCallee.unvalidatedGet();4760 JSCell* cachedFunction = bytecode.metadata(codeBlock).m_cachedCallee.unvalidatedGet(); 4761 4761 if (cachedFunction 4762 4762 && cachedFunction != JSCell::seenMultipleCalleeObjects() … … 4794 4794 addToGraph(PutByOffset, OpInfo(data), object, object, weakJSConstant(prototype)); 4795 4795 } 4796 set(VirtualRegister(bytecode. dst), object);4796 set(VirtualRegister(bytecode.m_dst), object); 4797 4797 alreadyEmitted = true; 4798 4798 } … … 4801 4801 } 4802 4802 if (!alreadyEmitted) { 4803 set(VirtualRegister(bytecode. dst),4804 addToGraph(CreateThis, OpInfo(bytecode. inlineCapacity), callee));4803 set(VirtualRegister(bytecode.m_dst), 4804 addToGraph(CreateThis, OpInfo(bytecode.m_inlineCapacity), callee)); 4805 4805 } 4806 4806 NEXT_OPCODE(op_create_this); … … 4809 4809 case op_new_object: { 4810 4810 auto bytecode = currentInstruction->as<OpNewObject>(); 4811 set(bytecode. dst,4811 set(bytecode.m_dst, 4812 4812 addToGraph(NewObject, 4813 OpInfo(m_graph.registerStructure(bytecode.metadata(codeBlock). objectAllocationProfile.structure()))));4813 OpInfo(m_graph.registerStructure(bytecode.metadata(codeBlock).m_objectAllocationProfile.structure())))); 4814 4814 NEXT_OPCODE(op_new_object); 4815 4815 } … … 4817 4817 case op_new_array: { 4818 4818 auto bytecode = currentInstruction->as<OpNewArray>(); 4819 int startOperand = bytecode. argv.offset();4820 int numOperands = bytecode. argc;4821 ArrayAllocationProfile& profile = bytecode.metadata(codeBlock). arrayAllocationProfile;4819 int startOperand = bytecode.m_argv.offset(); 4820 int numOperands = bytecode.m_argc; 4821 ArrayAllocationProfile& profile = bytecode.metadata(codeBlock).m_arrayAllocationProfile; 4822 4822 for (int operandIdx = startOperand; operandIdx > startOperand - numOperands; --operandIdx) 4823 4823 addVarArgChild(get(VirtualRegister(operandIdx))); 4824 4824 unsigned vectorLengthHint = std::max<unsigned>(profile.vectorLengthHint(), numOperands); 4825 set(bytecode. dst, addToGraph(Node::VarArg, NewArray, OpInfo(profile.selectIndexingType()), OpInfo(vectorLengthHint)));4825 set(bytecode.m_dst, addToGraph(Node::VarArg, NewArray, OpInfo(profile.selectIndexingType()), OpInfo(vectorLengthHint))); 4826 4826 NEXT_OPCODE(op_new_array); 4827 4827 } … … 4829 4829 case op_new_array_with_spread: { 4830 4830 auto bytecode = currentInstruction->as<OpNewArrayWithSpread>(); 4831 int startOperand = bytecode. argv.offset();4832 int numOperands = bytecode. argc;4833 const BitVector& bitVector = m_inlineStackTop->m_profiledBlock->unlinkedCodeBlock()->bitVector(bytecode. bitVector);4831 int startOperand = bytecode.m_argv.offset(); 4832 int numOperands = bytecode.m_argc; 4833 const BitVector& bitVector = m_inlineStackTop->m_profiledBlock->unlinkedCodeBlock()->bitVector(bytecode.m_bitVector); 4834 4834 for (int operandIdx = startOperand; operandIdx > startOperand - numOperands; --operandIdx) 4835 4835 addVarArgChild(get(VirtualRegister(operandIdx))); … … 4838 4838 ASSERT(*copy == bitVector); 4839 4839 4840 set(bytecode. dst,4840 set(bytecode.m_dst, 4841 4841 addToGraph(Node::VarArg, NewArrayWithSpread, OpInfo(copy))); 4842 4842 NEXT_OPCODE(op_new_array_with_spread); … … 4845 4845 case op_spread: { 4846 4846 auto bytecode = currentInstruction->as<OpSpread>(); 4847 set(bytecode. dst,4848 addToGraph(Spread, get(bytecode. argument)));4847 set(bytecode.m_dst, 4848 addToGraph(Spread, get(bytecode.m_argument))); 4849 4849 NEXT_OPCODE(op_spread); 4850 4850 } … … 4852 4852 case op_new_array_with_size: { 4853 4853 auto bytecode = currentInstruction->as<OpNewArrayWithSize>(); 4854 ArrayAllocationProfile& profile = bytecode.metadata(codeBlock). arrayAllocationProfile;4855 set(bytecode. dst, addToGraph(NewArrayWithSize, OpInfo(profile.selectIndexingType()), get(bytecode.length)));4854 ArrayAllocationProfile& profile = bytecode.metadata(codeBlock).m_arrayAllocationProfile; 4855 set(bytecode.m_dst, addToGraph(NewArrayWithSize, OpInfo(profile.selectIndexingType()), get(bytecode.m_length))); 4856 4856 NEXT_OPCODE(op_new_array_with_size); 4857 4857 } … … 4862 4862 // cannot allocate from compilation threads. 4863 4863 WTF::loadLoadFence(); 4864 FrozenValue* frozen = get(VirtualRegister(bytecode. immutableButterfly))->constant();4864 FrozenValue* frozen = get(VirtualRegister(bytecode.m_immutableButterfly))->constant(); 4865 4865 WTF::loadLoadFence(); 4866 4866 JSImmutableButterfly* immutableButterfly = frozen->cast<JSImmutableButterfly*>(); … … 4869 4869 data.vectorLengthHint = immutableButterfly->toButterfly()->vectorLength(); 4870 4870 4871 set(VirtualRegister(bytecode. dst), addToGraph(NewArrayBuffer, OpInfo(frozen), OpInfo(data.asQuadWord)));4871 set(VirtualRegister(bytecode.m_dst), addToGraph(NewArrayBuffer, OpInfo(frozen), OpInfo(data.asQuadWord))); 4872 4872 NEXT_OPCODE(op_new_array_buffer); 4873 4873 } … … 4875 4875 case op_new_regexp: { 4876 4876 auto bytecode = currentInstruction->as<OpNewRegexp>(); 4877 ASSERT(bytecode. regexp.isConstant());4878 FrozenValue* frozenRegExp = m_graph.freezeStrong(m_inlineStackTop->m_codeBlock->getConstant(bytecode. regexp.offset()));4879 set(bytecode. dst, addToGraph(NewRegexp, OpInfo(frozenRegExp), jsConstant(jsNumber(0))));4877 ASSERT(bytecode.m_regexp.isConstant()); 4878 FrozenValue* frozenRegExp = m_graph.freezeStrong(m_inlineStackTop->m_codeBlock->getConstant(bytecode.m_regexp.offset())); 4879 set(bytecode.m_dst, addToGraph(NewRegexp, OpInfo(frozenRegExp), jsConstant(jsNumber(0)))); 4880 4880 NEXT_OPCODE(op_new_regexp); 4881 4881 } … … 4888 4888 unsigned argumentsLength = inlineCallFrame->argumentCountIncludingThis - 1; 4889 4889 JSValue restLength; 4890 if (argumentsLength <= bytecode. numParametersToSkip)4890 if (argumentsLength <= bytecode.m_numParametersToSkip) 4891 4891 restLength = jsNumber(0); 4892 4892 else 4893 restLength = jsNumber(argumentsLength - bytecode. numParametersToSkip);4893 restLength = jsNumber(argumentsLength - bytecode.m_numParametersToSkip); 4894 4894 4895 4895 length = jsConstant(restLength); 4896 4896 } else 4897 length = addToGraph(GetRestLength, OpInfo(bytecode. numParametersToSkip));4898 set(bytecode. dst, length);4897 length = addToGraph(GetRestLength, OpInfo(bytecode.m_numParametersToSkip)); 4898 set(bytecode.m_dst, length); 4899 4899 NEXT_OPCODE(op_get_rest_length); 4900 4900 } … … 4903 4903 auto bytecode = currentInstruction->as<OpCreateRest>(); 4904 4904 noticeArgumentsUse(); 4905 Node* arrayLength = get(bytecode. arraySize);4906 set(bytecode. dst,4907 addToGraph(CreateRest, OpInfo(bytecode. numParametersToSkip), arrayLength));4905 Node* arrayLength = get(bytecode.m_arraySize); 4906 set(bytecode.m_dst, 4907 addToGraph(CreateRest, OpInfo(bytecode.m_numParametersToSkip), arrayLength)); 4908 4908 NEXT_OPCODE(op_create_rest); 4909 4909 } … … 4913 4913 case op_bitnot: { 4914 4914 auto bytecode = currentInstruction->as<OpBitnot>(); 4915 Node* op1 = get(bytecode. operand);4916 set(bytecode. dst, addToGraph(ArithBitNot, op1));4915 Node* op1 = get(bytecode.m_operand); 4916 set(bytecode.m_dst, addToGraph(ArithBitNot, op1)); 4917 4917 NEXT_OPCODE(op_bitnot); 4918 4918 } … … 4921 4921 auto bytecode = currentInstruction->as<OpBitand>(); 4922 4922 SpeculatedType prediction = getPrediction(); 4923 Node* op1 = get(bytecode. lhs);4924 Node* op2 = get(bytecode. rhs);4923 Node* op1 = get(bytecode.m_lhs); 4924 Node* op2 = get(bytecode.m_rhs); 4925 4925 if (op1->hasNumberOrAnyIntResult() && op2->hasNumberOrAnyIntResult()) 4926 set(bytecode. dst, addToGraph(ArithBitAnd, op1, op2));4926 set(bytecode.m_dst, addToGraph(ArithBitAnd, op1, op2)); 4927 4927 else 4928 set(bytecode. dst, addToGraph(ValueBitAnd, OpInfo(), OpInfo(prediction), op1, op2));4928 set(bytecode.m_dst, addToGraph(ValueBitAnd, OpInfo(), OpInfo(prediction), op1, op2)); 4929 4929 NEXT_OPCODE(op_bitand); 4930 4930 } … … 4933 4933 auto bytecode = currentInstruction->as<OpBitor>(); 4934 4934 SpeculatedType prediction = getPrediction(); 4935 Node* op1 = get(bytecode. lhs);4936 Node* op2 = get(bytecode. rhs);4935 Node* op1 = get(bytecode.m_lhs); 4936 Node* op2 = get(bytecode.m_rhs); 4937 4937 if (op1->hasNumberOrAnyIntResult() && op2->hasNumberOrAnyIntResult()) 4938 set(bytecode. dst, addToGraph(ArithBitOr, op1, op2));4938 set(bytecode.m_dst, addToGraph(ArithBitOr, op1, op2)); 4939 4939 else 4940 set(bytecode. dst, addToGraph(ValueBitOr, OpInfo(), OpInfo(prediction), op1, op2));4940 set(bytecode.m_dst, addToGraph(ValueBitOr, OpInfo(), OpInfo(prediction), op1, op2)); 4941 4941 NEXT_OPCODE(op_bitor); 4942 4942 } … … 4945 4945 auto bytecode = currentInstruction->as<OpBitxor>(); 4946 4946 SpeculatedType prediction = getPrediction(); 4947 Node* op1 = get(bytecode. lhs);4948 Node* op2 = get(bytecode. rhs);4947 Node* op1 = get(bytecode.m_lhs); 4948 Node* op2 = get(bytecode.m_rhs); 4949 4949 if (op1->hasNumberOrAnyIntResult() && op2->hasNumberOrAnyIntResult()) 4950 set(bytecode. dst, addToGraph(ArithBitXor, op1, op2));4950 set(bytecode.m_dst, addToGraph(ArithBitXor, op1, op2)); 4951 4951 else 4952 set(bytecode. dst, addToGraph(ValueBitXor, OpInfo(), OpInfo(prediction), op1, op2));4953 NEXT_OPCODE(op_bit or);4952 set(bytecode.m_dst, addToGraph(ValueBitXor, OpInfo(), OpInfo(prediction), op1, op2)); 4953 NEXT_OPCODE(op_bitxor); 4954 4954 } 4955 4955 4956 4956 case op_rshift: { 4957 4957 auto bytecode = currentInstruction->as<OpRshift>(); 4958 Node* op1 = get(bytecode. lhs);4959 Node* op2 = get(bytecode. rhs);4960 set(bytecode. dst, addToGraph(BitRShift, op1, op2));4958 Node* op1 = get(bytecode.m_lhs); 4959 Node* op2 = get(bytecode.m_rhs); 4960 set(bytecode.m_dst, addToGraph(BitRShift, op1, op2)); 4961 4961 NEXT_OPCODE(op_rshift); 4962 4962 } … … 4964 4964 case op_lshift: { 4965 4965 auto bytecode = currentInstruction->as<OpLshift>(); 4966 Node* op1 = get(bytecode. lhs);4967 Node* op2 = get(bytecode. rhs);4968 set(bytecode. dst, addToGraph(BitLShift, op1, op2));4966 Node* op1 = get(bytecode.m_lhs); 4967 Node* op2 = get(bytecode.m_rhs); 4968 set(bytecode.m_dst, addToGraph(BitLShift, op1, op2)); 4969 4969 NEXT_OPCODE(op_lshift); 4970 4970 } … … 4972 4972 case op_urshift: { 4973 4973 auto bytecode = currentInstruction->as<OpUrshift>(); 4974 Node* op1 = get(bytecode. lhs);4975 Node* op2 = get(bytecode. rhs);4976 set(bytecode. dst, addToGraph(BitURShift, op1, op2));4974 Node* op1 = get(bytecode.m_lhs); 4975 Node* op2 = get(bytecode.m_rhs); 4976 set(bytecode.m_dst, addToGraph(BitURShift, op1, op2)); 4977 4977 NEXT_OPCODE(op_urshift); 4978 4978 } … … 4980 4980 case op_unsigned: { 4981 4981 auto bytecode = currentInstruction->as<OpUnsigned>(); 4982 set(bytecode. dst, makeSafe(addToGraph(UInt32ToNumber, get(bytecode.operand))));4982 set(bytecode.m_dst, makeSafe(addToGraph(UInt32ToNumber, get(bytecode.m_operand)))); 4983 4983 NEXT_OPCODE(op_unsigned); 4984 4984 } … … 4988 4988 case op_inc: { 4989 4989 auto bytecode = currentInstruction->as<OpInc>(); 4990 Node* op = get(bytecode. srcDst);4991 set(bytecode. srcDst, makeSafe(addToGraph(ArithAdd, op, addToGraph(JSConstant, OpInfo(m_constantOne)))));4990 Node* op = get(bytecode.m_srcDst); 4991 set(bytecode.m_srcDst, makeSafe(addToGraph(ArithAdd, op, addToGraph(JSConstant, OpInfo(m_constantOne))))); 4992 4992 NEXT_OPCODE(op_inc); 4993 4993 } … … 4995 4995 case op_dec: { 4996 4996 auto bytecode = currentInstruction->as<OpDec>(); 4997 Node* op = get(bytecode. srcDst);4998 set(bytecode. srcDst, makeSafe(addToGraph(ArithSub, op, addToGraph(JSConstant, OpInfo(m_constantOne)))));4997 Node* op = get(bytecode.m_srcDst); 4998 set(bytecode.m_srcDst, makeSafe(addToGraph(ArithSub, op, addToGraph(JSConstant, OpInfo(m_constantOne))))); 4999 4999 NEXT_OPCODE(op_dec); 5000 5000 } … … 5004 5004 case op_add: { 5005 5005 auto bytecode = currentInstruction->as<OpAdd>(); 5006 Node* op1 = get(bytecode. lhs);5007 Node* op2 = get(bytecode. rhs);5006 Node* op1 = get(bytecode.m_lhs); 5007 Node* op2 = get(bytecode.m_rhs); 5008 5008 if (op1->hasNumberResult() && op2->hasNumberResult()) 5009 set(bytecode. dst, makeSafe(addToGraph(ArithAdd, op1, op2)));5009 set(bytecode.m_dst, makeSafe(addToGraph(ArithAdd, op1, op2))); 5010 5010 else 5011 set(bytecode. dst, makeSafe(addToGraph(ValueAdd, op1, op2)));5011 set(bytecode.m_dst, makeSafe(addToGraph(ValueAdd, op1, op2))); 5012 5012 NEXT_OPCODE(op_add); 5013 5013 } … … 5015 5015 case op_sub: { 5016 5016 auto bytecode = currentInstruction->as<OpSub>(); 5017 Node* op1 = get(bytecode. lhs);5018 Node* op2 = get(bytecode. rhs);5017 Node* op1 = get(bytecode.m_lhs); 5018 Node* op2 = get(bytecode.m_rhs); 5019 5019 if (op1->hasNumberResult() && op2->hasNumberResult()) 5020 set(bytecode. dst, makeSafe(addToGraph(ArithSub, op1, op2)));5020 set(bytecode.m_dst, makeSafe(addToGraph(ArithSub, op1, op2))); 5021 5021 else 5022 set(bytecode. dst, makeSafe(addToGraph(ValueSub, op1, op2)));5022 set(bytecode.m_dst, makeSafe(addToGraph(ValueSub, op1, op2))); 5023 5023 NEXT_OPCODE(op_sub); 5024 5024 } … … 5026 5026 case op_negate: { 5027 5027 auto bytecode = currentInstruction->as<OpNegate>(); 5028 Node* op1 = get(bytecode. operand);5028 Node* op1 = get(bytecode.m_operand); 5029 5029 if (op1->hasNumberResult()) 5030 set(bytecode. dst, makeSafe(addToGraph(ArithNegate, op1)));5030 set(bytecode.m_dst, makeSafe(addToGraph(ArithNegate, op1))); 5031 5031 else 5032 set(bytecode. dst, makeSafe(addToGraph(ValueNegate, op1)));5032 set(bytecode.m_dst, makeSafe(addToGraph(ValueNegate, op1))); 5033 5033 NEXT_OPCODE(op_negate); 5034 5034 } … … 5037 5037 // Multiply requires that the inputs are not truncated, unfortunately. 5038 5038 auto bytecode = currentInstruction->as<OpMul>(); 5039 Node* op1 = get(bytecode. lhs);5040 Node* op2 = get(bytecode. rhs);5039 Node* op1 = get(bytecode.m_lhs); 5040 Node* op2 = get(bytecode.m_rhs); 5041 5041 if (op1->hasNumberResult() && op2->hasNumberResult()) 5042 set(bytecode. dst, makeSafe(addToGraph(ArithMul, op1, op2)));5042 set(bytecode.m_dst, makeSafe(addToGraph(ArithMul, op1, op2))); 5043 5043 else 5044 set(bytecode. dst, makeSafe(addToGraph(ValueMul, op1, op2)));5044 set(bytecode.m_dst, makeSafe(addToGraph(ValueMul, op1, op2))); 5045 5045 NEXT_OPCODE(op_mul); 5046 5046 } … … 5048 5048 case op_mod: { 5049 5049 auto bytecode = currentInstruction->as<OpMod>(); 5050 Node* op1 = get(bytecode. lhs);5051 Node* op2 = get(bytecode. rhs);5052 set(bytecode. dst, makeSafe(addToGraph(ArithMod, op1, op2)));5050 Node* op1 = get(bytecode.m_lhs); 5051 Node* op2 = get(bytecode.m_rhs); 5052 set(bytecode.m_dst, makeSafe(addToGraph(ArithMod, op1, op2))); 5053 5053 NEXT_OPCODE(op_mod); 5054 5054 } … … 5058 5058 // https://bugs.webkit.org/show_bug.cgi?id=160012 5059 5059 auto bytecode = currentInstruction->as<OpPow>(); 5060 Node* op1 = get(bytecode. lhs);5061 Node* op2 = get(bytecode. rhs);5062 set(bytecode. dst, addToGraph(ArithPow, op1, op2));5060 Node* op1 = get(bytecode.m_lhs); 5061 Node* op2 = get(bytecode.m_rhs); 5062 set(bytecode.m_dst, addToGraph(ArithPow, op1, op2)); 5063 5063 NEXT_OPCODE(op_pow); 5064 5064 } … … 5066 5066 case op_div: { 5067 5067 auto bytecode = currentInstruction->as<OpDiv>(); 5068 Node* op1 = get(bytecode. lhs);5069 Node* op2 = get(bytecode. rhs);5068 Node* op1 = get(bytecode.m_lhs); 5069 Node* op2 = get(bytecode.m_rhs); 5070 5070 if (op1->hasNumberResult() && op2->hasNumberResult()) 5071 set(bytecode. dst, makeDivSafe(addToGraph(ArithDiv, op1, op2)));5071 set(bytecode.m_dst, makeDivSafe(addToGraph(ArithDiv, op1, op2))); 5072 5072 else 5073 set(bytecode. dst, makeDivSafe(addToGraph(ValueDiv, op1, op2)));5073 set(bytecode.m_dst, makeDivSafe(addToGraph(ValueDiv, op1, op2))); 5074 5074 NEXT_OPCODE(op_div); 5075 5075 } … … 5086 5086 case op_mov: { 5087 5087 auto bytecode = currentInstruction->as<OpMov>(); 5088 Node* op = get(bytecode. src);5089 set(bytecode. dst, op);5088 Node* op = get(bytecode.m_src); 5089 set(bytecode.m_dst, op); 5090 5090 NEXT_OPCODE(op_mov); 5091 5091 } … … 5093 5093 case op_check_tdz: { 5094 5094 auto bytecode = currentInstruction->as<OpCheckTdz>(); 5095 addToGraph(CheckNotEmpty, get(bytecode. target));5095 addToGraph(CheckNotEmpty, get(bytecode.m_target)); 5096 5096 NEXT_OPCODE(op_check_tdz); 5097 5097 } … … 5101 5101 JSFunction* defaultHasInstanceSymbolFunction = m_inlineStackTop->m_codeBlock->globalObjectFor(currentCodeOrigin())->functionProtoHasInstanceSymbolFunction(); 5102 5102 5103 Node* constructor = get(VirtualRegister(bytecode. constructor));5104 Node* hasInstanceValue = get(VirtualRegister(bytecode. hasInstanceValue));5105 5106 set(VirtualRegister(bytecode. dst), addToGraph(OverridesHasInstance, OpInfo(m_graph.freeze(defaultHasInstanceSymbolFunction)), constructor, hasInstanceValue));5103 Node* constructor = get(VirtualRegister(bytecode.m_constructor)); 5104 Node* hasInstanceValue = get(VirtualRegister(bytecode.m_hasInstanceValue)); 5105 5106 set(VirtualRegister(bytecode.m_dst), addToGraph(OverridesHasInstance, OpInfo(m_graph.freeze(defaultHasInstanceSymbolFunction)), constructor, hasInstanceValue)); 5107 5107 NEXT_OPCODE(op_overrides_has_instance); 5108 5108 } … … 5110 5110 case op_identity_with_profile: { 5111 5111 auto bytecode = currentInstruction->as<OpIdentityWithProfile>(); 5112 Node* srcDst = get(bytecode. srcDst);5113 SpeculatedType speculation = static_cast<SpeculatedType>(bytecode. topProfile) << 32 | static_cast<SpeculatedType>(bytecode.bottomProfile);5114 set(bytecode. srcDst, addToGraph(IdentityWithProfile, OpInfo(speculation), srcDst));5112 Node* srcDst = get(bytecode.m_srcDst); 5113 SpeculatedType speculation = static_cast<SpeculatedType>(bytecode.m_topProfile) << 32 | static_cast<SpeculatedType>(bytecode.m_bottomProfile); 5114 set(bytecode.m_srcDst, addToGraph(IdentityWithProfile, OpInfo(speculation), srcDst)); 5115 5115 NEXT_OPCODE(op_identity_with_profile); 5116 5116 } … … 5123 5123 m_currentIndex); 5124 5124 5125 Node* value = get(bytecode. value);5126 Node* prototype = get(bytecode. prototype);5125 Node* value = get(bytecode.m_value); 5126 Node* prototype = get(bytecode.m_prototype); 5127 5127 5128 5128 // Only inline it if it's Simple with a commonPrototype; bottom/top or variable … … 5152 5152 if (allOK) { 5153 5153 Node* match = addToGraph(MatchStructure, OpInfo(data), value); 5154 set(bytecode. dst, match);5154 set(bytecode.m_dst, match); 5155 5155 NEXT_OPCODE(op_instanceof); 5156 5156 } 5157 5157 } 5158 5158 5159 set(bytecode. dst, addToGraph(InstanceOf, value, prototype));5159 set(bytecode.m_dst, addToGraph(InstanceOf, value, prototype)); 5160 5160 NEXT_OPCODE(op_instanceof); 5161 5161 } … … 5163 5163 case op_instanceof_custom: { 5164 5164 auto bytecode = currentInstruction->as<OpInstanceofCustom>(); 5165 Node* value = get(bytecode. value);5166 Node* constructor = get(bytecode. constructor);5167 Node* hasInstanceValue = get(bytecode. hasInstanceValue);5168 set(bytecode. dst, addToGraph(InstanceOfCustom, value, constructor, hasInstanceValue));5165 Node* value = get(bytecode.m_value); 5166 Node* constructor = get(bytecode.m_constructor); 5167 Node* hasInstanceValue = get(bytecode.m_hasInstanceValue); 5168 set(bytecode.m_dst, addToGraph(InstanceOfCustom, value, constructor, hasInstanceValue)); 5169 5169 NEXT_OPCODE(op_instanceof_custom); 5170 5170 } 5171 5171 case op_is_empty: { 5172 5172 auto bytecode = currentInstruction->as<OpIsEmpty>(); 5173 Node* value = get(bytecode. operand);5174 set(bytecode. dst, addToGraph(IsEmpty, value));5173 Node* value = get(bytecode.m_operand); 5174 set(bytecode.m_dst, addToGraph(IsEmpty, value)); 5175 5175 NEXT_OPCODE(op_is_empty); 5176 5176 } 5177 5177 case op_is_undefined: { 5178 5178 auto bytecode = currentInstruction->as<OpIsUndefined>(); 5179 Node* value = get(bytecode. operand);5180 set(bytecode. dst, addToGraph(IsUndefined, value));5179 Node* value = get(bytecode.m_operand); 5180 set(bytecode.m_dst, addToGraph(IsUndefined, value)); 5181 5181 NEXT_OPCODE(op_is_undefined); 5182 5182 } 5183 5183 case op_is_undefined_or_null: { 5184 5184 auto bytecode = currentInstruction->as<OpIsUndefinedOrNull>(); 5185 Node* value = get(bytecode. operand);5186 set(bytecode. dst, addToGraph(IsUndefinedOrNull, value));5185 Node* value = get(bytecode.m_operand); 5186 set(bytecode.m_dst, addToGraph(IsUndefinedOrNull, value)); 5187 5187 NEXT_OPCODE(op_is_undefined_or_null); 5188 5188 } … … 5190 5190 case op_is_boolean: { 5191 5191 auto bytecode = currentInstruction->as<OpIsBoolean>(); 5192 Node* value = get(bytecode. operand);5193 set(bytecode. dst, addToGraph(IsBoolean, value));5192 Node* value = get(bytecode.m_operand); 5193 set(bytecode.m_dst, addToGraph(IsBoolean, value)); 5194 5194 NEXT_OPCODE(op_is_boolean); 5195 5195 } … … 5197 5197 case op_is_number: { 5198 5198 auto bytecode = currentInstruction->as<OpIsNumber>(); 5199 Node* value = get(bytecode. operand);5200 set(bytecode. dst, addToGraph(IsNumber, value));5199 Node* value = get(bytecode.m_operand); 5200 set(bytecode.m_dst, addToGraph(IsNumber, value)); 5201 5201 NEXT_OPCODE(op_is_number); 5202 5202 } … … 5204 5204 case op_is_cell_with_type: { 5205 5205 auto bytecode = currentInstruction->as<OpIsCellWithType>(); 5206 Node* value = get(bytecode. operand);5207 set(bytecode. dst, addToGraph(IsCellWithType, OpInfo(bytecode.type), value));5206 Node* value = get(bytecode.m_operand); 5207 set(bytecode.m_dst, addToGraph(IsCellWithType, OpInfo(bytecode.m_type), value)); 5208 5208 NEXT_OPCODE(op_is_cell_with_type); 5209 5209 } … … 5211 5211 case op_is_object: { 5212 5212 auto bytecode = currentInstruction->as<OpIsObject>(); 5213 Node* value = get(bytecode. operand);5214 set(bytecode. dst, addToGraph(IsObject, value));5213 Node* value = get(bytecode.m_operand); 5214 set(bytecode.m_dst, addToGraph(IsObject, value)); 5215 5215 NEXT_OPCODE(op_is_object); 5216 5216 } … … 5218 5218 case op_is_object_or_null: { 5219 5219 auto bytecode = currentInstruction->as<OpIsObjectOrNull>(); 5220 Node* value = get(bytecode. operand);5221 set(bytecode. dst, addToGraph(IsObjectOrNull, value));5220 Node* value = get(bytecode.m_operand); 5221 set(bytecode.m_dst, addToGraph(IsObjectOrNull, value)); 5222 5222 NEXT_OPCODE(op_is_object_or_null); 5223 5223 } … … 5225 5225 case op_is_function: { 5226 5226 auto bytecode = currentInstruction->as<OpIsFunction>(); 5227 Node* value = get(bytecode. operand);5228 set(bytecode. dst, addToGraph(IsFunction, value));5227 Node* value = get(bytecode.m_operand); 5228 set(bytecode.m_dst, addToGraph(IsFunction, value)); 5229 5229 NEXT_OPCODE(op_is_function); 5230 5230 } … … 5232 5232 case op_not: { 5233 5233 auto bytecode = currentInstruction->as<OpNot>(); 5234 Node* value = get(bytecode. operand);5235 set(bytecode. dst, addToGraph(LogicalNot, value));5234 Node* value = get(bytecode.m_operand); 5235 set(bytecode.m_dst, addToGraph(LogicalNot, value)); 5236 5236 NEXT_OPCODE(op_not); 5237 5237 } … … 5239 5239 case op_to_primitive: { 5240 5240 auto bytecode = currentInstruction->as<OpToPrimitive>(); 5241 Node* value = get(bytecode. src);5242 set(bytecode. dst, addToGraph(ToPrimitive, value));5241 Node* value = get(bytecode.m_src); 5242 set(bytecode.m_dst, addToGraph(ToPrimitive, value)); 5243 5243 NEXT_OPCODE(op_to_primitive); 5244 5244 } … … 5246 5246 case op_strcat: { 5247 5247 auto bytecode = currentInstruction->as<OpStrcat>(); 5248 int startOperand = bytecode. src.offset();5249 int numOperands = bytecode. count;5248 int startOperand = bytecode.m_src.offset(); 5249 int numOperands = bytecode.m_count; 5250 5250 #if CPU(X86) 5251 5251 // X86 doesn't have enough registers to compile MakeRope with three arguments. The … … 5272 5272 operands[indexInOperands++] = get(VirtualRegister(startOperand - operandIdx)); 5273 5273 } 5274 set(bytecode. dst, addToGraph(StrCat, operands[0], operands[1], operands[2]));5274 set(bytecode.m_dst, addToGraph(StrCat, operands[0], operands[1], operands[2])); 5275 5275 NEXT_OPCODE(op_strcat); 5276 5276 } … … 5278 5278 case op_less: { 5279 5279 auto bytecode = currentInstruction->as<OpLess>(); 5280 Node* op1 = get(bytecode. lhs);5281 Node* op2 = get(bytecode. rhs);5282 set(bytecode. dst, addToGraph(CompareLess, op1, op2));5280 Node* op1 = get(bytecode.m_lhs); 5281 Node* op2 = get(bytecode.m_rhs); 5282 set(bytecode.m_dst, addToGraph(CompareLess, op1, op2)); 5283 5283 NEXT_OPCODE(op_less); 5284 5284 } … … 5286 5286 case op_lesseq: { 5287 5287 auto bytecode = currentInstruction->as<OpLesseq>(); 5288 Node* op1 = get(bytecode. lhs);5289 Node* op2 = get(bytecode. rhs);5290 set(bytecode. dst, addToGraph(CompareLessEq, op1, op2));5288 Node* op1 = get(bytecode.m_lhs); 5289 Node* op2 = get(bytecode.m_rhs); 5290 set(bytecode.m_dst, addToGraph(CompareLessEq, op1, op2)); 5291 5291 NEXT_OPCODE(op_lesseq); 5292 5292 } … … 5294 5294 case op_greater: { 5295 5295 auto bytecode = currentInstruction->as<OpGreater>(); 5296 Node* op1 = get(bytecode. lhs);5297 Node* op2 = get(bytecode. rhs);5298 set(bytecode. dst, addToGraph(CompareGreater, op1, op2));5296 Node* op1 = get(bytecode.m_lhs); 5297 Node* op2 = get(bytecode.m_rhs); 5298 set(bytecode.m_dst, addToGraph(CompareGreater, op1, op2)); 5299 5299 NEXT_OPCODE(op_greater); 5300 5300 } … … 5302 5302 case op_greatereq: { 5303 5303 auto bytecode = currentInstruction->as<OpGreatereq>(); 5304 Node* op1 = get(bytecode. lhs);5305 Node* op2 = get(bytecode. rhs);5306 set(bytecode. dst, addToGraph(CompareGreaterEq, op1, op2));5304 Node* op1 = get(bytecode.m_lhs); 5305 Node* op2 = get(bytecode.m_rhs); 5306 set(bytecode.m_dst, addToGraph(CompareGreaterEq, op1, op2)); 5307 5307 NEXT_OPCODE(op_greatereq); 5308 5308 } … … 5310 5310 case op_below: { 5311 5311 auto bytecode = currentInstruction->as<OpBelow>(); 5312 Node* op1 = get(bytecode. lhs);5313 Node* op2 = get(bytecode. rhs);5314 set(bytecode. dst, addToGraph(CompareBelow, op1, op2));5312 Node* op1 = get(bytecode.m_lhs); 5313 Node* op2 = get(bytecode.m_rhs); 5314 set(bytecode.m_dst, addToGraph(CompareBelow, op1, op2)); 5315 5315 NEXT_OPCODE(op_below); 5316 5316 } … … 5318 5318 case op_beloweq: { 5319 5319 auto bytecode = currentInstruction->as<OpBeloweq>(); 5320 Node* op1 = get(bytecode. lhs);5321 Node* op2 = get(bytecode. rhs);5322 set(bytecode. dst, addToGraph(CompareBelowEq, op1, op2));5320 Node* op1 = get(bytecode.m_lhs); 5321 Node* op2 = get(bytecode.m_rhs); 5322 set(bytecode.m_dst, addToGraph(CompareBelowEq, op1, op2)); 5323 5323 NEXT_OPCODE(op_beloweq); 5324 5324 } … … 5326 5326 case op_eq: { 5327 5327 auto bytecode = currentInstruction->as<OpEq>(); 5328 Node* op1 = get(bytecode. lhs);5329 Node* op2 = get(bytecode. rhs);5330 set(bytecode. dst, addToGraph(CompareEq, op1, op2));5328 Node* op1 = get(bytecode.m_lhs); 5329 Node* op2 = get(bytecode.m_rhs); 5330 set(bytecode.m_dst, addToGraph(CompareEq, op1, op2)); 5331 5331 NEXT_OPCODE(op_eq); 5332 5332 } … … 5334 5334 case op_eq_null: { 5335 5335 auto bytecode = currentInstruction->as<OpEqNull>(); 5336 Node* value = get(bytecode. operand);5336 Node* value = get(bytecode.m_operand); 5337 5337 Node* nullConstant = addToGraph(JSConstant, OpInfo(m_constantNull)); 5338 set(bytecode. dst, addToGraph(CompareEq, value, nullConstant));5338 set(bytecode.m_dst, addToGraph(CompareEq, value, nullConstant)); 5339 5339 NEXT_OPCODE(op_eq_null); 5340 5340 } … … 5342 5342 case op_stricteq: { 5343 5343 auto bytecode = currentInstruction->as<OpStricteq>(); 5344 Node* op1 = get(bytecode. lhs);5345 Node* op2 = get(bytecode. rhs);5346 set(bytecode. dst, addToGraph(CompareStrictEq, op1, op2));5344 Node* op1 = get(bytecode.m_lhs); 5345 Node* op2 = get(bytecode.m_rhs); 5346 set(bytecode.m_dst, addToGraph(CompareStrictEq, op1, op2)); 5347 5347 NEXT_OPCODE(op_stricteq); 5348 5348 } … … 5350 5350 case op_neq: { 5351 5351 auto bytecode = currentInstruction->as<OpNeq>(); 5352 Node* op1 = get(bytecode. lhs);5353 Node* op2 = get(bytecode. rhs);5354 set(bytecode. dst, addToGraph(LogicalNot, addToGraph(CompareEq, op1, op2)));5352 Node* op1 = get(bytecode.m_lhs); 5353 Node* op2 = get(bytecode.m_rhs); 5354 set(bytecode.m_dst, addToGraph(LogicalNot, addToGraph(CompareEq, op1, op2))); 5355 5355 NEXT_OPCODE(op_neq); 5356 5356 } … … 5358 5358 case op_neq_null: { 5359 5359 auto bytecode = currentInstruction->as<OpNeqNull>(); 5360 Node* value = get(bytecode. operand);5360 Node* value = get(bytecode.m_operand); 5361 5361 Node* nullConstant = addToGraph(JSConstant, OpInfo(m_constantNull)); 5362 set(bytecode. dst, addToGraph(LogicalNot, addToGraph(CompareEq, value, nullConstant)));5362 set(bytecode.m_dst, addToGraph(LogicalNot, addToGraph(CompareEq, value, nullConstant))); 5363 5363 NEXT_OPCODE(op_neq_null); 5364 5364 } … … 5366 5366 case op_nstricteq: { 5367 5367 auto bytecode = currentInstruction->as<OpNstricteq>(); 5368 Node* op1 = get(bytecode. lhs);5369 Node* op2 = get(bytecode. rhs);5368 Node* op1 = get(bytecode.m_lhs); 5369 Node* op2 = get(bytecode.m_rhs); 5370 5370 Node* invertedResult; 5371 5371 invertedResult = addToGraph(CompareStrictEq, op1, op2); 5372 set(bytecode. dst, addToGraph(LogicalNot, invertedResult));5372 set(bytecode.m_dst, addToGraph(LogicalNot, invertedResult)); 5373 5373 NEXT_OPCODE(op_nstricteq); 5374 5374 } … … 5380 5380 SpeculatedType prediction = getPredictionWithoutOSRExit(); 5381 5381 5382 Node* base = get(bytecode. base);5383 Node* property = get(bytecode. property);5382 Node* base = get(bytecode.m_base); 5383 Node* property = get(bytecode.m_property); 5384 5384 bool compiledAsGetById = false; 5385 5385 GetByIdStatus getByIdStatus; … … 5415 5415 5416 5416 if (compiledAsGetById) 5417 handleGetById(bytecode. dst, prediction, base, identifierNumber, getByIdStatus, AccessType::Get, currentInstruction->size());5417 handleGetById(bytecode.m_dst, prediction, base, identifierNumber, getByIdStatus, AccessType::Get, currentInstruction->size()); 5418 5418 else { 5419 ArrayMode arrayMode = getArrayMode(bytecode.metadata(codeBlock). arrayProfile, Array::Read);5419 ArrayMode arrayMode = getArrayMode(bytecode.metadata(codeBlock).m_arrayProfile, Array::Read); 5420 5420 // FIXME: We could consider making this not vararg, since it only uses three child 5421 5421 // slots. … … 5426 5426 Node* getByVal = addToGraph(Node::VarArg, GetByVal, OpInfo(arrayMode.asWord()), OpInfo(prediction)); 5427 5427 m_exitOK = false; // GetByVal must be treated as if it clobbers exit state, since FixupPhase may make it generic. 5428 set(bytecode. dst, getByVal);5428 set(bytecode.m_dst, getByVal); 5429 5429 } 5430 5430 … … 5436 5436 SpeculatedType prediction = getPrediction(); 5437 5437 5438 Node* base = get(bytecode. base);5439 Node* thisValue = get(bytecode. thisValue);5440 Node* property = get(bytecode. property);5438 Node* base = get(bytecode.m_base); 5439 Node* thisValue = get(bytecode.m_thisValue); 5440 Node* property = get(bytecode.m_property); 5441 5441 Node* getByValWithThis = addToGraph(GetByValWithThis, OpInfo(), OpInfo(prediction), base, thisValue, property); 5442 set(bytecode. dst, getByValWithThis);5442 set(bytecode.m_dst, getByValWithThis); 5443 5443 5444 5444 NEXT_OPCODE(op_get_by_val_with_this); … … 5456 5456 case op_put_by_val_with_this: { 5457 5457 auto bytecode = currentInstruction->as<OpPutByValWithThis>(); 5458 Node* base = get(bytecode. base);5459 Node* thisValue = get(bytecode. thisValue);5460 Node* property = get(bytecode. property);5461 Node* value = get(bytecode. value);5458 Node* base = get(bytecode.m_base); 5459 Node* thisValue = get(bytecode.m_thisValue); 5460 Node* property = get(bytecode.m_property); 5461 Node* value = get(bytecode.m_value); 5462 5462 5463 5463 addVarArgChild(base); … … 5472 5472 case op_define_data_property: { 5473 5473 auto bytecode = currentInstruction->as<OpDefineDataProperty>(); 5474 Node* base = get(bytecode. base);5475 Node* property = get(bytecode. property);5476 Node* value = get(bytecode. value);5477 Node* attributes = get(bytecode. attributes);5474 Node* base = get(bytecode.m_base); 5475 Node* property = get(bytecode.m_property); 5476 Node* value = get(bytecode.m_value); 5477 Node* attributes = get(bytecode.m_attributes); 5478 5478 5479 5479 addVarArgChild(base); … … 5488 5488 case op_define_accessor_property: { 5489 5489 auto bytecode = currentInstruction->as<OpDefineAccessorProperty>(); 5490 Node* base = get(bytecode. base);5491 Node* property = get(bytecode. property);5492 Node* getter = get(bytecode. getter);5493 Node* setter = get(bytecode. setter);5494 Node* attributes = get(bytecode. attributes);5490 Node* base = get(bytecode.m_base); 5491 Node* property = get(bytecode.m_property); 5492 Node* getter = get(bytecode.m_getter); 5493 Node* setter = get(bytecode.m_setter); 5494 Node* attributes = get(bytecode.m_attributes); 5495 5495 5496 5496 addVarArgChild(base); … … 5520 5520 5521 5521 auto bytecode = currentInstruction->as<OpGetByIdWithThis>(); 5522 Node* base = get(bytecode. base);5523 Node* thisValue = get(bytecode. thisValue);5524 unsigned identifierNumber = m_inlineStackTop->m_identifierRemap[bytecode. property];5525 5526 set(bytecode. dst,5522 Node* base = get(bytecode.m_base); 5523 Node* thisValue = get(bytecode.m_thisValue); 5524 unsigned identifierNumber = m_inlineStackTop->m_identifierRemap[bytecode.m_property]; 5525 5526 set(bytecode.m_dst, 5527 5527 addToGraph(GetByIdWithThis, OpInfo(identifierNumber), OpInfo(prediction), base, thisValue)); 5528 5528 … … 5531 5531 case op_put_by_id: { 5532 5532 auto bytecode = currentInstruction->as<OpPutById>(); 5533 Node* value = get(bytecode. value);5534 Node* base = get(bytecode. base);5535 unsigned identifierNumber = m_inlineStackTop->m_identifierRemap[bytecode. property];5536 bool direct = !!(bytecode. flags & PutByIdIsDirect);5533 Node* value = get(bytecode.m_value); 5534 Node* base = get(bytecode.m_base); 5535 unsigned identifierNumber = m_inlineStackTop->m_identifierRemap[bytecode.m_property]; 5536 bool direct = !!(bytecode.m_flags & PutByIdIsDirect); 5537 5537 5538 5538 PutByIdStatus putByIdStatus = PutByIdStatus::computeFor( … … 5547 5547 case op_put_by_id_with_this: { 5548 5548 auto bytecode = currentInstruction->as<OpPutByIdWithThis>(); 5549 Node* base = get(bytecode. base);5550 Node* thisValue = get(bytecode. thisValue);5551 Node* value = get(bytecode. value);5552 unsigned identifierNumber = m_inlineStackTop->m_identifierRemap[bytecode. property];5549 Node* base = get(bytecode.m_base); 5550 Node* thisValue = get(bytecode.m_thisValue); 5551 Node* value = get(bytecode.m_value); 5552 unsigned identifierNumber = m_inlineStackTop->m_identifierRemap[bytecode.m_property]; 5553 5553 5554 5554 addToGraph(PutByIdWithThis, OpInfo(identifierNumber), base, thisValue, value); … … 5566 5566 case op_put_getter_setter_by_id: { 5567 5567 auto bytecode = currentInstruction->as<OpPutGetterSetterById>(); 5568 Node* base = get(bytecode. base);5569 unsigned identifierNumber = m_inlineStackTop->m_identifierRemap[bytecode. property];5570 Node* getter = get(bytecode. getter);5571 Node* setter = get(bytecode. setter);5572 addToGraph(PutGetterSetterById, OpInfo(identifierNumber), OpInfo(bytecode. attributes), base, getter, setter);5568 Node* base = get(bytecode.m_base); 5569 unsigned identifierNumber = m_inlineStackTop->m_identifierRemap[bytecode.m_property]; 5570 Node* getter = get(bytecode.m_getter); 5571 Node* setter = get(bytecode.m_setter); 5572 addToGraph(PutGetterSetterById, OpInfo(identifierNumber), OpInfo(bytecode.m_attributes), base, getter, setter); 5573 5573 NEXT_OPCODE(op_put_getter_setter_by_id); 5574 5574 } … … 5584 5584 case op_del_by_id: { 5585 5585 auto bytecode = currentInstruction->as<OpDelById>(); 5586 Node* base = get(bytecode. base);5587 unsigned identifierNumber = m_inlineStackTop->m_identifierRemap[bytecode. property];5588 set(bytecode. dst, addToGraph(DeleteById, OpInfo(identifierNumber), base));5586 Node* base = get(bytecode.m_base); 5587 unsigned identifierNumber = m_inlineStackTop->m_identifierRemap[bytecode.m_property]; 5588 set(bytecode.m_dst, addToGraph(DeleteById, OpInfo(identifierNumber), base)); 5589 5589 NEXT_OPCODE(op_del_by_id); 5590 5590 } … … 5592 5592 case op_del_by_val: { 5593 5593 auto bytecode = currentInstruction->as<OpDelByVal>(); 5594 Node* base = get(bytecode. base);5595 Node* key = get(bytecode. property);5596 set(bytecode. dst, addToGraph(DeleteByVal, base, key));5594 Node* base = get(bytecode.m_base); 5595 Node* key = get(bytecode.m_property); 5596 set(bytecode.m_dst, addToGraph(DeleteByVal, base, key)); 5597 5597 NEXT_OPCODE(op_del_by_val); 5598 5598 } … … 5601 5601 auto bytecode = currentInstruction->as<OpProfileType>(); 5602 5602 auto& metadata = bytecode.metadata(codeBlock); 5603 Node* valueToProfile = get(bytecode. target);5604 addToGraph(ProfileType, OpInfo(metadata. typeLocation), valueToProfile);5603 Node* valueToProfile = get(bytecode.m_target); 5604 addToGraph(ProfileType, OpInfo(metadata.m_typeLocation), valueToProfile); 5605 5605 NEXT_OPCODE(op_profile_type); 5606 5606 } … … 5608 5608 case op_profile_control_flow: { 5609 5609 auto bytecode = currentInstruction->as<OpProfileControlFlow>(); 5610 BasicBlockLocation* basicBlockLocation = bytecode.metadata(codeBlock). basicBlockLocation;5610 BasicBlockLocation* basicBlockLocation = bytecode.metadata(codeBlock).m_basicBlockLocation; 5611 5611 addToGraph(ProfileControlFlow, OpInfo(basicBlockLocation)); 5612 5612 NEXT_OPCODE(op_profile_control_flow); … … 5618 5618 ASSERT(!m_currentBlock->terminal()); 5619 5619 auto bytecode = currentInstruction->as<OpJmp>(); 5620 int relativeOffset = jumpTarget(bytecode. target);5620 int relativeOffset = jumpTarget(bytecode.m_target); 5621 5621 addToGraph(Jump, OpInfo(m_currentIndex + relativeOffset)); 5622 5622 if (relativeOffset <= 0) … … 5627 5627 case op_jtrue: { 5628 5628 auto bytecode = currentInstruction->as<OpJtrue>(); 5629 unsigned relativeOffset = jumpTarget(bytecode. target);5630 Node* condition = get(bytecode. condition);5629 unsigned relativeOffset = jumpTarget(bytecode.m_target); 5630 Node* condition = get(bytecode.m_condition); 5631 5631 addToGraph(Branch, OpInfo(branchData(m_currentIndex + relativeOffset, m_currentIndex + currentInstruction->size())), condition); 5632 5632 LAST_OPCODE(op_jtrue); … … 5635 5635 case op_jfalse: { 5636 5636 auto bytecode = currentInstruction->as<OpJfalse>(); 5637 unsigned relativeOffset = jumpTarget(bytecode. target);5638 Node* condition = get(bytecode. condition);5637 unsigned relativeOffset = jumpTarget(bytecode.m_target); 5638 Node* condition = get(bytecode.m_condition); 5639 5639 addToGraph(Branch, OpInfo(branchData(m_currentIndex + currentInstruction->size(), m_currentIndex + relativeOffset)), condition); 5640 5640 LAST_OPCODE(op_jfalse); … … 5643 5643 case op_jeq_null: { 5644 5644 auto bytecode = currentInstruction->as<OpJeqNull>(); 5645 unsigned relativeOffset = jumpTarget(bytecode. target);5646 Node* value = get(bytecode. value);5645 unsigned relativeOffset = jumpTarget(bytecode.m_target); 5646 Node* value = get(bytecode.m_value); 5647 5647 Node* nullConstant = addToGraph(JSConstant, OpInfo(m_constantNull)); 5648 5648 Node* condition = addToGraph(CompareEq, value, nullConstant); … … 5653 5653 case op_jneq_null: { 5654 5654 auto bytecode = currentInstruction->as<OpJneqNull>(); 5655 unsigned relativeOffset = jumpTarget(bytecode. target);5656 Node* value = get(bytecode. value);5655 unsigned relativeOffset = jumpTarget(bytecode.m_target); 5656 Node* value = get(bytecode.m_value); 5657 5657 Node* nullConstant = addToGraph(JSConstant, OpInfo(m_constantNull)); 5658 5658 Node* condition = addToGraph(CompareEq, value, nullConstant); … … 5663 5663 case op_jless: { 5664 5664 auto bytecode = currentInstruction->as<OpJless>(); 5665 unsigned relativeOffset = jumpTarget(bytecode. target);5666 Node* op1 = get(bytecode. lhs);5667 Node* op2 = get(bytecode. rhs);5665 unsigned relativeOffset = jumpTarget(bytecode.m_target); 5666 Node* op1 = get(bytecode.m_lhs); 5667 Node* op2 = get(bytecode.m_rhs); 5668 5668 Node* condition = addToGraph(CompareLess, op1, op2); 5669 5669 addToGraph(Branch, OpInfo(branchData(m_currentIndex + relativeOffset, m_currentIndex + currentInstruction->size())), condition); … … 5673 5673 case op_jlesseq: { 5674 5674 auto bytecode = currentInstruction->as<OpJlesseq>(); 5675 unsigned relativeOffset = jumpTarget(bytecode. target);5676 Node* op1 = get(bytecode. lhs);5677 Node* op2 = get(bytecode. rhs);5675 unsigned relativeOffset = jumpTarget(bytecode.m_target); 5676 Node* op1 = get(bytecode.m_lhs); 5677 Node* op2 = get(bytecode.m_rhs); 5678 5678 Node* condition = addToGraph(CompareLessEq, op1, op2); 5679 5679 addToGraph(Branch, OpInfo(branchData(m_currentIndex + relativeOffset, m_currentIndex + currentInstruction->size())), condition); … … 5683 5683 case op_jgreater: { 5684 5684 auto bytecode = currentInstruction->as<OpJgreater>(); 5685 unsigned relativeOffset = jumpTarget(bytecode. target);5686 Node* op1 = get(bytecode. lhs);5687 Node* op2 = get(bytecode. rhs);5685 unsigned relativeOffset = jumpTarget(bytecode.m_target); 5686 Node* op1 = get(bytecode.m_lhs); 5687 Node* op2 = get(bytecode.m_rhs); 5688 5688 Node* condition = addToGraph(CompareGreater, op1, op2); 5689 5689 addToGraph(Branch, OpInfo(branchData(m_currentIndex + relativeOffset, m_currentIndex + currentInstruction->size())), condition); … … 5693 5693 case op_jgreatereq: { 5694 5694 auto bytecode = currentInstruction->as<OpJgreatereq>(); 5695 unsigned relativeOffset = jumpTarget(bytecode. target);5696 Node* op1 = get(bytecode. lhs);5697 Node* op2 = get(bytecode. rhs);5695 unsigned relativeOffset = jumpTarget(bytecode.m_target); 5696 Node* op1 = get(bytecode.m_lhs); 5697 Node* op2 = get(bytecode.m_rhs); 5698 5698 Node* condition = addToGraph(CompareGreaterEq, op1, op2); 5699 5699 addToGraph(Branch, OpInfo(branchData(m_currentIndex + relativeOffset, m_currentIndex + currentInstruction->size())), condition); … … 5703 5703 case op_jeq: { 5704 5704 auto bytecode = currentInstruction->as<OpJeq>(); 5705 unsigned relativeOffset = jumpTarget(bytecode. target);5706 Node* op1 = get(bytecode. lhs);5707 Node* op2 = get(bytecode. rhs);5705 unsigned relativeOffset = jumpTarget(bytecode.m_target); 5706 Node* op1 = get(bytecode.m_lhs); 5707 Node* op2 = get(bytecode.m_rhs); 5708 5708 Node* condition = addToGraph(CompareEq, op1, op2); 5709 5709 addToGraph(Branch, OpInfo(branchData(m_currentIndex + relativeOffset, m_currentIndex + currentInstruction->size())), condition); … … 5713 5713 case op_jstricteq: { 5714 5714 auto bytecode = currentInstruction->as<OpJstricteq>(); 5715 unsigned relativeOffset = jumpTarget(bytecode. target);5716 Node* op1 = get(bytecode. lhs);5717 Node* op2 = get(bytecode. rhs);5715 unsigned relativeOffset = jumpTarget(bytecode.m_target); 5716 Node* op1 = get(bytecode.m_lhs); 5717 Node* op2 = get(bytecode.m_rhs); 5718 5718 Node* condition = addToGraph(CompareStrictEq, op1, op2); 5719 5719 addToGraph(Branch, OpInfo(branchData(m_currentIndex + relativeOffset, m_currentIndex + currentInstruction->size())), condition); … … 5723 5723 case op_jnless: { 5724 5724 auto bytecode = currentInstruction->as<OpJnless>(); 5725 unsigned relativeOffset = jumpTarget(bytecode. target);5726 Node* op1 = get(bytecode. lhs);5727 Node* op2 = get(bytecode. rhs);5725 unsigned relativeOffset = jumpTarget(bytecode.m_target); 5726 Node* op1 = get(bytecode.m_lhs); 5727 Node* op2 = get(bytecode.m_rhs); 5728 5728 Node* condition = addToGraph(CompareLess, op1, op2); 5729 5729 addToGraph(Branch, OpInfo(branchData(m_currentIndex + currentInstruction->size(), m_currentIndex + relativeOffset)), condition); … … 5733 5733 case op_jnlesseq: { 5734 5734 auto bytecode = currentInstruction->as<OpJnlesseq>(); 5735 unsigned relativeOffset = jumpTarget(bytecode. target);5736 Node* op1 = get(bytecode. lhs);5737 Node* op2 = get(bytecode. rhs);5735 unsigned relativeOffset = jumpTarget(bytecode.m_target); 5736 Node* op1 = get(bytecode.m_lhs); 5737 Node* op2 = get(bytecode.m_rhs); 5738 5738 Node* condition = addToGraph(CompareLessEq, op1, op2); 5739 5739 addToGraph(Branch, OpInfo(branchData(m_currentIndex + currentInstruction->size(), m_currentIndex + relativeOffset)), condition); … … 5743 5743 case op_jngreater: { 5744 5744 auto bytecode = currentInstruction->as<OpJngreater>(); 5745 unsigned relativeOffset = jumpTarget(bytecode. target);5746 Node* op1 = get(bytecode. lhs);5747 Node* op2 = get(bytecode. rhs);5745 unsigned relativeOffset = jumpTarget(bytecode.m_target); 5746 Node* op1 = get(bytecode.m_lhs); 5747 Node* op2 = get(bytecode.m_rhs); 5748 5748 Node* condition = addToGraph(CompareGreater, op1, op2); 5749 5749 addToGraph(Branch, OpInfo(branchData(m_currentIndex + currentInstruction->size(), m_currentIndex + relativeOffset)), condition); … … 5753 5753 case op_jngreatereq: { 5754 5754 auto bytecode = currentInstruction->as<OpJngreatereq>(); 5755 unsigned relativeOffset = jumpTarget(bytecode. target);5756 Node* op1 = get(bytecode. lhs);5757 Node* op2 = get(bytecode. rhs);5755 unsigned relativeOffset = jumpTarget(bytecode.m_target); 5756 Node* op1 = get(bytecode.m_lhs); 5757 Node* op2 = get(bytecode.m_rhs); 5758 5758 Node* condition = addToGraph(CompareGreaterEq, op1, op2); 5759 5759 addToGraph(Branch, OpInfo(branchData(m_currentIndex + currentInstruction->size(), m_currentIndex + relativeOffset)), condition); … … 5763 5763 case op_jneq: { 5764 5764 auto bytecode = currentInstruction->as<OpJneq>(); 5765 unsigned relativeOffset = jumpTarget(bytecode. target);5766 Node* op1 = get(bytecode. lhs);5767 Node* op2 = get(bytecode. rhs);5765 unsigned relativeOffset = jumpTarget(bytecode.m_target); 5766 Node* op1 = get(bytecode.m_lhs); 5767 Node* op2 = get(bytecode.m_rhs); 5768 5768 Node* condition = addToGraph(CompareEq, op1, op2); 5769 5769 addToGraph(Branch, OpInfo(branchData(m_currentIndex + currentInstruction->size(), m_currentIndex + relativeOffset)), condition); … … 5773 5773 case op_jnstricteq: { 5774 5774 auto bytecode = currentInstruction->as<OpJnstricteq>(); 5775 unsigned relativeOffset = jumpTarget(bytecode. target);5776 Node* op1 = get(bytecode. lhs);5777 Node* op2 = get(bytecode. rhs);5775 unsigned relativeOffset = jumpTarget(bytecode.m_target); 5776 Node* op1 = get(bytecode.m_lhs); 5777 Node* op2 = get(bytecode.m_rhs); 5778 5778 Node* condition = addToGraph(CompareStrictEq, op1, op2); 5779 5779 addToGraph(Branch, OpInfo(branchData(m_currentIndex + currentInstruction->size(), m_currentIndex + relativeOffset)), condition); … … 5783 5783 case op_jbelow: { 5784 5784 auto bytecode = currentInstruction->as<OpJbelow>(); 5785 unsigned relativeOffset = jumpTarget(bytecode. target);5786 Node* op1 = get(bytecode. lhs);5787 Node* op2 = get(bytecode. rhs);5785 unsigned relativeOffset = jumpTarget(bytecode.m_target); 5786 Node* op1 = get(bytecode.m_lhs); 5787 Node* op2 = get(bytecode.m_rhs); 5788 5788 Node* condition = addToGraph(CompareBelow, op1, op2); 5789 5789 addToGraph(Branch, OpInfo(branchData(m_currentIndex + relativeOffset, m_currentIndex + currentInstruction->size())), condition); … … 5793 5793 case op_jbeloweq: { 5794 5794 auto bytecode = currentInstruction->as<OpJbeloweq>(); 5795 unsigned relativeOffset = jumpTarget(bytecode. target);5796 Node* op1 = get(bytecode. lhs);5797 Node* op2 = get(bytecode. rhs);5795 unsigned relativeOffset = jumpTarget(bytecode.m_target); 5796 Node* op1 = get(bytecode.m_lhs); 5797 Node* op2 = get(bytecode.m_rhs); 5798 5798 Node* condition = addToGraph(CompareBelowEq, op1, op2); 5799 5799 addToGraph(Branch, OpInfo(branchData(m_currentIndex + relativeOffset, m_currentIndex + currentInstruction->size())), condition); … … 5805 5805 SwitchData& data = *m_graph.m_switchData.add(); 5806 5806 data.kind = SwitchImm; 5807 data.switchTableIndex = m_inlineStackTop->m_switchRemap[bytecode. tableIndex];5808 data.fallThrough.setBytecodeIndex(m_currentIndex + jumpTarget(bytecode. defaultOffset));5807 data.switchTableIndex = m_inlineStackTop->m_switchRemap[bytecode.m_tableIndex]; 5808 data.fallThrough.setBytecodeIndex(m_currentIndex + jumpTarget(bytecode.m_defaultOffset)); 5809 5809 SimpleJumpTable& table = m_codeBlock->switchJumpTable(data.switchTableIndex); 5810 5810 for (unsigned i = 0; i < table.branchOffsets.size(); ++i) { … … 5816 5816 data.cases.append(SwitchCase::withBytecodeIndex(m_graph.freeze(jsNumber(static_cast<int32_t>(table.min + i))), target)); 5817 5817 } 5818 addToGraph(Switch, OpInfo(&data), get(bytecode. scrutinee));5818 addToGraph(Switch, OpInfo(&data), get(bytecode.m_scrutinee)); 5819 5819 flushIfTerminal(data); 5820 5820 LAST_OPCODE(op_switch_imm); … … 5825 5825 SwitchData& data = *m_graph.m_switchData.add(); 5826 5826 data.kind = SwitchChar; 5827 data.switchTableIndex = m_inlineStackTop->m_switchRemap[bytecode. tableIndex];5828 data.fallThrough.setBytecodeIndex(m_currentIndex + jumpTarget(bytecode. defaultOffset));5827 data.switchTableIndex = m_inlineStackTop->m_switchRemap[bytecode.m_tableIndex]; 5828 data.fallThrough.setBytecodeIndex(m_currentIndex + jumpTarget(bytecode.m_defaultOffset)); 5829 5829 SimpleJumpTable& table = m_codeBlock->switchJumpTable(data.switchTableIndex); 5830 5830 for (unsigned i = 0; i < table.branchOffsets.size(); ++i) { … … 5837 5837 SwitchCase::withBytecodeIndex(LazyJSValue::singleCharacterString(table.min + i), target)); 5838 5838 } 5839 addToGraph(Switch, OpInfo(&data), get(bytecode. scrutinee));5839 addToGraph(Switch, OpInfo(&data), get(bytecode.m_scrutinee)); 5840 5840 flushIfTerminal(data); 5841 5841 LAST_OPCODE(op_switch_char); … … 5846 5846 SwitchData& data = *m_graph.m_switchData.add(); 5847 5847 data.kind = SwitchString; 5848 data.switchTableIndex = bytecode. tableIndex;5849 data.fallThrough.setBytecodeIndex(m_currentIndex + jumpTarget(bytecode. defaultOffset));5848 data.switchTableIndex = bytecode.m_tableIndex; 5849 data.fallThrough.setBytecodeIndex(m_currentIndex + jumpTarget(bytecode.m_defaultOffset)); 5850 5850 StringJumpTable& table = m_codeBlock->stringSwitchJumpTable(data.switchTableIndex); 5851 5851 StringJumpTable::StringOffsetTable::iterator iter; … … 5858 5858 SwitchCase::withBytecodeIndex(LazyJSValue::knownStringImpl(iter->key.get()), target)); 5859 5859 } 5860 addToGraph(Switch, OpInfo(&data), get(bytecode. scrutinee));5860 addToGraph(Switch, OpInfo(&data), get(bytecode.m_scrutinee)); 5861 5861 flushIfTerminal(data); 5862 5862 LAST_OPCODE(op_switch_string); … … 5868 5868 if (!inlineCallFrame()) { 5869 5869 // Simple case: we are just producing a return 5870 addToGraph(Return, get(bytecode. value));5870 addToGraph(Return, get(bytecode.m_value)); 5871 5871 flushForReturn(); 5872 5872 LAST_OPCODE(op_ret); … … 5875 5875 flushForReturn(); 5876 5876 if (m_inlineStackTop->m_returnValue.isValid()) 5877 setDirect(m_inlineStackTop->m_returnValue, get(bytecode. value), ImmediateSetWithFlush);5877 setDirect(m_inlineStackTop->m_returnValue, get(bytecode.m_value), ImmediateSetWithFlush); 5878 5878 5879 5879 if (!m_inlineStackTop->m_continuationBlock && m_currentIndex + currentInstruction->size() != m_inlineStackTop->m_codeBlock->instructions().size()) { … … 5894 5894 case op_end: 5895 5895 ASSERT(!inlineCallFrame()); 5896 addToGraph(Return, get(currentInstruction->as<OpEnd>(). value));5896 addToGraph(Return, get(currentInstruction->as<OpEnd>().m_value)); 5897 5897 flushForReturn(); 5898 5898 LAST_OPCODE(op_end); 5899 5899 5900 5900 case op_throw: 5901 addToGraph(Throw, get(currentInstruction->as<OpThrow>(). value));5901 addToGraph(Throw, get(currentInstruction->as<OpThrow>().m_value)); 5902 5902 flushForTerminal(); 5903 5903 LAST_OPCODE(op_throw); … … 5905 5905 case op_throw_static_error: { 5906 5906 auto bytecode = currentInstruction->as<OpThrowStaticError>(); 5907 addToGraph(ThrowStaticError, OpInfo(bytecode. errorType), get(bytecode.message));5907 addToGraph(ThrowStaticError, OpInfo(bytecode.m_errorType), get(bytecode.m_message)); 5908 5908 flushForTerminal(); 5909 5909 LAST_OPCODE(op_throw_static_error); … … 5925 5925 RELEASE_ASSERT(!m_currentBlock->size() || (m_graph.compilation() && m_currentBlock->size() == 1 && m_currentBlock->at(0)->op() == CountExecution)); 5926 5926 5927 ValueProfileAndOperandBuffer* buffer = bytecode.metadata(codeBlock). buffer;5927 ValueProfileAndOperandBuffer* buffer = bytecode.metadata(codeBlock).m_buffer; 5928 5928 5929 5929 if (!buffer) { … … 6098 6098 case op_call_eval: { 6099 6099 auto bytecode = currentInstruction->as<OpCallEval>(); 6100 int registerOffset = -bytecode. argv;6101 addCall(bytecode. dst, CallEval, nullptr, get(bytecode.callee), bytecode.argc, registerOffset, getPrediction());6100 int registerOffset = -bytecode.m_argv; 6101 addCall(bytecode.m_dst, CallEval, nullptr, get(bytecode.m_callee), bytecode.m_argc, registerOffset, getPrediction()); 6102 6102 NEXT_OPCODE(op_call_eval); 6103 6103 } … … 6105 6105 case op_jneq_ptr: { 6106 6106 auto bytecode = currentInstruction->as<OpJneqPtr>(); 6107 Special::Pointer specialPointer = bytecode. specialPointer;6107 Special::Pointer specialPointer = bytecode.m_specialPointer; 6108 6108 ASSERT(pointerIsCell(specialPointer)); 6109 6109 JSCell* actualPointer = static_cast<JSCell*>( 6110 6110 actualPointerFor(m_inlineStackTop->m_codeBlock, specialPointer)); 6111 6111 FrozenValue* frozenPointer = m_graph.freeze(actualPointer); 6112 unsigned relativeOffset = jumpTarget(bytecode. target);6113 Node* child = get(bytecode. value);6114 if (bytecode.metadata(codeBlock). hasJumped) {6112 unsigned relativeOffset = jumpTarget(bytecode.m_target); 6113 Node* child = get(bytecode.m_value); 6114 if (bytecode.metadata(codeBlock).m_hasJumped) { 6115 6115 Node* condition = addToGraph(CompareEqPtr, OpInfo(frozenPointer), child); 6116 6116 addToGraph(Branch, OpInfo(branchData(m_currentIndex + currentInstruction->size(), m_currentIndex + relativeOffset)), condition); … … 6132 6132 { 6133 6133 ConcurrentJSLocker locker(m_inlineStackTop->m_profiledBlock->m_lock); 6134 resolveType = metadata. resolveType;6135 depth = metadata. localScopeDepth;6134 resolveType = metadata.m_resolveType; 6135 depth = metadata.m_localScopeDepth; 6136 6136 switch (resolveType) { 6137 6137 case GlobalProperty: … … 6141 6141 case GlobalLexicalVar: 6142 6142 case GlobalLexicalVarWithVarInjectionChecks: 6143 constantScope = metadata. constantScope.get();6143 constantScope = metadata.m_constantScope.get(); 6144 6144 break; 6145 6145 case ModuleVar: 6146 lexicalEnvironment = metadata. lexicalEnvironment.get();6146 lexicalEnvironment = metadata.m_lexicalEnvironment.get(); 6147 6147 break; 6148 6148 case LocalClosureVar: 6149 6149 case ClosureVar: 6150 6150 case ClosureVarWithVarInjectionChecks: 6151 symbolTable = metadata. symbolTable.get();6151 symbolTable = metadata.m_symbolTable.get(); 6152 6152 break; 6153 6153 default: … … 6157 6157 6158 6158 if (needsDynamicLookup(resolveType, op_resolve_scope)) { 6159 unsigned identifierNumber = m_inlineStackTop->m_identifierRemap[bytecode. var];6160 set(bytecode. dst, addToGraph(ResolveScope, OpInfo(identifierNumber), get(bytecode.scope)));6159 unsigned identifierNumber = m_inlineStackTop->m_identifierRemap[bytecode.m_var]; 6160 set(bytecode.m_dst, addToGraph(ResolveScope, OpInfo(identifierNumber), get(bytecode.m_scope))); 6161 6161 NEXT_OPCODE(op_resolve_scope); 6162 6162 } … … 6170 6170 if (m_inlineStackTop->m_codeBlock->scriptMode() != JSParserScriptMode::Module) { 6171 6171 if (resolveType == GlobalProperty || resolveType == GlobalPropertyWithVarInjectionChecks) { 6172 unsigned identifierNumber = m_inlineStackTop->m_identifierRemap[bytecode. var];6172 unsigned identifierNumber = m_inlineStackTop->m_identifierRemap[bytecode.m_var]; 6173 6173 JSGlobalObject* globalObject = m_inlineStackTop->m_codeBlock->globalObject(); 6174 6174 m_graph.globalProperties().addLazily(DesiredGlobalProperty(globalObject, identifierNumber)); … … 6185 6185 RELEASE_ASSERT(constantScope); 6186 6186 RELEASE_ASSERT(constantScope == JSScope::constantScopeForCodeBlock(resolveType, m_inlineStackTop->m_codeBlock)); 6187 set(bytecode. dst, weakJSConstant(constantScope));6188 addToGraph(Phantom, get(bytecode. scope));6187 set(bytecode.m_dst, weakJSConstant(constantScope)); 6188 addToGraph(Phantom, get(bytecode.m_scope)); 6189 6189 break; 6190 6190 } … … 6193 6193 // we need not to keep it alive by the Phantom node. 6194 6194 // Module environment is already strongly referenced by the CodeBlock. 6195 set(bytecode. dst, weakJSConstant(lexicalEnvironment));6195 set(bytecode.m_dst, weakJSConstant(lexicalEnvironment)); 6196 6196 break; 6197 6197 } … … 6199 6199 case ClosureVar: 6200 6200 case ClosureVarWithVarInjectionChecks: { 6201 Node* localBase = get(bytecode. scope);6201 Node* localBase = get(bytecode.m_scope); 6202 6202 addToGraph(Phantom, localBase); // OSR exit cannot handle resolve_scope on a DCE'd scope. 6203 6203 … … 6208 6208 if (JSValue value = singleton->inferredValue()) { 6209 6209 m_graph.watchpoints().addLazily(singleton); 6210 set(bytecode. dst, weakJSConstant(value));6210 set(bytecode.m_dst, weakJSConstant(value)); 6211 6211 break; 6212 6212 } … … 6215 6215 for (unsigned n = depth; n--;) 6216 6216 scope = scope->next(); 6217 set(bytecode. dst, weakJSConstant(scope));6217 set(bytecode.m_dst, weakJSConstant(scope)); 6218 6218 break; 6219 6219 } 6220 6220 for (unsigned n = depth; n--;) 6221 6221 localBase = addToGraph(SkipScope, localBase); 6222 set(bytecode. dst, localBase);6222 set(bytecode.m_dst, localBase); 6223 6223 break; 6224 6224 } 6225 6225 case UnresolvedProperty: 6226 6226 case UnresolvedPropertyWithVarInjectionChecks: { 6227 addToGraph(Phantom, get(bytecode. scope));6227 addToGraph(Phantom, get(bytecode.m_scope)); 6228 6228 addToGraph(ForceOSRExit); 6229 set(bytecode. dst, addToGraph(JSConstant, OpInfo(m_constantNull)));6229 set(bytecode.m_dst, addToGraph(JSConstant, OpInfo(m_constantNull))); 6230 6230 break; 6231 6231 } … … 6238 6238 case op_resolve_scope_for_hoisting_func_decl_in_eval: { 6239 6239 auto bytecode = currentInstruction->as<OpResolveScopeForHoistingFuncDeclInEval>(); 6240 unsigned identifierNumber = m_inlineStackTop->m_identifierRemap[bytecode. property];6241 6242 set(bytecode. dst, addToGraph(ResolveScopeForHoistingFuncDeclInEval, OpInfo(identifierNumber), get(bytecode.scope)));6240 unsigned identifierNumber = m_inlineStackTop->m_identifierRemap[bytecode.m_property]; 6241 6242 set(bytecode.m_dst, addToGraph(ResolveScopeForHoistingFuncDeclInEval, OpInfo(identifierNumber), get(bytecode.m_scope))); 6243 6243 6244 6244 NEXT_OPCODE(op_resolve_scope_for_hoisting_func_decl_in_eval); … … 6248 6248 auto bytecode = currentInstruction->as<OpGetFromScope>(); 6249 6249 auto& metadata = bytecode.metadata(codeBlock); 6250 unsigned identifierNumber = m_inlineStackTop->m_identifierRemap[bytecode. var];6250 unsigned identifierNumber = m_inlineStackTop->m_identifierRemap[bytecode.m_var]; 6251 6251 UniquedStringImpl* uid = m_graph.identifiers()[identifierNumber]; 6252 6252 … … 6258 6258 { 6259 6259 ConcurrentJSLocker locker(m_inlineStackTop->m_profiledBlock->m_lock); 6260 getPutInfo = metadata. getPutInfo;6260 getPutInfo = metadata.m_getPutInfo; 6261 6261 resolveType = getPutInfo.resolveType(); 6262 6262 if (resolveType == GlobalVar || resolveType == GlobalVarWithVarInjectionChecks || resolveType == GlobalLexicalVar || resolveType == GlobalLexicalVarWithVarInjectionChecks) 6263 watchpoints = metadata. watchpointSet;6263 watchpoints = metadata.m_watchpointSet; 6264 6264 else if (resolveType != UnresolvedProperty && resolveType != UnresolvedPropertyWithVarInjectionChecks) 6265 structure = metadata. structure.get();6266 operand = metadata. operand;6265 structure = metadata.m_structure.get(); 6266 operand = metadata.m_operand; 6267 6267 } 6268 6268 … … 6270 6270 uint64_t opInfo1 = makeDynamicVarOpInfo(identifierNumber, getPutInfo.operand()); 6271 6271 SpeculatedType prediction = getPrediction(); 6272 set(bytecode. dst,6273 addToGraph(GetDynamicVar, OpInfo(opInfo1), OpInfo(prediction), get(bytecode. scope)));6272 set(bytecode.m_dst, 6273 addToGraph(GetDynamicVar, OpInfo(opInfo1), OpInfo(prediction), get(bytecode.m_scope))); 6274 6274 NEXT_OPCODE(op_get_from_scope); 6275 6275 } … … 6293 6293 || status.numVariants() != 1 6294 6294 || status[0].structureSet().size() != 1) { 6295 set(bytecode. dst, addToGraph(GetByIdFlush, OpInfo(identifierNumber), OpInfo(prediction), get(bytecode.scope)));6295 set(bytecode.m_dst, addToGraph(GetByIdFlush, OpInfo(identifierNumber), OpInfo(prediction), get(bytecode.m_scope))); 6296 6296 break; 6297 6297 } … … 6299 6299 Node* base = weakJSConstant(globalObject); 6300 6300 Node* result = load(prediction, base, identifierNumber, status[0]); 6301 addToGraph(Phantom, get(bytecode. scope));6302 set(bytecode. dst, result);6301 addToGraph(Phantom, get(bytecode.m_scope)); 6302 set(bytecode.m_dst, result); 6303 6303 break; 6304 6304 } … … 6307 6307 case GlobalLexicalVar: 6308 6308 case GlobalLexicalVarWithVarInjectionChecks: { 6309 addToGraph(Phantom, get(bytecode. scope));6309 addToGraph(Phantom, get(bytecode.m_scope)); 6310 6310 WatchpointSet* watchpointSet; 6311 6311 ScopeOffset offset; … … 6363 6363 if (value) { 6364 6364 m_graph.watchpoints().addLazily(watchpointSet); 6365 set(bytecode. dst, weakJSConstant(value));6365 set(bytecode.m_dst, weakJSConstant(value)); 6366 6366 break; 6367 6367 } … … 6377 6377 if (resolveType == GlobalLexicalVar || resolveType == GlobalLexicalVarWithVarInjectionChecks) 6378 6378 addToGraph(CheckNotEmpty, value); 6379 set(bytecode. dst, value);6379 set(bytecode.m_dst, value); 6380 6380 break; 6381 6381 } … … 6383 6383 case ClosureVar: 6384 6384 case ClosureVarWithVarInjectionChecks: { 6385 Node* scopeNode = get(bytecode. scope);6385 Node* scopeNode = get(bytecode.m_scope); 6386 6386 6387 6387 // Ideally we wouldn't have to do this Phantom. But: … … 6399 6399 // would recompile. But if we can fold it here, we avoid the exit. 6400 6400 if (JSValue value = m_graph.tryGetConstantClosureVar(scopeNode, ScopeOffset(operand))) { 6401 set(bytecode. dst, weakJSConstant(value));6401 set(bytecode.m_dst, weakJSConstant(value)); 6402 6402 break; 6403 6403 } 6404 6404 SpeculatedType prediction = getPrediction(); 6405 set(bytecode. dst,6405 set(bytecode.m_dst, 6406 6406 addToGraph(GetClosureVar, OpInfo(operand), OpInfo(prediction), scopeNode)); 6407 6407 break; … … 6420 6420 auto bytecode = currentInstruction->as<OpPutToScope>(); 6421 6421 auto& metadata = bytecode.metadata(codeBlock); 6422 unsigned identifierNumber = bytecode. var;6422 unsigned identifierNumber = bytecode.m_var; 6423 6423 if (identifierNumber != UINT_MAX) 6424 6424 identifierNumber = m_inlineStackTop->m_identifierRemap[identifierNumber]; … … 6436 6436 { 6437 6437 ConcurrentJSLocker locker(m_inlineStackTop->m_profiledBlock->m_lock); 6438 getPutInfo = metadata. getPutInfo;6438 getPutInfo = metadata.m_getPutInfo; 6439 6439 resolveType = getPutInfo.resolveType(); 6440 6440 if (resolveType == GlobalVar || resolveType == GlobalVarWithVarInjectionChecks || resolveType == LocalClosureVar || resolveType == GlobalLexicalVar || resolveType == GlobalLexicalVarWithVarInjectionChecks) 6441 watchpoints = metadata. watchpointSet;6441 watchpoints = metadata.m_watchpointSet; 6442 6442 else if (resolveType != UnresolvedProperty && resolveType != UnresolvedPropertyWithVarInjectionChecks) 6443 structure = metadata. structure.get();6444 operand = metadata. operand;6443 structure = metadata.m_structure.get(); 6444 operand = metadata.m_operand; 6445 6445 } 6446 6446 … … 6450 6450 ASSERT(identifierNumber != UINT_MAX); 6451 6451 uint64_t opInfo1 = makeDynamicVarOpInfo(identifierNumber, getPutInfo.operand()); 6452 addToGraph(PutDynamicVar, OpInfo(opInfo1), OpInfo(), get(bytecode. scope), get(bytecode.value));6452 addToGraph(PutDynamicVar, OpInfo(opInfo1), OpInfo(), get(bytecode.m_scope), get(bytecode.m_value)); 6453 6453 NEXT_OPCODE(op_put_to_scope); 6454 6454 } … … 6470 6470 || status[0].kind() != PutByIdVariant::Replace 6471 6471 || status[0].structure().size() != 1) { 6472 addToGraph(PutById, OpInfo(identifierNumber), get(bytecode. scope), get(bytecode.value));6472 addToGraph(PutById, OpInfo(identifierNumber), get(bytecode.m_scope), get(bytecode.m_value)); 6473 6473 break; 6474 6474 } 6475 6475 Node* base = weakJSConstant(globalObject); 6476 store(base, identifierNumber, status[0], get(bytecode. value));6476 store(base, identifierNumber, status[0], get(bytecode.m_value)); 6477 6477 // Keep scope alive until after put. 6478 addToGraph(Phantom, get(bytecode. scope));6478 addToGraph(Phantom, get(bytecode.m_scope)); 6479 6479 break; 6480 6480 } … … 6494 6494 ASSERT_UNUSED(entry, watchpoints == entry.watchpointSet()); 6495 6495 } 6496 Node* valueNode = get(bytecode. value);6496 Node* valueNode = get(bytecode.m_value); 6497 6497 addToGraph(PutGlobalVariable, OpInfo(operand), weakJSConstant(scopeObject), valueNode); 6498 6498 if (watchpoints && watchpoints->state() != IsInvalidated) { … … 6501 6501 } 6502 6502 // Keep scope alive until after put. 6503 addToGraph(Phantom, get(bytecode. scope));6503 addToGraph(Phantom, get(bytecode.m_scope)); 6504 6504 break; 6505 6505 } … … 6507 6507 case ClosureVar: 6508 6508 case ClosureVarWithVarInjectionChecks: { 6509 Node* scopeNode = get(bytecode. scope);6510 Node* valueNode = get(bytecode. value);6509 Node* scopeNode = get(bytecode.m_scope); 6510 Node* valueNode = get(bytecode.m_value); 6511 6511 6512 6512 addToGraph(PutClosureVar, OpInfo(operand), scopeNode, valueNode); … … 6572 6572 case op_create_lexical_environment: { 6573 6573 auto bytecode = currentInstruction->as<OpCreateLexicalEnvironment>(); 6574 ASSERT(bytecode. symbolTable.isConstant() && bytecode.initialValue.isConstant());6575 FrozenValue* symbolTable = m_graph.freezeStrong(m_inlineStackTop->m_codeBlock->getConstant(bytecode. symbolTable.offset()));6576 FrozenValue* initialValue = m_graph.freezeStrong(m_inlineStackTop->m_codeBlock->getConstant(bytecode. initialValue.offset()));6577 Node* scope = get(bytecode. scope);6574 ASSERT(bytecode.m_symbolTable.isConstant() && bytecode.m_initialValue.isConstant()); 6575 FrozenValue* symbolTable = m_graph.freezeStrong(m_inlineStackTop->m_codeBlock->getConstant(bytecode.m_symbolTable.offset())); 6576 FrozenValue* initialValue = m_graph.freezeStrong(m_inlineStackTop->m_codeBlock->getConstant(bytecode.m_initialValue.offset())); 6577 Node* scope = get(bytecode.m_scope); 6578 6578 Node* lexicalEnvironment = addToGraph(CreateActivation, OpInfo(symbolTable), OpInfo(initialValue), scope); 6579 set(bytecode. dst, lexicalEnvironment);6579 set(bytecode.m_dst, lexicalEnvironment); 6580 6580 NEXT_OPCODE(op_create_lexical_environment); 6581 6581 } … … 6583 6583 case op_push_with_scope: { 6584 6584 auto bytecode = currentInstruction->as<OpPushWithScope>(); 6585 Node* currentScope = get(bytecode. currentScope);6586 Node* object = get(bytecode. newScope);6587 set(bytecode. dst, addToGraph(PushWithScope, currentScope, object));6585 Node* currentScope = get(bytecode.m_currentScope); 6586 Node* object = get(bytecode.m_newScope); 6587 set(bytecode.m_dst, addToGraph(PushWithScope, currentScope, object)); 6588 6588 NEXT_OPCODE(op_push_with_scope); 6589 6589 } … … 6591 6591 case op_get_parent_scope: { 6592 6592 auto bytecode = currentInstruction->as<OpGetParentScope>(); 6593 Node* currentScope = get(bytecode. scope);6593 Node* currentScope = get(bytecode.m_scope); 6594 6594 Node* newScope = addToGraph(SkipScope, currentScope); 6595 set(bytecode. dst, newScope);6595 set(bytecode.m_dst, newScope); 6596 6596 addToGraph(Phantom, currentScope); 6597 6597 NEXT_OPCODE(op_get_parent_scope); … … 6610 6610 else 6611 6611 result = addToGraph(GetScope, callee); 6612 set(bytecode. dst, result);6612 set(bytecode.m_dst, result); 6613 6613 NEXT_OPCODE(op_get_scope); 6614 6614 } … … 6617 6617 auto bytecode = currentInstruction->as<OpArgumentCount>(); 6618 6618 Node* sub = addToGraph(ArithSub, OpInfo(Arith::Unchecked), OpInfo(SpecInt32Only), getArgumentCount(), addToGraph(JSConstant, OpInfo(m_constantOne))); 6619 set(bytecode. dst, sub);6619 set(bytecode.m_dst, sub); 6620 6620 NEXT_OPCODE(op_argument_count); 6621 6621 } … … 6625 6625 noticeArgumentsUse(); 6626 6626 Node* createArguments = addToGraph(CreateDirectArguments); 6627 set(bytecode. dst, createArguments);6627 set(bytecode.m_dst, createArguments); 6628 6628 NEXT_OPCODE(op_create_direct_arguments); 6629 6629 } … … 6632 6632 auto bytecode = currentInstruction->as<OpCreateScopedArguments>(); 6633 6633 noticeArgumentsUse(); 6634 Node* createArguments = addToGraph(CreateScopedArguments, get(bytecode. scope));6635 set(bytecode. dst, createArguments);6634 Node* createArguments = addToGraph(CreateScopedArguments, get(bytecode.m_scope)); 6635 set(bytecode.m_dst, createArguments); 6636 6636 NEXT_OPCODE(op_create_scoped_arguments); 6637 6637 } … … 6641 6641 noticeArgumentsUse(); 6642 6642 Node* createArguments = addToGraph(CreateClonedArguments); 6643 set(bytecode. dst, createArguments);6643 set(bytecode.m_dst, createArguments); 6644 6644 NEXT_OPCODE(op_create_cloned_arguments); 6645 6645 } … … 6647 6647 case op_get_from_arguments: { 6648 6648 auto bytecode = currentInstruction->as<OpGetFromArguments>(); 6649 set(bytecode. dst,6649 set(bytecode.m_dst, 6650 6650 addToGraph( 6651 6651 GetFromArguments, 6652 OpInfo(bytecode. index),6652 OpInfo(bytecode.m_index), 6653 6653 OpInfo(getPrediction()), 6654 get(bytecode. arguments)));6654 get(bytecode.m_arguments))); 6655 6655 NEXT_OPCODE(op_get_from_arguments); 6656 6656 } … … 6660 6660 addToGraph( 6661 6661 PutToArguments, 6662 OpInfo(bytecode. index),6663 get(bytecode. arguments),6664 get(bytecode. value));6662 OpInfo(bytecode.m_index), 6663 get(bytecode.m_arguments), 6664 get(bytecode.m_value)); 6665 6665 NEXT_OPCODE(op_put_to_arguments); 6666 6666 } … … 6670 6670 InlineCallFrame* inlineCallFrame = this->inlineCallFrame(); 6671 6671 Node* argument; 6672 int32_t argumentIndexIncludingThis = bytecode. index;6672 int32_t argumentIndexIncludingThis = bytecode.m_index; 6673 6673 if (inlineCallFrame && !inlineCallFrame->isVarargs()) { 6674 6674 int32_t argumentCountIncludingThisWithFixup = inlineCallFrame->argumentsWithFixup.size(); … … 6679 6679 } else 6680 6680 argument = addToGraph(GetArgument, OpInfo(argumentIndexIncludingThis), OpInfo(getPrediction())); 6681 set(bytecode. dst, argument);6681 set(bytecode.m_dst, argument); 6682 6682 NEXT_OPCODE(op_get_argument); 6683 6683 } … … 6710 6710 case op_set_function_name: { 6711 6711 auto bytecode = currentInstruction->as<OpSetFunctionName>(); 6712 Node* func = get(bytecode. function);6713 Node* name = get(bytecode. name);6712 Node* func = get(bytecode.m_function); 6713 Node* name = get(bytecode.m_name); 6714 6714 addToGraph(SetFunctionName, func, name); 6715 6715 NEXT_OPCODE(op_set_function_name); … … 6718 6718 case op_typeof: { 6719 6719 auto bytecode = currentInstruction->as<OpTypeof>(); 6720 set(bytecode. dst, addToGraph(TypeOf, get(bytecode.value)));6720 set(bytecode.m_dst, addToGraph(TypeOf, get(bytecode.m_value))); 6721 6721 NEXT_OPCODE(op_typeof); 6722 6722 } … … 6725 6725 auto bytecode = currentInstruction->as<OpToNumber>(); 6726 6726 SpeculatedType prediction = getPrediction(); 6727 Node* value = get(bytecode. operand);6728 set(bytecode. dst, addToGraph(ToNumber, OpInfo(0), OpInfo(prediction), value));6727 Node* value = get(bytecode.m_operand); 6728 set(bytecode.m_dst, addToGraph(ToNumber, OpInfo(0), OpInfo(prediction), value)); 6729 6729 NEXT_OPCODE(op_to_number); 6730 6730 } … … 6732 6732 case op_to_string: { 6733 6733 auto bytecode = currentInstruction->as<OpToString>(); 6734 Node* value = get(bytecode. operand);6735 set(bytecode. dst, addToGraph(ToString, value));6734 Node* value = get(bytecode.m_operand); 6735 set(bytecode.m_dst, addToGraph(ToString, value)); 6736 6736 NEXT_OPCODE(op_to_string); 6737 6737 } … … 6740 6740 auto bytecode = currentInstruction->as<OpToObject>(); 6741 6741 SpeculatedType prediction = getPrediction(); 6742 Node* value = get(bytecode. operand);6743 unsigned identifierNumber = m_inlineStackTop->m_identifierRemap[bytecode.m essage];6744 set(bytecode. dst, addToGraph(ToObject, OpInfo(identifierNumber), OpInfo(prediction), value));6742 Node* value = get(bytecode.m_operand); 6743 unsigned identifierNumber = m_inlineStackTop->m_identifierRemap[bytecode.m_message]; 6744 set(bytecode.m_dst, addToGraph(ToObject, OpInfo(identifierNumber), OpInfo(prediction), value)); 6745 6745 NEXT_OPCODE(op_to_object); 6746 6746 } … … 6748 6748 case op_in_by_val: { 6749 6749 auto bytecode = currentInstruction->as<OpInByVal>(); 6750 ArrayMode arrayMode = getArrayMode(bytecode.metadata(codeBlock). arrayProfile, Array::Read);6751 set(bytecode. dst, addToGraph(InByVal, OpInfo(arrayMode.asWord()), get(bytecode.base), get(bytecode.property)));6750 ArrayMode arrayMode = getArrayMode(bytecode.metadata(codeBlock).m_arrayProfile, Array::Read); 6751 set(bytecode.m_dst, addToGraph(InByVal, OpInfo(arrayMode.asWord()), get(bytecode.m_base), get(bytecode.m_property))); 6752 6752 NEXT_OPCODE(op_in_by_val); 6753 6753 } … … 6755 6755 case op_in_by_id: { 6756 6756 auto bytecode = currentInstruction->as<OpInById>(); 6757 Node* base = get(bytecode. base);6758 unsigned identifierNumber = m_inlineStackTop->m_identifierRemap[bytecode. property];6757 Node* base = get(bytecode.m_base); 6758 unsigned identifierNumber = m_inlineStackTop->m_identifierRemap[bytecode.m_property]; 6759 6759 UniquedStringImpl* uid = m_graph.identifiers()[identifierNumber]; 6760 6760 … … 6785 6785 6786 6786 Node* match = addToGraph(MatchStructure, OpInfo(data), base); 6787 set(bytecode. dst, match);6787 set(bytecode.m_dst, match); 6788 6788 NEXT_OPCODE(op_in_by_id); 6789 6789 } 6790 6790 } 6791 6791 6792 set(bytecode. dst, addToGraph(InById, OpInfo(identifierNumber), base));6792 set(bytecode.m_dst, addToGraph(InById, OpInfo(identifierNumber), base)); 6793 6793 NEXT_OPCODE(op_in_by_id); 6794 6794 } … … 6796 6796 case op_get_enumerable_length: { 6797 6797 auto bytecode = currentInstruction->as<OpGetEnumerableLength>(); 6798 set(bytecode. dst, addToGraph(GetEnumerableLength, get(bytecode.base)));6798 set(bytecode.m_dst, addToGraph(GetEnumerableLength, get(bytecode.m_base))); 6799 6799 NEXT_OPCODE(op_get_enumerable_length); 6800 6800 } … … 6802 6802 case op_has_generic_property: { 6803 6803 auto bytecode = currentInstruction->as<OpHasGenericProperty>(); 6804 set(bytecode. dst, addToGraph(HasGenericProperty, get(bytecode.base), get(bytecode.property)));6804 set(bytecode.m_dst, addToGraph(HasGenericProperty, get(bytecode.m_base), get(bytecode.m_property))); 6805 6805 NEXT_OPCODE(op_has_generic_property); 6806 6806 } … … 6808 6808 case op_has_structure_property: { 6809 6809 auto bytecode = currentInstruction->as<OpHasStructureProperty>(); 6810 set(bytecode. dst, addToGraph(HasStructureProperty,6811 get(bytecode. base),6812 get(bytecode. property),6813 get(bytecode. enumerator)));6810 set(bytecode.m_dst, addToGraph(HasStructureProperty, 6811 get(bytecode.m_base), 6812 get(bytecode.m_property), 6813 get(bytecode.m_enumerator))); 6814 6814 NEXT_OPCODE(op_has_structure_property); 6815 6815 } … … 6817 6817 case op_has_indexed_property: { 6818 6818 auto bytecode = currentInstruction->as<OpHasIndexedProperty>(); 6819 Node* base = get(bytecode. base);6820 ArrayMode arrayMode = getArrayMode(bytecode.metadata(codeBlock). arrayProfile, Array::Read);6821 Node* property = get(bytecode. property);6819 Node* base = get(bytecode.m_base); 6820 ArrayMode arrayMode = getArrayMode(bytecode.metadata(codeBlock).m_arrayProfile, Array::Read); 6821 Node* property = get(bytecode.m_property); 6822 6822 Node* hasIterableProperty = addToGraph(HasIndexedProperty, OpInfo(arrayMode.asWord()), OpInfo(static_cast<uint32_t>(PropertySlot::InternalMethodType::GetOwnProperty)), base, property); 6823 set(bytecode. dst, hasIterableProperty);6823 set(bytecode.m_dst, hasIterableProperty); 6824 6824 NEXT_OPCODE(op_has_indexed_property); 6825 6825 } … … 6829 6829 SpeculatedType prediction = getPredictionWithoutOSRExit(); 6830 6830 6831 Node* base = get(bytecode. base);6832 Node* property = get(bytecode. property);6833 Node* index = get(bytecode. index);6834 Node* enumerator = get(bytecode. enumerator);6831 Node* base = get(bytecode.m_base); 6832 Node* property = get(bytecode.m_property); 6833 Node* index = get(bytecode.m_index); 6834 Node* enumerator = get(bytecode.m_enumerator); 6835 6835 6836 6836 addVarArgChild(base); … … 6838 6838 addVarArgChild(index); 6839 6839 addVarArgChild(enumerator); 6840 set(bytecode. dst, addToGraph(Node::VarArg, GetDirectPname, OpInfo(0), OpInfo(prediction)));6840 set(bytecode.m_dst, addToGraph(Node::VarArg, GetDirectPname, OpInfo(0), OpInfo(prediction))); 6841 6841 6842 6842 NEXT_OPCODE(op_get_direct_pname); … … 6845 6845 case op_get_property_enumerator: { 6846 6846 auto bytecode = currentInstruction->as<OpGetPropertyEnumerator>(); 6847 set(bytecode. dst, addToGraph(GetPropertyEnumerator, get(bytecode.base)));6847 set(bytecode.m_dst, addToGraph(GetPropertyEnumerator, get(bytecode.m_base))); 6848 6848 NEXT_OPCODE(op_get_property_enumerator); 6849 6849 } … … 6851 6851 case op_enumerator_structure_pname: { 6852 6852 auto bytecode = currentInstruction->as<OpEnumeratorStructurePname>(); 6853 set(bytecode. dst, addToGraph(GetEnumeratorStructurePname,6854 get(bytecode. enumerator),6855 get(bytecode. index)));6853 set(bytecode.m_dst, addToGraph(GetEnumeratorStructurePname, 6854 get(bytecode.m_enumerator), 6855 get(bytecode.m_index))); 6856 6856 NEXT_OPCODE(op_enumerator_structure_pname); 6857 6857 } … … 6859 6859 case op_enumerator_generic_pname: { 6860 6860 auto bytecode = currentInstruction->as<OpEnumeratorGenericPname>(); 6861 set(bytecode. dst, addToGraph(GetEnumeratorGenericPname,6862 get(bytecode. enumerator),6863 get(bytecode. index)));6861 set(bytecode.m_dst, addToGraph(GetEnumeratorGenericPname, 6862 get(bytecode.m_enumerator), 6863 get(bytecode.m_index))); 6864 6864 NEXT_OPCODE(op_enumerator_generic_pname); 6865 6865 } … … 6867 6867 case op_to_index_string: { 6868 6868 auto bytecode = currentInstruction->as<OpToIndexString>(); 6869 set(bytecode. dst, addToGraph(ToIndexString, get(bytecode.index)));6869 set(bytecode.m_dst, addToGraph(ToIndexString, get(bytecode.m_index))); 6870 6870 NEXT_OPCODE(op_to_index_string); 6871 6871 } … … 6874 6874 auto bytecode = currentInstruction->as<OpLogShadowChickenPrologue>(); 6875 6875 if (!m_inlineStackTop->m_inlineCallFrame) 6876 addToGraph(LogShadowChickenPrologue, get(bytecode. scope));6876 addToGraph(LogShadowChickenPrologue, get(bytecode.m_scope)); 6877 6877 NEXT_OPCODE(op_log_shadow_chicken_prologue); 6878 6878 } … … 6884 6884 // ends up being inlined. 6885 6885 // https://bugs.webkit.org/show_bug.cgi?id=155686 6886 addToGraph(LogShadowChickenTail, get(bytecode. thisValue), get(bytecode.scope));6886 addToGraph(LogShadowChickenTail, get(bytecode.m_thisValue), get(bytecode.m_scope)); 6887 6887 } 6888 6888 NEXT_OPCODE(op_log_shadow_chicken_tail); … … 7148 7148 void ByteCodeParser::handlePutByVal(Bytecode bytecode, unsigned instructionSize) 7149 7149 { 7150 Node* base = get(bytecode. base);7151 Node* property = get(bytecode. property);7152 Node* value = get(bytecode. value);7150 Node* base = get(bytecode.m_base); 7151 Node* property = get(bytecode.m_property); 7152 Node* value = get(bytecode.m_value); 7153 7153 bool isDirect = Bytecode::opcodeID == op_put_by_val_direct; 7154 7154 bool compiledAsPutById = false; … … 7191 7191 7192 7192 if (!compiledAsPutById) { 7193 ArrayMode arrayMode = getArrayMode(bytecode.metadata(m_inlineStackTop->m_codeBlock). arrayProfile, Array::Write);7193 ArrayMode arrayMode = getArrayMode(bytecode.metadata(m_inlineStackTop->m_codeBlock).m_arrayProfile, Array::Write); 7194 7194 7195 7195 addVarArgChild(base); … … 7205 7205 void ByteCodeParser::handlePutAccessorById(NodeType op, Bytecode bytecode) 7206 7206 { 7207 Node* base = get(bytecode. base);7208 unsigned identifierNumber = m_inlineStackTop->m_identifierRemap[bytecode. property];7209 Node* accessor = get(bytecode. accessor);7210 addToGraph(op, OpInfo(identifierNumber), OpInfo(bytecode. attributes), base, accessor);7207 Node* base = get(bytecode.m_base); 7208 unsigned identifierNumber = m_inlineStackTop->m_identifierRemap[bytecode.m_property]; 7209 Node* accessor = get(bytecode.m_accessor); 7210 addToGraph(op, OpInfo(identifierNumber), OpInfo(bytecode.m_attributes), base, accessor); 7211 7211 } 7212 7212 … … 7214 7214 void ByteCodeParser::handlePutAccessorByVal(NodeType op, Bytecode bytecode) 7215 7215 { 7216 Node* base = get(bytecode. base);7217 Node* subscript = get(bytecode. property);7218 Node* accessor = get(bytecode. accessor);7219 addToGraph(op, OpInfo(bytecode. attributes), base, subscript, accessor);7216 Node* base = get(bytecode.m_base); 7217 Node* subscript = get(bytecode.m_property); 7218 Node* accessor = get(bytecode.m_accessor); 7219 addToGraph(op, OpInfo(bytecode.m_attributes), base, subscript, accessor); 7220 7220 } 7221 7221 … … 7223 7223 void ByteCodeParser::handleNewFunc(NodeType op, Bytecode bytecode) 7224 7224 { 7225 FunctionExecutable* decl = m_inlineStackTop->m_profiledBlock->functionDecl(bytecode. functionDecl);7225 FunctionExecutable* decl = m_inlineStackTop->m_profiledBlock->functionDecl(bytecode.m_functionDecl); 7226 7226 FrozenValue* frozen = m_graph.freezeStrong(decl); 7227 Node* scope = get(bytecode. scope);7228 set(bytecode. dst, addToGraph(op, OpInfo(frozen), scope));7227 Node* scope = get(bytecode.m_scope); 7228 set(bytecode.m_dst, addToGraph(op, OpInfo(frozen), scope)); 7229 7229 // Ideally we wouldn't have to do this Phantom. But: 7230 7230 // … … 7240 7240 void ByteCodeParser::handleNewFuncExp(NodeType op, Bytecode bytecode) 7241 7241 { 7242 FunctionExecutable* expr = m_inlineStackTop->m_profiledBlock->functionExpr(bytecode. functionDecl);7242 FunctionExecutable* expr = m_inlineStackTop->m_profiledBlock->functionExpr(bytecode.m_functionDecl); 7243 7243 FrozenValue* frozen = m_graph.freezeStrong(expr); 7244 Node* scope = get(bytecode. scope);7245 set(bytecode. dst, addToGraph(op, OpInfo(frozen), scope));7244 Node* scope = get(bytecode.m_scope); 7245 set(bytecode.m_dst, addToGraph(op, OpInfo(frozen), scope)); 7246 7246 // Ideally we wouldn't have to do this Phantom. But: 7247 7247 // -
trunk/Source/JavaScriptCore/dfg/DFGOSREntry.cpp
r237547 r240041 1 1 /* 2 * Copyright (C) 2011-201 8Apple Inc. All rights reserved.2 * Copyright (C) 2011-2019 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 393 393 auto instruction = exec->codeBlock()->instructions().at(exec->bytecodeOffset()); 394 394 ASSERT(instruction->is<OpCatch>()); 395 ValueProfileAndOperandBuffer* buffer = instruction->as<OpCatch>().metadata(exec). buffer;395 ValueProfileAndOperandBuffer* buffer = instruction->as<OpCatch>().metadata(exec).m_buffer; 396 396 JSValue* dataBuffer = reinterpret_cast<JSValue*>(dfgCommon->catchOSREntryBuffer->dataBuffer()); 397 397 unsigned index = 0; -
trunk/Source/JavaScriptCore/ftl/FTLOperations.cpp
r237547 r240041 1 1 /* 2 * Copyright (C) 2014-201 8Apple Inc. All rights reserved.2 * Copyright (C) 2014-2019 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 478 478 RELEASE_ASSERT(currentInstruction->is<OpNewArrayBuffer>()); 479 479 auto newArrayBuffer = currentInstruction->as<OpNewArrayBuffer>(); 480 ArrayAllocationProfile* profile = &newArrayBuffer.metadata(codeBlock). arrayAllocationProfile;480 ArrayAllocationProfile* profile = &newArrayBuffer.metadata(codeBlock).m_arrayAllocationProfile; 481 481 482 482 // FIXME: Share the code with CommonSlowPaths. Currently, codeBlock etc. are slightly different. … … 496 496 // a compilation thread. 497 497 WTF::storeStoreFence(); 498 codeBlock->constantRegister(newArrayBuffer. immutableButterfly.offset()).set(vm, codeBlock, immutableButterfly);498 codeBlock->constantRegister(newArrayBuffer.m_immutableButterfly.offset()).set(vm, codeBlock, immutableButterfly); 499 499 WTF::storeStoreFence(); 500 500 } -
trunk/Source/JavaScriptCore/generator/Argument.rb
r238804 r240041 1 # Copyright (C) 2018 Apple Inc. All rights reserved.1 # Copyright (C) 2018-2019 Apple Inc. All rights reserved. 2 2 # 3 3 # Redistribution and use in source and binary forms, with or without … … 36 36 37 37 def field 38 "#{@type.to_s} #{ @name};"38 "#{@type.to_s} #{field_name};" 39 39 end 40 40 41 41 def create_param 42 42 "#{@type.to_s} #{@name}" 43 end 44 45 def field_name 46 "m_#{@name}" 43 47 end 44 48 … … 56 60 57 61 def load_from_stream(index, size) 58 "#{ @name}(#{Fits::convert(size, "stream[#{index}]", @type)})"62 "#{field_name}(#{Fits::convert(size, "stream[#{index}]", @type)})" 59 63 end 60 64 -
trunk/Source/JavaScriptCore/generator/Metadata.rb
r238804 r240041 1 # Copyright (C) 2018 Apple Inc. All rights reserved.1 # Copyright (C) 2018-2019 Apple Inc. All rights reserved. 2 2 # 3 3 # Redistribution and use in source and binary forms, with or without … … 48 48 "#{prefix}union {\n#{convertFields(prefix + ' ', type)}\n#{prefix}};" 49 49 else 50 "#{prefix}#{type.to_s} #{field.to_s};"50 "#{prefix}#{type.to_s} m_#{field.to_s};" 51 51 end 52 52 end.join("\n") … … 58 58 if @initializers && (not @initializers.empty?) 59 59 inits = "\n : " + @initializers.map do |metadata, arg| 60 " #{metadata}(__op.#{arg})"60 "m_#{metadata}(__op.m_#{arg})" 61 61 end.join("\n , ").concat("\n "); 62 62 end … … 122 122 123 123 def self.field_name 124 "m etadataID"124 "m_metadataID" 125 125 end 126 126 end -
trunk/Source/JavaScriptCore/generator/Opcode.rb
r239009 r240041 1 # Copyright (C) 2018 Apple Inc. All rights reserved.1 # Copyright (C) 2018-2019 Apple Inc. All rights reserved. 2 2 # 3 3 # Redistribution and use in source and binary forms, with or without … … 165 165 #{print_args { |arg| 166 166 <<-EOF.chomp 167 dumper->dumpOperand(#{arg. name}, #{arg.index == 1});167 dumper->dumpOperand(#{arg.field_name}, #{arg.index == 1}); 168 168 EOF 169 169 }} … … 226 226 def struct_indices 227 227 out = [] 228 out += @args.map(&: name) unless @args.nil?228 out += @args.map(&:field_name) unless @args.nil? 229 229 out << Metadata.field_name unless @metadata.empty? 230 230 out.map.with_index do |name, index| -
trunk/Source/JavaScriptCore/jit/JIT.h
r239761 r240041 362 362 void emitValueProfilingSiteIfProfiledOpcode(...); 363 363 template<typename Op> 364 std::enable_if_t<std::is_same<decltype(Op::Metadata:: profile), ValueProfile>::value, void>364 std::enable_if_t<std::is_same<decltype(Op::Metadata::m_profile), ValueProfile>::value, void> 365 365 emitValueProfilingSiteIfProfiledOpcode(Op bytecode); 366 366 -
trunk/Source/JavaScriptCore/jit/JITArithmetic.cpp
r238732 r240041 1 1 /* 2 * Copyright (C) 2008-201 8Apple Inc. All rights reserved.2 * Copyright (C) 2008-2019 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 158 158 { 159 159 auto bytecode = currentInstruction->as<OpUnsigned>(); 160 int result = bytecode. dst.offset();161 int op1 = bytecode. operand.offset();160 int result = bytecode.m_dst.offset(); 161 int op1 = bytecode.m_operand.offset(); 162 162 163 163 emitGetVirtualRegister(op1, regT0); … … 177 177 178 178 auto bytecode = instruction->as<Op>(); 179 int op1 = bytecode. lhs.offset();180 int op2 = bytecode. rhs.offset();181 unsigned target = jumpTarget(instruction, bytecode. target);179 int op1 = bytecode.m_lhs.offset(); 180 int op2 = bytecode.m_rhs.offset(); 181 unsigned target = jumpTarget(instruction, bytecode.m_target); 182 182 if (isOperandConstantChar(op1)) { 183 183 emitGetVirtualRegister(op2, regT0); … … 224 224 { 225 225 auto bytecode = instruction->as<Op>(); 226 int op1 = bytecode. lhs.offset();227 int op2 = bytecode. rhs.offset();228 unsigned target = jumpTarget(instruction, bytecode. target);226 int op1 = bytecode.m_lhs.offset(); 227 int op2 = bytecode.m_rhs.offset(); 228 unsigned target = jumpTarget(instruction, bytecode.m_target); 229 229 if (isOperandConstantInt(op2)) { 230 230 emitGetVirtualRegister(op1, regT0); … … 245 245 { 246 246 auto bytecode = instruction->as<Op>(); 247 int dst = bytecode. dst.offset();248 int op1 = bytecode. lhs.offset();249 int op2 = bytecode. rhs.offset();247 int dst = bytecode.m_dst.offset(); 248 int op1 = bytecode.m_lhs.offset(); 249 int op2 = bytecode.m_rhs.offset(); 250 250 if (isOperandConstantInt(op2)) { 251 251 emitGetVirtualRegister(op1, regT0); … … 268 268 { 269 269 auto bytecode = instruction->as<Op>(); 270 int op1 = bytecode. lhs.offset();271 int op2 = bytecode. rhs.offset();272 unsigned target = jumpTarget(instruction, bytecode. target);270 int op1 = bytecode.m_lhs.offset(); 271 int op2 = bytecode.m_rhs.offset(); 272 unsigned target = jumpTarget(instruction, bytecode.m_target); 273 273 274 274 // We generate inline code for the following cases in the slow path: … … 366 366 { 367 367 auto bytecode = currentInstruction->as<OpInc>(); 368 int srcDst = bytecode. srcDst.offset();368 int srcDst = bytecode.m_srcDst.offset(); 369 369 370 370 emitGetVirtualRegister(srcDst, regT0); … … 378 378 { 379 379 auto bytecode = currentInstruction->as<OpDec>(); 380 int srcDst = bytecode. srcDst.offset();380 int srcDst = bytecode.m_srcDst.offset(); 381 381 382 382 emitGetVirtualRegister(srcDst, regT0); … … 394 394 { 395 395 auto bytecode = currentInstruction->as<OpMod>(); 396 int result = bytecode. dst.offset();397 int op1 = bytecode. lhs.offset();398 int op2 = bytecode. rhs.offset();396 int result = bytecode.m_dst.offset(); 397 int op1 = bytecode.m_lhs.offset(); 398 int op2 = bytecode.m_rhs.offset(); 399 399 400 400 // Make sure registers are correct for x86 IDIV instructions. … … 452 452 void JIT::emit_op_negate(const Instruction* currentInstruction) 453 453 { 454 ArithProfile* arithProfile = ¤tInstruction->as<OpNegate>().metadata(m_codeBlock). arithProfile;454 ArithProfile* arithProfile = ¤tInstruction->as<OpNegate>().metadata(m_codeBlock).m_arithProfile; 455 455 JITNegIC* negateIC = m_codeBlock->addJITNegIC(arithProfile, currentInstruction); 456 456 m_instructionToMathIC.add(currentInstruction, negateIC); … … 470 470 { 471 471 auto bytecode = currentInstruction->as<Op>(); 472 int result = bytecode. dst.offset();473 int op1 = bytecode. lhs.offset();474 int op2 = bytecode. rhs.offset();472 int result = bytecode.m_dst.offset(); 473 int op1 = bytecode.m_lhs.offset(); 474 int op2 = bytecode.m_rhs.offset(); 475 475 476 476 #if USE(JSVALUE64) … … 517 517 { 518 518 auto bytecode = currentInstruction->as<OpBitnot>(); 519 int result = bytecode. dst.offset();520 int op1 = bytecode. operand.offset();519 int result = bytecode.m_dst.offset(); 520 int op1 = bytecode.m_operand.offset(); 521 521 522 522 #if USE(JSVALUE64) … … 578 578 { 579 579 auto bytecode = currentInstruction->as<Op>(); 580 int result = bytecode. dst.offset();581 int op1 = bytecode. lhs.offset();582 int op2 = bytecode. rhs.offset();580 int result = bytecode.m_dst.offset(); 581 int op1 = bytecode.m_lhs.offset(); 582 int op2 = bytecode.m_rhs.offset(); 583 583 584 584 #if USE(JSVALUE64) … … 640 640 void JIT::emit_op_add(const Instruction* currentInstruction) 641 641 { 642 ArithProfile* arithProfile = ¤tInstruction->as<OpAdd>().metadata(m_codeBlock). arithProfile;642 ArithProfile* arithProfile = ¤tInstruction->as<OpAdd>().metadata(m_codeBlock).m_arithProfile; 643 643 JITAddIC* addIC = m_codeBlock->addJITAddIC(arithProfile, currentInstruction); 644 644 m_instructionToMathIC.add(currentInstruction, addIC); … … 658 658 { 659 659 auto bytecode = currentInstruction->as<Op>(); 660 int result = bytecode. dst.offset();661 int operand = bytecode. operand.offset();660 int result = bytecode.m_dst.offset(); 661 int operand = bytecode.m_operand.offset(); 662 662 663 663 #if USE(JSVALUE64) … … 709 709 auto bytecode = currentInstruction->as<Op>(); 710 710 OperandTypes types = getOperandTypes(copiedArithProfile(bytecode)); 711 int result = bytecode. dst.offset();712 int op1 = bytecode. lhs.offset();713 int op2 = bytecode. rhs.offset();711 int result = bytecode.m_dst.offset(); 712 int op1 = bytecode.m_lhs.offset(); 713 int op2 = bytecode.m_rhs.offset(); 714 714 715 715 #if USE(JSVALUE64) … … 784 784 785 785 auto bytecode = currentInstruction->as<Op>(); 786 int result = bytecode. dst.offset();786 int result = bytecode.m_dst.offset(); 787 787 788 788 #if USE(JSVALUE64) … … 831 831 auto bytecode = currentInstruction->as<Op>(); 832 832 OperandTypes types = getOperandTypes(copiedArithProfile(bytecode)); 833 int result = bytecode. dst.offset();834 int op1 = bytecode. lhs.offset();835 int op2 = bytecode. rhs.offset();833 int result = bytecode.m_dst.offset(); 834 int op1 = bytecode.m_lhs.offset(); 835 int op2 = bytecode.m_rhs.offset(); 836 836 837 837 #if USE(JSVALUE64) … … 893 893 auto bytecode = currentInstruction->as<OpDiv>(); 894 894 auto& metadata = bytecode.metadata(m_codeBlock); 895 int result = bytecode. dst.offset();896 int op1 = bytecode. lhs.offset();897 int op2 = bytecode. rhs.offset();898 899 #if USE(JSVALUE64) 900 OperandTypes types = getOperandTypes(metadata. arithProfile);895 int result = bytecode.m_dst.offset(); 896 int op1 = bytecode.m_lhs.offset(); 897 int op2 = bytecode.m_rhs.offset(); 898 899 #if USE(JSVALUE64) 900 OperandTypes types = getOperandTypes(metadata.m_arithProfile); 901 901 JSValueRegs leftRegs = JSValueRegs(regT0); 902 902 JSValueRegs rightRegs = JSValueRegs(regT1); … … 904 904 GPRReg scratchGPR = regT2; 905 905 #else 906 OperandTypes types = getOperandTypes(metadata. arithProfile);906 OperandTypes types = getOperandTypes(metadata.m_arithProfile); 907 907 JSValueRegs leftRegs = JSValueRegs(regT1, regT0); 908 908 JSValueRegs rightRegs = JSValueRegs(regT3, regT2); … … 914 914 ArithProfile* arithProfile = nullptr; 915 915 if (shouldEmitProfiling()) 916 arithProfile = ¤tInstruction->as<OpDiv>().metadata(m_codeBlock). arithProfile;916 arithProfile = ¤tInstruction->as<OpDiv>().metadata(m_codeBlock).m_arithProfile; 917 917 918 918 SnippetOperand leftOperand(types.first()); … … 959 959 void JIT::emit_op_mul(const Instruction* currentInstruction) 960 960 { 961 ArithProfile* arithProfile = ¤tInstruction->as<OpMul>().metadata(m_codeBlock). arithProfile;961 ArithProfile* arithProfile = ¤tInstruction->as<OpMul>().metadata(m_codeBlock).m_arithProfile; 962 962 JITMulIC* mulIC = m_codeBlock->addJITMulIC(arithProfile, currentInstruction); 963 963 m_instructionToMathIC.add(currentInstruction, mulIC); … … 975 975 void JIT::emit_op_sub(const Instruction* currentInstruction) 976 976 { 977 ArithProfile* arithProfile = ¤tInstruction->as<OpSub>().metadata(m_codeBlock). arithProfile;977 ArithProfile* arithProfile = ¤tInstruction->as<OpSub>().metadata(m_codeBlock).m_arithProfile; 978 978 JITSubIC* subIC = m_codeBlock->addJITSubIC(arithProfile, currentInstruction); 979 979 m_instructionToMathIC.add(currentInstruction, subIC); -
trunk/Source/JavaScriptCore/jit/JITArithmetic32_64.cpp
r238414 r240041 1 1 /* 2 * Copyright (C) 2008 , 2015Apple Inc. All rights reserved.2 * Copyright (C) 2008-2019 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 49 49 50 50 auto bytecode = instruction->as<Op>(); 51 int op1 = bytecode. lhs.offset();52 int op2 = bytecode. rhs.offset();53 unsigned target = jumpTarget(instruction, bytecode. target);51 int op1 = bytecode.m_lhs.offset(); 52 int op2 = bytecode.m_rhs.offset(); 53 unsigned target = jumpTarget(instruction, bytecode.m_target); 54 54 55 55 // Character less. … … 103 103 { 104 104 auto bytecode = instruction->as<Op>(); 105 int op1 = bytecode. lhs.offset();106 int op2 = bytecode. rhs.offset();107 unsigned target = jumpTarget(instruction, bytecode. target);105 int op1 = bytecode.m_lhs.offset(); 106 int op2 = bytecode.m_rhs.offset(); 107 unsigned target = jumpTarget(instruction, bytecode.m_target); 108 108 109 109 if (isOperandConstantInt(op1)) { … … 123 123 { 124 124 auto bytecode = instruction->as<Op>(); 125 int dst = bytecode. dst.offset();126 int op1 = bytecode. lhs.offset();127 int op2 = bytecode. rhs.offset();125 int dst = bytecode.m_dst.offset(); 126 int op1 = bytecode.m_lhs.offset(); 127 int op2 = bytecode.m_rhs.offset(); 128 128 129 129 if (isOperandConstantInt(op1)) { … … 144 144 { 145 145 auto bytecode = instruction->as<Op>(); 146 int op1 = bytecode. lhs.offset();147 int op2 = bytecode. rhs.offset();148 unsigned target = jumpTarget(instruction, bytecode. target);146 int op1 = bytecode.m_lhs.offset(); 147 int op2 = bytecode.m_rhs.offset(); 148 unsigned target = jumpTarget(instruction, bytecode.m_target); 149 149 150 150 linkAllSlowCases(iter); … … 159 159 { 160 160 auto bytecode = currentInstruction->as<OpUnsigned>(); 161 int result = bytecode. dst.offset();162 int op1 = bytecode. operand.offset();161 int result = bytecode.m_dst.offset(); 162 int op1 = bytecode.m_operand.offset(); 163 163 164 164 emitLoad(op1, regT1, regT0); … … 172 172 { 173 173 auto bytecode = currentInstruction->as<OpInc>(); 174 int srcDst = bytecode. srcDst.offset();174 int srcDst = bytecode.m_srcDst.offset(); 175 175 176 176 emitLoad(srcDst, regT1, regT0); … … 184 184 { 185 185 auto bytecode = currentInstruction->as<OpDec>(); 186 int srcDst = bytecode. srcDst.offset();186 int srcDst = bytecode.m_srcDst.offset(); 187 187 188 188 emitLoad(srcDst, regT1, regT0); … … 200 200 auto bytecode = instruction->as<Op>(); 201 201 int opcodeID = Op::opcodeID; 202 int target = jumpTarget(instruction, bytecode. target);203 int op1 = bytecode. lhs.offset();204 int op2 = bytecode. rhs.offset();202 int target = jumpTarget(instruction, bytecode.m_target); 203 int op1 = bytecode.m_lhs.offset(); 204 int op2 = bytecode.m_rhs.offset(); 205 205 206 206 if (!notInt32Op1.empty()) { … … 337 337 #if CPU(X86) 338 338 auto bytecode = instruction->as<OpMod>(); 339 int dst = bytecode. dst.offset();340 int op1 = bytecode. lhs.offset();341 int op2 = bytecode. rhs.offset();339 int dst = bytecode.m_dst.offset(); 340 int op1 = bytecode.m_lhs.offset(); 341 int op2 = bytecode.m_rhs.offset(); 342 342 343 343 // Make sure registers are correct for x86 IDIV instructions. -
trunk/Source/JavaScriptCore/jit/JITCall.cpp
r237547 r240041 1 1 /* 2 * Copyright (C) 2008-201 8Apple Inc. All rights reserved.2 * Copyright (C) 2008-2019 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 52 52 { 53 53 emitValueProfilingSite(bytecode.metadata(m_codeBlock)); 54 emitPutVirtualRegister(bytecode. dst.offset());54 emitPutVirtualRegister(bytecode.m_dst.offset()); 55 55 } 56 56 … … 63 63 { 64 64 auto& metadata = bytecode.metadata(m_codeBlock); 65 int argCount = bytecode. argc;66 int registerOffset = -static_cast<int>(bytecode. argv);65 int argCount = bytecode.m_argc; 66 int registerOffset = -static_cast<int>(bytecode.m_argv); 67 67 68 68 if (Op::opcodeID == op_call && shouldEmitProfiling()) { … … 70 70 Jump done = branchIfNotCell(regT0); 71 71 load32(Address(regT0, JSCell::structureIDOffset()), regT0); 72 store32(regT0, metadata. arrayProfile.addressOfLastSeenStructureID());72 store32(regT0, metadata.m_arrayProfile.addressOfLastSeenStructureID()); 73 73 done.link(this); 74 74 } … … 86 86 JIT::compileSetupFrame(const Op& bytecode, CallLinkInfo* info) 87 87 { 88 int thisValue = bytecode. thisValue.offset();89 int arguments = bytecode. arguments.offset();90 int firstFreeRegister = bytecode. firstFree.offset();91 int firstVarArgOffset = bytecode. firstVarArg;88 int thisValue = bytecode.m_thisValue.offset(); 89 int arguments = bytecode.m_arguments.offset(); 90 int firstFreeRegister = bytecode.m_firstFree.offset(); 91 int firstVarArgOffset = bytecode.m_firstVarArg; 92 92 93 93 emitGetVirtualRegister(arguments, regT1); … … 158 158 info->setUpCall(CallLinkInfo::Call, CodeOrigin(m_bytecodeOffset), regT0); 159 159 160 int registerOffset = -bytecode. argv;160 int registerOffset = -bytecode.m_argv; 161 161 162 162 addPtr(TrustedImm32(registerOffset * sizeof(Register) + sizeof(CallerFrameAndPC)), callFrameRegister, stackPointerRegister); … … 182 182 { 183 183 CallFrameShuffleData shuffleData; 184 shuffleData.numPassedArgs = bytecode. argc;184 shuffleData.numPassedArgs = bytecode.m_argc; 185 185 shuffleData.tagTypeNumber = GPRInfo::tagTypeNumberRegister; 186 186 shuffleData.numLocals = 187 bytecode. argv - sizeof(CallerFrameAndPC) / sizeof(Register);188 shuffleData.args.resize(bytecode. argc);189 for (unsigned i = 0; i < bytecode. argc; ++i) {187 bytecode.m_argv - sizeof(CallerFrameAndPC) / sizeof(Register); 188 shuffleData.args.resize(bytecode.m_argc); 189 for (unsigned i = 0; i < bytecode.m_argc; ++i) { 190 190 shuffleData.args[i] = 191 191 ValueRecovery::displacedInJSStack( 192 virtualRegisterForArgument(i) - bytecode. argv,192 virtualRegisterForArgument(i) - bytecode.m_argv, 193 193 DataFormatJS); 194 194 } … … 207 207 OpcodeID opcodeID = Op::opcodeID; 208 208 auto bytecode = instruction->as<Op>(); 209 int callee = bytecode. callee.offset();209 int callee = bytecode.m_callee.offset(); 210 210 211 211 /* Caller always: -
trunk/Source/JavaScriptCore/jit/JITCall32_64.cpp
r238414 r240041 1 1 /* 2 * Copyright (C) 2008-201 8Apple Inc. All rights reserved.2 * Copyright (C) 2008-2019 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 50 50 { 51 51 emitValueProfilingSite(bytecode.metadata(m_codeBlock)); 52 emitStore(bytecode. dst.offset(), regT1, regT0);52 emitStore(bytecode.m_dst.offset(), regT1, regT0); 53 53 } 54 54 … … 56 56 { 57 57 auto bytecode = currentInstruction->as<OpRet>(); 58 int value = bytecode. value.offset();58 int value = bytecode.m_value.offset(); 59 59 60 60 emitLoad(value, regT1, regT0); … … 154 154 { 155 155 auto& metadata = bytecode.metadata(m_codeBlock); 156 int argCount = bytecode. argc;157 int registerOffset = -static_cast<int>(bytecode. argv);156 int argCount = bytecode.m_argc; 157 int registerOffset = -static_cast<int>(bytecode.m_argv); 158 158 159 159 if (Op::opcodeID == op_call && shouldEmitProfiling()) { … … 161 161 Jump done = branchIfNotCell(regT0); 162 162 load32(Address(regT1, JSCell::structureIDOffset()), regT1); 163 store32(regT1, metadata. arrayProfile.addressOfLastSeenStructureID());163 store32(regT1, metadata.m_arrayProfile.addressOfLastSeenStructureID()); 164 164 done.link(this); 165 165 } … … 177 177 { 178 178 OpcodeID opcodeID = Op::opcodeID; 179 int thisValue = bytecode. thisValue.offset();180 int arguments = bytecode. arguments.offset();181 int firstFreeRegister = bytecode. firstFree.offset();182 int firstVarArgOffset = bytecode. firstVarArg;179 int thisValue = bytecode.m_thisValue.offset(); 180 int arguments = bytecode.m_arguments.offset(); 181 int firstFreeRegister = bytecode.m_firstFree.offset(); 182 int firstVarArgOffset = bytecode.m_firstVarArg; 183 183 184 184 emitLoad(arguments, regT1, regT0); … … 249 249 info->setUpCall(CallLinkInfo::Call, CodeOrigin(m_bytecodeOffset), regT0); 250 250 251 int registerOffset = -bytecode. argv;252 int callee = bytecode. callee.offset();251 int registerOffset = -bytecode.m_argv; 252 int callee = bytecode.m_callee.offset(); 253 253 254 254 addPtr(TrustedImm32(registerOffset * sizeof(Register) + sizeof(CallerFrameAndPC)), callFrameRegister, stackPointerRegister); … … 269 269 OpcodeID opcodeID = Op::opcodeID; 270 270 auto bytecode = instruction->as<Op>(); 271 int callee = bytecode. callee.offset();271 int callee = bytecode.m_callee.offset(); 272 272 273 273 /* Caller always: -
trunk/Source/JavaScriptCore/jit/JITInlines.h
r239951 r240041 1 1 /* 2 * Copyright (C) 2008-201 8Apple Inc. All rights reserved.2 * Copyright (C) 2008-2019 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 330 330 331 331 template<typename Op> 332 inline std::enable_if_t<std::is_same<decltype(Op::Metadata:: profile), ValueProfile>::value, void> JIT::emitValueProfilingSiteIfProfiledOpcode(Op bytecode)332 inline std::enable_if_t<std::is_same<decltype(Op::Metadata::m_profile), ValueProfile>::value, void> JIT::emitValueProfilingSiteIfProfiledOpcode(Op bytecode) 333 333 { 334 334 emitValueProfilingSite(bytecode.metadata(m_codeBlock)); … … 342 342 if (!shouldEmitProfiling()) 343 343 return; 344 emitValueProfilingSite(metadata. profile);344 emitValueProfilingSite(metadata.m_profile); 345 345 } 346 346 … … 711 711 ALWAYS_INLINE GetPutInfo JIT::copiedGetPutInfo(OpPutToScope bytecode) 712 712 { 713 unsigned key = bytecode.m etadataID + 1; // HashMap doesn't like 0 as a key713 unsigned key = bytecode.m_metadataID + 1; // HashMap doesn't like 0 as a key 714 714 auto iterator = m_copiedGetPutInfos.find(key); 715 715 if (iterator != m_copiedGetPutInfos.end()) 716 716 return GetPutInfo(iterator->value); 717 GetPutInfo getPutInfo = bytecode.metadata(m_codeBlock). getPutInfo;717 GetPutInfo getPutInfo = bytecode.metadata(m_codeBlock).m_getPutInfo; 718 718 m_copiedGetPutInfos.add(key, getPutInfo.operand()); 719 719 return getPutInfo; … … 723 723 ALWAYS_INLINE ArithProfile JIT::copiedArithProfile(BinaryOp bytecode) 724 724 { 725 uint64_t key = static_cast<uint64_t>(BinaryOp::opcodeID) << 32 | static_cast<uint64_t>(bytecode.m etadataID);725 uint64_t key = static_cast<uint64_t>(BinaryOp::opcodeID) << 32 | static_cast<uint64_t>(bytecode.m_metadataID); 726 726 auto iterator = m_copiedArithProfiles.find(key); 727 727 if (iterator != m_copiedArithProfiles.end()) 728 728 return iterator->value; 729 ArithProfile arithProfile = bytecode.metadata(m_codeBlock). arithProfile;729 ArithProfile arithProfile = bytecode.metadata(m_codeBlock).m_arithProfile; 730 730 m_copiedArithProfiles.add(key, arithProfile); 731 731 return arithProfile; -
trunk/Source/JavaScriptCore/jit/JITOpcodes.cpp
r239761 r240041 1 1 /* 2 * Copyright (C) 2009-201 8Apple Inc. All rights reserved.2 * Copyright (C) 2009-2019 Apple Inc. All rights reserved. 3 3 * Copyright (C) 2010 Patrick Gansterer <paroga@paroga.com> 4 4 * … … 57 57 { 58 58 auto bytecode = currentInstruction->as<OpMov>(); 59 int dst = bytecode. dst.offset();60 int src = bytecode. src.offset();59 int dst = bytecode.m_dst.offset(); 60 int src = bytecode.m_src.offset(); 61 61 62 62 if (m_codeBlock->isConstantRegisterIndex(src)) { … … 78 78 auto bytecode = currentInstruction->as<OpEnd>(); 79 79 RELEASE_ASSERT(returnValueGPR != callFrameRegister); 80 emitGetVirtualRegister(bytecode. value.offset(), returnValueGPR);80 emitGetVirtualRegister(bytecode.m_value.offset(), returnValueGPR); 81 81 emitRestoreCalleeSaves(); 82 82 emitFunctionEpilogue(); … … 87 87 { 88 88 auto bytecode = currentInstruction->as<OpJmp>(); 89 unsigned target = jumpTarget(currentInstruction, bytecode. target);89 unsigned target = jumpTarget(currentInstruction, bytecode.m_target); 90 90 addJump(jump(), target); 91 91 } … … 95 95 auto bytecode = currentInstruction->as<OpNewObject>(); 96 96 auto& metadata = bytecode.metadata(m_codeBlock); 97 Structure* structure = metadata. objectAllocationProfile.structure();97 Structure* structure = metadata.m_objectAllocationProfile.structure(); 98 98 size_t allocationSize = JSFinalObject::allocationSize(structure->inlineCapacity()); 99 99 Allocator allocator = subspaceFor<JSFinalObject>(*m_vm)->allocatorForNonVirtual(allocationSize, AllocatorForMode::AllocatorIfExists); … … 111 111 emitInitializeInlineStorage(resultReg, structure->inlineCapacity()); 112 112 addSlowCase(slowCases); 113 emitPutVirtualRegister(bytecode. dst.offset());113 emitPutVirtualRegister(bytecode.m_dst.offset()); 114 114 } 115 115 } … … 121 121 auto bytecode = currentInstruction->as<OpNewObject>(); 122 122 auto& metadata = bytecode.metadata(m_codeBlock); 123 int dst = bytecode. dst.offset();124 Structure* structure = metadata. objectAllocationProfile.structure();123 int dst = bytecode.m_dst.offset(); 124 Structure* structure = metadata.m_objectAllocationProfile.structure(); 125 125 callOperation(operationNewObject, structure); 126 126 emitStoreCell(dst, returnValueGPR); … … 130 130 { 131 131 auto bytecode = currentInstruction->as<OpOverridesHasInstance>(); 132 int dst = bytecode. dst.offset();133 int constructor = bytecode. constructor.offset();134 int hasInstanceValue = bytecode. hasInstanceValue.offset();132 int dst = bytecode.m_dst.offset(); 133 int constructor = bytecode.m_constructor.offset(); 134 int hasInstanceValue = bytecode.m_hasInstanceValue.offset(); 135 135 136 136 emitGetVirtualRegister(hasInstanceValue, regT0); … … 156 156 { 157 157 auto bytecode = currentInstruction->as<OpInstanceof>(); 158 int dst = bytecode. dst.offset();159 int value = bytecode. value.offset();160 int proto = bytecode. prototype.offset();158 int dst = bytecode.m_dst.offset(); 159 int value = bytecode.m_value.offset(); 160 int proto = bytecode.m_prototype.offset(); 161 161 162 162 // Load the operands (baseVal, proto, and value respectively) into registers. … … 187 187 188 188 auto bytecode = currentInstruction->as<OpInstanceof>(); 189 int resultVReg = bytecode. dst.offset();189 int resultVReg = bytecode.m_dst.offset(); 190 190 191 191 JITInstanceOfGenerator& gen = m_instanceOfs[m_instanceOfIndex++]; … … 205 205 { 206 206 auto bytecode = currentInstruction->as<OpIsEmpty>(); 207 int dst = bytecode. dst.offset();208 int value = bytecode. operand.offset();207 int dst = bytecode.m_dst.offset(); 208 int value = bytecode.m_operand.offset(); 209 209 210 210 emitGetVirtualRegister(value, regT0); … … 218 218 { 219 219 auto bytecode = currentInstruction->as<OpIsUndefined>(); 220 int dst = bytecode. dst.offset();221 int value = bytecode. operand.offset();220 int dst = bytecode.m_dst.offset(); 221 int value = bytecode.m_operand.offset(); 222 222 223 223 emitGetVirtualRegister(value, regT0); … … 247 247 { 248 248 auto bytecode = currentInstruction->as<OpIsUndefinedOrNull>(); 249 int dst = bytecode. dst.offset();250 int value = bytecode. operand.offset();249 int dst = bytecode.m_dst.offset(); 250 int value = bytecode.m_operand.offset(); 251 251 252 252 emitGetVirtualRegister(value, regT0); … … 262 262 { 263 263 auto bytecode = currentInstruction->as<OpIsBoolean>(); 264 int dst = bytecode. dst.offset();265 int value = bytecode. operand.offset();264 int dst = bytecode.m_dst.offset(); 265 int value = bytecode.m_operand.offset(); 266 266 267 267 emitGetVirtualRegister(value, regT0); … … 275 275 { 276 276 auto bytecode = currentInstruction->as<OpIsNumber>(); 277 int dst = bytecode. dst.offset();278 int value = bytecode. operand.offset();277 int dst = bytecode.m_dst.offset(); 278 int value = bytecode.m_operand.offset(); 279 279 280 280 emitGetVirtualRegister(value, regT0); … … 287 287 { 288 288 auto bytecode = currentInstruction->as<OpIsCellWithType>(); 289 int dst = bytecode. dst.offset();290 int value = bytecode. operand.offset();291 int type = bytecode. type;289 int dst = bytecode.m_dst.offset(); 290 int value = bytecode.m_operand.offset(); 291 int type = bytecode.m_type; 292 292 293 293 emitGetVirtualRegister(value, regT0); … … 308 308 { 309 309 auto bytecode = currentInstruction->as<OpIsObject>(); 310 int dst = bytecode. dst.offset();311 int value = bytecode. operand.offset();310 int dst = bytecode.m_dst.offset(); 311 int value = bytecode.m_operand.offset(); 312 312 313 313 emitGetVirtualRegister(value, regT0); … … 333 333 // Return the result in %eax. 334 334 auto bytecode = currentInstruction->as<OpRet>(); 335 emitGetVirtualRegister(bytecode. value.offset(), returnValueGPR);335 emitGetVirtualRegister(bytecode.m_value.offset(), returnValueGPR); 336 336 337 337 checkStackPointerAlignment(); … … 344 344 { 345 345 auto bytecode = currentInstruction->as<OpToPrimitive>(); 346 int dst = bytecode. dst.offset();347 int src = bytecode. src.offset();346 int dst = bytecode.m_dst.offset(); 347 int src = bytecode.m_src.offset(); 348 348 349 349 emitGetVirtualRegister(src, regT0); … … 361 361 { 362 362 auto bytecode = currentInstruction->as<OpSetFunctionName>(); 363 emitGetVirtualRegister(bytecode. function.offset(), regT0);364 emitGetVirtualRegister(bytecode. name.offset(), regT1);363 emitGetVirtualRegister(bytecode.m_function.offset(), regT0); 364 emitGetVirtualRegister(bytecode.m_name.offset(), regT1); 365 365 callOperation(operationSetFunctionName, regT0, regT1); 366 366 } … … 369 369 { 370 370 auto bytecode = currentInstruction->as<OpNot>(); 371 emitGetVirtualRegister(bytecode. operand.offset(), regT0);371 emitGetVirtualRegister(bytecode.m_operand.offset(), regT0); 372 372 373 373 // Invert against JSValue(false); if the value was tagged as a boolean, then all bits will be … … 378 378 xor64(TrustedImm32(static_cast<int32_t>(ValueTrue)), regT0); 379 379 380 emitPutVirtualRegister(bytecode. dst.offset());380 emitPutVirtualRegister(bytecode.m_dst.offset()); 381 381 } 382 382 … … 384 384 { 385 385 auto bytecode = currentInstruction->as<OpJfalse>(); 386 unsigned target = jumpTarget(currentInstruction, bytecode. target);386 unsigned target = jumpTarget(currentInstruction, bytecode.m_target); 387 387 388 388 GPRReg value = regT0; … … 391 391 bool shouldCheckMasqueradesAsUndefined = true; 392 392 393 emitGetVirtualRegister(bytecode. condition.offset(), value);393 emitGetVirtualRegister(bytecode.m_condition.offset(), value); 394 394 addJump(branchIfFalsey(*vm(), JSValueRegs(value), scratch1, scratch2, fpRegT0, fpRegT1, shouldCheckMasqueradesAsUndefined, m_codeBlock->globalObject()), target); 395 395 } … … 398 398 { 399 399 auto bytecode = currentInstruction->as<OpJeqNull>(); 400 int src = bytecode. value.offset();401 unsigned target = jumpTarget(currentInstruction, bytecode. target);400 int src = bytecode.m_value.offset(); 401 unsigned target = jumpTarget(currentInstruction, bytecode.m_target); 402 402 403 403 emitGetVirtualRegister(src, regT0); … … 422 422 { 423 423 auto bytecode = currentInstruction->as<OpJneqNull>(); 424 int src = bytecode. value.offset();425 unsigned target = jumpTarget(currentInstruction, bytecode. target);424 int src = bytecode.m_value.offset(); 425 unsigned target = jumpTarget(currentInstruction, bytecode.m_target); 426 426 427 427 emitGetVirtualRegister(src, regT0); … … 447 447 auto bytecode = currentInstruction->as<OpJneqPtr>(); 448 448 auto& metadata = bytecode.metadata(m_codeBlock); 449 int src = bytecode. value.offset();450 Special::Pointer ptr = bytecode. specialPointer;451 unsigned target = jumpTarget(currentInstruction, bytecode. target);449 int src = bytecode.m_value.offset(); 450 Special::Pointer ptr = bytecode.m_specialPointer; 451 unsigned target = jumpTarget(currentInstruction, bytecode.m_target); 452 452 453 453 emitGetVirtualRegister(src, regT0); 454 454 CCallHelpers::Jump equal = branchPtr(Equal, regT0, TrustedImmPtr(actualPointerFor(m_codeBlock, ptr))); 455 store8(TrustedImm32(1), &metadata. hasJumped);455 store8(TrustedImm32(1), &metadata.m_hasJumped); 456 456 addJump(jump(), target); 457 457 equal.link(this); … … 461 461 { 462 462 auto bytecode = currentInstruction->as<OpEq>(); 463 emitGetVirtualRegisters(bytecode. lhs.offset(), regT0, bytecode.rhs.offset(), regT1);463 emitGetVirtualRegisters(bytecode.m_lhs.offset(), regT0, bytecode.m_rhs.offset(), regT1); 464 464 emitJumpSlowCaseIfNotInt(regT0, regT1, regT2); 465 465 compare32(Equal, regT1, regT0, regT0); 466 466 boxBoolean(regT0, JSValueRegs { regT0 }); 467 emitPutVirtualRegister(bytecode. dst.offset());467 emitPutVirtualRegister(bytecode.m_dst.offset()); 468 468 } 469 469 … … 471 471 { 472 472 auto bytecode = currentInstruction->as<OpJeq>(); 473 unsigned target = jumpTarget(currentInstruction, bytecode. target);474 emitGetVirtualRegisters(bytecode. lhs.offset(), regT0, bytecode.rhs.offset(), regT1);473 unsigned target = jumpTarget(currentInstruction, bytecode.m_target); 474 emitGetVirtualRegisters(bytecode.m_lhs.offset(), regT0, bytecode.m_rhs.offset(), regT1); 475 475 emitJumpSlowCaseIfNotInt(regT0, regT1, regT2); 476 476 addJump(branch32(Equal, regT0, regT1), target); … … 480 480 { 481 481 auto bytecode = currentInstruction->as<OpJtrue>(); 482 unsigned target = jumpTarget(currentInstruction, bytecode. target);482 unsigned target = jumpTarget(currentInstruction, bytecode.m_target); 483 483 484 484 GPRReg value = regT0; … … 486 486 GPRReg scratch2 = regT2; 487 487 bool shouldCheckMasqueradesAsUndefined = true; 488 emitGetVirtualRegister(bytecode. condition.offset(), value);488 emitGetVirtualRegister(bytecode.m_condition.offset(), value); 489 489 addJump(branchIfTruthy(*vm(), JSValueRegs(value), scratch1, scratch2, fpRegT0, fpRegT1, shouldCheckMasqueradesAsUndefined, m_codeBlock->globalObject()), target); 490 490 } … … 493 493 { 494 494 auto bytecode = currentInstruction->as<OpNeq>(); 495 emitGetVirtualRegisters(bytecode. lhs.offset(), regT0, bytecode.rhs.offset(), regT1);495 emitGetVirtualRegisters(bytecode.m_lhs.offset(), regT0, bytecode.m_rhs.offset(), regT1); 496 496 emitJumpSlowCaseIfNotInt(regT0, regT1, regT2); 497 497 compare32(NotEqual, regT1, regT0, regT0); 498 498 boxBoolean(regT0, JSValueRegs { regT0 }); 499 499 500 emitPutVirtualRegister(bytecode. dst.offset());500 emitPutVirtualRegister(bytecode.m_dst.offset()); 501 501 } 502 502 … … 504 504 { 505 505 auto bytecode = currentInstruction->as<OpJneq>(); 506 unsigned target = jumpTarget(currentInstruction, bytecode. target);507 emitGetVirtualRegisters(bytecode. lhs.offset(), regT0, bytecode.rhs.offset(), regT1);506 unsigned target = jumpTarget(currentInstruction, bytecode.m_target); 507 emitGetVirtualRegisters(bytecode.m_lhs.offset(), regT0, bytecode.m_rhs.offset(), regT1); 508 508 emitJumpSlowCaseIfNotInt(regT0, regT1, regT2); 509 509 addJump(branch32(NotEqual, regT0, regT1), target); … … 515 515 ASSERT(regT0 == returnValueGPR); 516 516 copyCalleeSavesToEntryFrameCalleeSavesBuffer(vm()->topEntryFrame); 517 emitGetVirtualRegister(bytecode. value.offset(), regT0);517 emitGetVirtualRegister(bytecode.m_value.offset(), regT0); 518 518 callOperationNoExceptionCheck(operationThrow, regT0); 519 519 jumpToExceptionHandler(*vm()); … … 524 524 { 525 525 auto bytecode = currentInstruction->as<Op>(); 526 int dst = bytecode. dst.offset();527 int src1 = bytecode. lhs.offset();528 int src2 = bytecode. rhs.offset();526 int dst = bytecode.m_dst.offset(); 527 int src1 = bytecode.m_lhs.offset(); 528 int src2 = bytecode.m_rhs.offset(); 529 529 530 530 emitGetVirtualRegisters(src1, regT0, src2, regT1); … … 567 567 { 568 568 auto bytecode = currentInstruction->as<Op>(); 569 int target = jumpTarget(currentInstruction, bytecode. target);570 int src1 = bytecode. lhs.offset();571 int src2 = bytecode. rhs.offset();569 int target = jumpTarget(currentInstruction, bytecode.m_target); 570 int src1 = bytecode.m_lhs.offset(); 571 int src2 = bytecode.m_rhs.offset(); 572 572 573 573 emitGetVirtualRegisters(src1, regT0, src2, regT1); … … 608 608 609 609 auto bytecode = currentInstruction->as<OpJstricteq>(); 610 unsigned target = jumpTarget(currentInstruction, bytecode. target);610 unsigned target = jumpTarget(currentInstruction, bytecode.m_target); 611 611 callOperation(operationCompareStrictEq, regT0, regT1); 612 612 emitJumpSlowToHot(branchTest32(NonZero, returnValueGPR), target); … … 618 618 619 619 auto bytecode = currentInstruction->as<OpJnstricteq>(); 620 unsigned target = jumpTarget(currentInstruction, bytecode. target);620 unsigned target = jumpTarget(currentInstruction, bytecode.m_target); 621 621 callOperation(operationCompareStrictEq, regT0, regT1); 622 622 emitJumpSlowToHot(branchTest32(Zero, returnValueGPR), target); … … 626 626 { 627 627 auto bytecode = currentInstruction->as<OpToNumber>(); 628 int dstVReg = bytecode. dst.offset();629 int srcVReg = bytecode. operand.offset();628 int dstVReg = bytecode.m_dst.offset(); 629 int srcVReg = bytecode.m_operand.offset(); 630 630 emitGetVirtualRegister(srcVReg, regT0); 631 631 … … 640 640 { 641 641 auto bytecode = currentInstruction->as<OpToString>(); 642 int srcVReg = bytecode. operand.offset();642 int srcVReg = bytecode.m_operand.offset(); 643 643 emitGetVirtualRegister(srcVReg, regT0); 644 644 … … 646 646 addSlowCase(branchIfNotString(regT0)); 647 647 648 emitPutVirtualRegister(bytecode. dst.offset());648 emitPutVirtualRegister(bytecode.m_dst.offset()); 649 649 } 650 650 … … 652 652 { 653 653 auto bytecode = currentInstruction->as<OpToObject>(); 654 int dstVReg = bytecode. dst.offset();655 int srcVReg = bytecode. operand.offset();654 int dstVReg = bytecode.m_dst.offset(); 655 int srcVReg = bytecode.m_operand.offset(); 656 656 emitGetVirtualRegister(srcVReg, regT0); 657 657 … … 684 684 load64(Address(regT3, VM::exceptionOffset()), regT0); 685 685 store64(TrustedImm64(JSValue::encode(JSValue())), Address(regT3, VM::exceptionOffset())); 686 emitPutVirtualRegister(bytecode. exception.offset());686 emitPutVirtualRegister(bytecode.m_exception.offset()); 687 687 688 688 load64(Address(regT0, Exception::valueOffset()), regT0); 689 emitPutVirtualRegister(bytecode. thrownValue.offset());689 emitPutVirtualRegister(bytecode.m_thrownValue.offset()); 690 690 691 691 #if ENABLE(DFG_JIT) … … 695 695 696 696 auto& metadata = bytecode.metadata(m_codeBlock); 697 ValueProfileAndOperandBuffer* buffer = metadata. buffer;697 ValueProfileAndOperandBuffer* buffer = metadata.m_buffer; 698 698 if (buffer || !shouldEmitProfiling()) 699 699 callOperation(operationTryOSREnterAtCatch, m_bytecodeOffset); … … 722 722 { 723 723 auto bytecode = currentInstruction->as<OpGetParentScope>(); 724 int currentScope = bytecode. scope.offset();724 int currentScope = bytecode.m_scope.offset(); 725 725 emitGetVirtualRegister(currentScope, regT0); 726 726 loadPtr(Address(regT0, JSScope::offsetOfNext()), regT0); 727 emitStoreCell(bytecode. dst.offset(), regT0);727 emitStoreCell(bytecode.m_dst.offset(), regT0); 728 728 } 729 729 … … 731 731 { 732 732 auto bytecode = currentInstruction->as<OpSwitchImm>(); 733 size_t tableIndex = bytecode. tableIndex;734 unsigned defaultOffset = jumpTarget(currentInstruction, bytecode. defaultOffset);735 unsigned scrutinee = bytecode. scrutinee.offset();733 size_t tableIndex = bytecode.m_tableIndex; 734 unsigned defaultOffset = jumpTarget(currentInstruction, bytecode.m_defaultOffset); 735 unsigned scrutinee = bytecode.m_scrutinee.offset(); 736 736 737 737 // create jump table for switch destinations, track this switch statement. … … 748 748 { 749 749 auto bytecode = currentInstruction->as<OpSwitchChar>(); 750 size_t tableIndex = bytecode. tableIndex;751 unsigned defaultOffset = jumpTarget(currentInstruction, bytecode. defaultOffset);752 unsigned scrutinee = bytecode. scrutinee.offset();750 size_t tableIndex = bytecode.m_tableIndex; 751 unsigned defaultOffset = jumpTarget(currentInstruction, bytecode.m_defaultOffset); 752 unsigned scrutinee = bytecode.m_scrutinee.offset(); 753 753 754 754 // create jump table for switch destinations, track this switch statement. … … 765 765 { 766 766 auto bytecode = currentInstruction->as<OpSwitchString>(); 767 size_t tableIndex = bytecode. tableIndex;768 unsigned defaultOffset = jumpTarget(currentInstruction, bytecode. defaultOffset);769 unsigned scrutinee = bytecode. scrutinee.offset();767 size_t tableIndex = bytecode.m_tableIndex; 768 unsigned defaultOffset = jumpTarget(currentInstruction, bytecode.m_defaultOffset); 769 unsigned scrutinee = bytecode.m_scrutinee.offset(); 770 770 771 771 // create jump table for switch destinations, track this switch statement. … … 783 783 load32(codeBlock()->debuggerRequestsAddress(), regT0); 784 784 Jump noDebuggerRequests = branchTest32(Zero, regT0); 785 callOperation(operationDebug, static_cast<int>(bytecode. debugHookType));785 callOperation(operationDebug, static_cast<int>(bytecode.m_debugHookType)); 786 786 noDebuggerRequests.link(this); 787 787 } … … 790 790 { 791 791 auto bytecode = currentInstruction->as<OpEqNull>(); 792 int dst = bytecode. dst.offset();793 int src1 = bytecode. operand.offset();792 int dst = bytecode.m_dst.offset(); 793 int src1 = bytecode.m_operand.offset(); 794 794 795 795 emitGetVirtualRegister(src1, regT0); … … 823 823 { 824 824 auto bytecode = currentInstruction->as<OpNeqNull>(); 825 int dst = bytecode. dst.offset();826 int src1 = bytecode. operand.offset();825 int dst = bytecode.m_dst.offset(); 826 int src1 = bytecode.m_operand.offset(); 827 827 828 828 emitGetVirtualRegister(src1, regT0); … … 869 869 { 870 870 auto bytecode = currentInstruction->as<OpGetScope>(); 871 int dst = bytecode. dst.offset();871 int dst = bytecode.m_dst.offset(); 872 872 emitGetFromCallFrameHeaderPtr(CallFrameSlot::callee, regT0); 873 873 loadPtr(Address(regT0, JSFunction::offsetOfScopeChain()), regT0); … … 879 879 auto bytecode = currentInstruction->as<OpToThis>(); 880 880 auto& metadata = bytecode.metadata(m_codeBlock); 881 WriteBarrierBase<Structure>* cachedStructure = &metadata. cachedStructure;882 emitGetVirtualRegister(bytecode. srcDst.offset(), regT1);881 WriteBarrierBase<Structure>* cachedStructure = &metadata.m_cachedStructure; 882 emitGetVirtualRegister(bytecode.m_srcDst.offset(), regT1); 883 883 884 884 emitJumpSlowCaseIfNotJSCell(regT1); … … 895 895 auto bytecode = currentInstruction->as<OpCreateThis>(); 896 896 auto& metadata = bytecode.metadata(m_codeBlock); 897 int callee = bytecode. callee.offset();898 WriteBarrierBase<JSCell>* cachedFunction = &metadata. cachedCallee;897 int callee = bytecode.m_callee.offset(); 898 WriteBarrierBase<JSCell>* cachedFunction = &metadata.m_cachedCallee; 899 899 RegisterID calleeReg = regT0; 900 900 RegisterID rareDataReg = regT4; … … 927 927 emitInitializeInlineStorage(resultReg, scratchReg); 928 928 addSlowCase(slowCases); 929 emitPutVirtualRegister(bytecode. dst.offset());929 emitPutVirtualRegister(bytecode.m_dst.offset()); 930 930 } 931 931 … … 933 933 { 934 934 auto bytecode = currentInstruction->as<OpCheckTdz>(); 935 emitGetVirtualRegister(bytecode. target.offset(), regT0);935 emitGetVirtualRegister(bytecode.m_target.offset(), regT0); 936 936 addSlowCase(branchIfEmpty(regT0)); 937 937 } … … 947 947 callOperation(operationCompareEq, regT0, regT1); 948 948 boxBoolean(returnValueGPR, JSValueRegs { returnValueGPR }); 949 emitPutVirtualRegister(bytecode. dst.offset(), returnValueGPR);949 emitPutVirtualRegister(bytecode.m_dst.offset(), returnValueGPR); 950 950 } 951 951 … … 958 958 xor32(TrustedImm32(0x1), regT0); 959 959 boxBoolean(returnValueGPR, JSValueRegs { returnValueGPR }); 960 emitPutVirtualRegister(bytecode. dst.offset(), returnValueGPR);960 emitPutVirtualRegister(bytecode.m_dst.offset(), returnValueGPR); 961 961 } 962 962 … … 966 966 967 967 auto bytecode = currentInstruction->as<OpJeq>(); 968 unsigned target = jumpTarget(currentInstruction, bytecode. target);968 unsigned target = jumpTarget(currentInstruction, bytecode.m_target); 969 969 callOperation(operationCompareEq, regT0, regT1); 970 970 emitJumpSlowToHot(branchTest32(NonZero, returnValueGPR), target); … … 976 976 977 977 auto bytecode = currentInstruction->as<OpJneq>(); 978 unsigned target = jumpTarget(currentInstruction, bytecode. target);978 unsigned target = jumpTarget(currentInstruction, bytecode.m_target); 979 979 callOperation(operationCompareEq, regT0, regT1); 980 980 emitJumpSlowToHot(branchTest32(Zero, returnValueGPR), target); … … 986 986 987 987 auto bytecode = currentInstruction->as<OpInstanceofCustom>(); 988 int dst = bytecode. dst.offset();989 int value = bytecode. value.offset();990 int constructor = bytecode. constructor.offset();991 int hasInstanceValue = bytecode. hasInstanceValue.offset();988 int dst = bytecode.m_dst.offset(); 989 int value = bytecode.m_value.offset(); 990 int constructor = bytecode.m_constructor.offset(); 991 int hasInstanceValue = bytecode.m_hasInstanceValue.offset(); 992 992 993 993 emitGetVirtualRegister(value, regT0); … … 1066 1066 { 1067 1067 auto bytecode = currentInstruction->as<OpNewRegexp>(); 1068 int dst = bytecode. dst.offset();1069 int regexp = bytecode. regexp.offset();1068 int dst = bytecode.m_dst.offset(); 1069 int regexp = bytecode.m_regexp.offset(); 1070 1070 callOperation(operationNewRegexp, jsCast<RegExp*>(m_codeBlock->getConstant(regexp))); 1071 1071 emitStoreCell(dst, returnValueGPR); … … 1077 1077 Jump lazyJump; 1078 1078 auto bytecode = currentInstruction->as<Op>(); 1079 int dst = bytecode. dst.offset();1079 int dst = bytecode.m_dst.offset(); 1080 1080 1081 1081 #if USE(JSVALUE64) 1082 emitGetVirtualRegister(bytecode. scope.offset(), regT0);1082 emitGetVirtualRegister(bytecode.m_scope.offset(), regT0); 1083 1083 #else 1084 emitLoadPayload(bytecode. scope.offset(), regT0);1084 emitLoadPayload(bytecode.m_scope.offset(), regT0); 1085 1085 #endif 1086 FunctionExecutable* funcExec = m_codeBlock->functionDecl(bytecode. functionDecl);1086 FunctionExecutable* funcExec = m_codeBlock->functionDecl(bytecode.m_functionDecl); 1087 1087 1088 1088 OpcodeID opcodeID = Op::opcodeID; … … 1123 1123 { 1124 1124 auto bytecode = currentInstruction->as<Op>(); 1125 int dst = bytecode. dst.offset();1125 int dst = bytecode.m_dst.offset(); 1126 1126 #if USE(JSVALUE64) 1127 emitGetVirtualRegister(bytecode. scope.offset(), regT0);1127 emitGetVirtualRegister(bytecode.m_scope.offset(), regT0); 1128 1128 #else 1129 emitLoadPayload(bytecode. scope.offset(), regT0);1129 emitLoadPayload(bytecode.m_scope.offset(), regT0); 1130 1130 #endif 1131 1131 1132 FunctionExecutable* function = m_codeBlock->functionExpr(bytecode. functionDecl);1132 FunctionExecutable* function = m_codeBlock->functionExpr(bytecode.m_functionDecl); 1133 1133 OpcodeID opcodeID = Op::opcodeID; 1134 1134 … … 1169 1169 auto bytecode = currentInstruction->as<OpNewArray>(); 1170 1170 auto& metadata = bytecode.metadata(m_codeBlock); 1171 int dst = bytecode. dst.offset();1172 int valuesIndex = bytecode. argv.offset();1173 int size = bytecode. argc;1171 int dst = bytecode.m_dst.offset(); 1172 int valuesIndex = bytecode.m_argv.offset(); 1173 int size = bytecode.m_argc; 1174 1174 addPtr(TrustedImm32(valuesIndex * sizeof(Register)), callFrameRegister, regT0); 1175 1175 callOperation(operationNewArrayWithProfile, dst, 1176 &metadata. arrayAllocationProfile, regT0, size);1176 &metadata.m_arrayAllocationProfile, regT0, size); 1177 1177 } 1178 1178 … … 1181 1181 auto bytecode = currentInstruction->as<OpNewArrayWithSize>(); 1182 1182 auto& metadata = bytecode.metadata(m_codeBlock); 1183 int dst = bytecode. dst.offset();1184 int sizeIndex = bytecode. length.offset();1183 int dst = bytecode.m_dst.offset(); 1184 int sizeIndex = bytecode.m_length.offset(); 1185 1185 #if USE(JSVALUE64) 1186 1186 emitGetVirtualRegister(sizeIndex, regT0); 1187 1187 callOperation(operationNewArrayWithSizeAndProfile, dst, 1188 &metadata. arrayAllocationProfile, regT0);1188 &metadata.m_arrayAllocationProfile, regT0); 1189 1189 #else 1190 1190 emitLoad(sizeIndex, regT1, regT0); 1191 1191 callOperation(operationNewArrayWithSizeAndProfile, dst, 1192 &metadata. arrayAllocationProfile, JSValueRegs(regT1, regT0));1192 &metadata.m_arrayAllocationProfile, JSValueRegs(regT1, regT0)); 1193 1193 #endif 1194 1194 } … … 1198 1198 { 1199 1199 auto bytecode = currentInstruction->as<OpHasStructureProperty>(); 1200 int dst = bytecode. dst.offset();1201 int base = bytecode. base.offset();1202 int enumerator = bytecode. enumerator.offset();1200 int dst = bytecode.m_dst.offset(); 1201 int base = bytecode.m_base.offset(); 1202 int enumerator = bytecode.m_enumerator.offset(); 1203 1203 1204 1204 emitGetVirtualRegister(base, regT0); … … 1244 1244 auto bytecode = currentInstruction->as<OpHasIndexedProperty>(); 1245 1245 auto& metadata = bytecode.metadata(m_codeBlock); 1246 int dst = bytecode. dst.offset();1247 int base = bytecode. base.offset();1248 int property = bytecode. property.offset();1249 ArrayProfile* profile = &metadata. arrayProfile;1246 int dst = bytecode.m_dst.offset(); 1247 int base = bytecode.m_base.offset(); 1248 int property = bytecode.m_property.offset(); 1249 ArrayProfile* profile = &metadata.m_arrayProfile; 1250 1250 ByValInfo* byValInfo = m_codeBlock->addByValInfo(); 1251 1251 … … 1290 1290 1291 1291 auto bytecode = currentInstruction->as<OpHasIndexedProperty>(); 1292 int dst = bytecode. dst.offset();1293 int base = bytecode. base.offset();1294 int property = bytecode. property.offset();1292 int dst = bytecode.m_dst.offset(); 1293 int base = bytecode.m_base.offset(); 1294 int property = bytecode.m_property.offset(); 1295 1295 ByValInfo* byValInfo = m_byValCompilationInfo[m_byValInstructionIndex].byValInfo; 1296 1296 … … 1309 1309 { 1310 1310 auto bytecode = currentInstruction->as<OpGetDirectPname>(); 1311 int dst = bytecode. dst.offset();1312 int base = bytecode. base.offset();1313 int index = bytecode. index.offset();1314 int enumerator = bytecode. enumerator.offset();1311 int dst = bytecode.m_dst.offset(); 1312 int base = bytecode.m_base.offset(); 1313 int index = bytecode.m_index.offset(); 1314 int enumerator = bytecode.m_enumerator.offset(); 1315 1315 1316 1316 // Check that base is a cell … … 1350 1350 { 1351 1351 auto bytecode = currentInstruction->as<OpEnumeratorStructurePname>(); 1352 int dst = bytecode. dst.offset();1353 int enumerator = bytecode. enumerator.offset();1354 int index = bytecode. index.offset();1352 int dst = bytecode.m_dst.offset(); 1353 int enumerator = bytecode.m_enumerator.offset(); 1354 int index = bytecode.m_index.offset(); 1355 1355 1356 1356 emitGetVirtualRegister(index, regT0); … … 1374 1374 { 1375 1375 auto bytecode = currentInstruction->as<OpEnumeratorGenericPname>(); 1376 int dst = bytecode. dst.offset();1377 int enumerator = bytecode. enumerator.offset();1378 int index = bytecode. index.offset();1376 int dst = bytecode.m_dst.offset(); 1377 int enumerator = bytecode.m_enumerator.offset(); 1378 int index = bytecode.m_index.offset(); 1379 1379 1380 1380 emitGetVirtualRegister(index, regT0); … … 1399 1399 auto bytecode = currentInstruction->as<OpProfileType>(); 1400 1400 auto& metadata = bytecode.metadata(m_codeBlock); 1401 TypeLocation* cachedTypeLocation = metadata. typeLocation;1402 int valueToProfile = bytecode. target.offset();1401 TypeLocation* cachedTypeLocation = metadata.m_typeLocation; 1402 int valueToProfile = bytecode.m_target.offset(); 1403 1403 1404 1404 emitGetVirtualRegister(valueToProfile, regT0); … … 1468 1468 GPRReg scratch2Reg = regT2; 1469 1469 ensureShadowChickenPacket(*vm(), shadowPacketReg, scratch1Reg, scratch2Reg); 1470 emitGetVirtualRegister(bytecode. scope.offset(), regT3);1470 emitGetVirtualRegister(bytecode.m_scope.offset(), regT3); 1471 1471 logShadowChickenProloguePacket(shadowPacketReg, scratch1Reg, regT3); 1472 1472 } … … 1481 1481 GPRReg scratch2Reg = regT2; 1482 1482 ensureShadowChickenPacket(*vm(), shadowPacketReg, scratch1Reg, scratch2Reg); 1483 emitGetVirtualRegister(bytecode. thisValue.offset(), regT2);1484 emitGetVirtualRegister(bytecode. scope.offset(), regT3);1483 emitGetVirtualRegister(bytecode.m_thisValue.offset(), regT2); 1484 emitGetVirtualRegister(bytecode.m_scope.offset(), regT3); 1485 1485 logShadowChickenTailPacket(shadowPacketReg, JSValueRegs(regT2), regT3, m_codeBlock, CallSiteIndex(m_bytecodeOffset)); 1486 1486 } … … 1492 1492 auto bytecode = currentInstruction->as<OpProfileControlFlow>(); 1493 1493 auto& metadata = bytecode.metadata(m_codeBlock); 1494 BasicBlockLocation* basicBlockLocation = metadata. basicBlockLocation;1494 BasicBlockLocation* basicBlockLocation = metadata.m_basicBlockLocation; 1495 1495 #if USE(JSVALUE64) 1496 1496 basicBlockLocation->emitExecuteCode(*this); … … 1503 1503 { 1504 1504 auto bytecode = currentInstruction->as<OpArgumentCount>(); 1505 int dst = bytecode. dst.offset();1505 int dst = bytecode.m_dst.offset(); 1506 1506 load32(payloadFor(CallFrameSlot::argumentCount), regT0); 1507 1507 sub32(TrustedImm32(1), regT0); … … 1514 1514 { 1515 1515 auto bytecode = currentInstruction->as<OpGetRestLength>(); 1516 int dst = bytecode. dst.offset();1517 unsigned numParamsToSkip = bytecode. numParametersToSkip;1516 int dst = bytecode.m_dst.offset(); 1517 unsigned numParamsToSkip = bytecode.m_numParametersToSkip; 1518 1518 load32(payloadFor(CallFrameSlot::argumentCount), regT0); 1519 1519 sub32(TrustedImm32(1), regT0); … … 1544 1544 { 1545 1545 auto bytecode = currentInstruction->as<OpGetArgument>(); 1546 int dst = bytecode. dst.offset();1547 int index = bytecode. index;1546 int dst = bytecode.m_dst.offset(); 1547 int index = bytecode.m_index; 1548 1548 #if USE(JSVALUE64) 1549 1549 JSValueRegs resultRegs(regT0); -
trunk/Source/JavaScriptCore/jit/JITOpcodes32_64.cpp
r239761 r240041 1 1 /* 2 * Copyright (C) 2009-201 8Apple Inc. All rights reserved.2 * Copyright (C) 2009-2019 Apple Inc. All rights reserved. 3 3 * Copyright (C) 2010 Patrick Gansterer <paroga@paroga.com> 4 4 * … … 51 51 { 52 52 auto bytecode = currentInstruction->as<OpMov>(); 53 int dst = bytecode. dst.offset();54 int src = bytecode. src.offset();53 int dst = bytecode.m_dst.offset(); 54 int src = bytecode.m_src.offset(); 55 55 56 56 if (m_codeBlock->isConstantRegisterIndex(src)) … … 66 66 ASSERT(returnValueGPR != callFrameRegister); 67 67 auto bytecode = currentInstruction->as<OpEnd>(); 68 emitLoad(bytecode. value.offset(), regT1, returnValueGPR);68 emitLoad(bytecode.m_value.offset(), regT1, returnValueGPR); 69 69 emitRestoreCalleeSaves(); 70 70 emitFunctionEpilogue(); … … 75 75 { 76 76 auto bytecode = currentInstruction->as<OpJmp>(); 77 unsigned target = jumpTarget(currentInstruction, bytecode. target);77 unsigned target = jumpTarget(currentInstruction, bytecode.m_target); 78 78 addJump(jump(), target); 79 79 } … … 83 83 auto bytecode = currentInstruction->as<OpNewObject>(); 84 84 auto& metadata = bytecode.metadata(m_codeBlock); 85 Structure* structure = metadata. objectAllocationProfile.structure();85 Structure* structure = metadata.m_objectAllocationProfile.structure(); 86 86 size_t allocationSize = JSFinalObject::allocationSize(structure->inlineCapacity()); 87 87 Allocator allocator = subspaceFor<JSFinalObject>(*m_vm)->allocatorForNonVirtual(allocationSize, AllocatorForMode::AllocatorIfExists); … … 99 99 emitInitializeInlineStorage(resultReg, structure->inlineCapacity()); 100 100 addSlowCase(slowCases); 101 emitStoreCell(bytecode. dst.offset(), resultReg);101 emitStoreCell(bytecode.m_dst.offset(), resultReg); 102 102 } 103 103 } … … 109 109 auto bytecode = currentInstruction->as<OpNewObject>(); 110 110 auto& metadata = bytecode.metadata(m_codeBlock); 111 int dst = bytecode. dst.offset();112 Structure* structure = metadata. objectAllocationProfile.structure();111 int dst = bytecode.m_dst.offset(); 112 Structure* structure = metadata.m_objectAllocationProfile.structure(); 113 113 callOperation(operationNewObject, structure); 114 114 emitStoreCell(dst, returnValueGPR); … … 118 118 { 119 119 auto bytecode = currentInstruction->as<OpOverridesHasInstance>(); 120 int dst = bytecode. dst.offset();121 int constructor = bytecode. constructor.offset();122 int hasInstanceValue = bytecode. hasInstanceValue.offset();120 int dst = bytecode.m_dst.offset(); 121 int constructor = bytecode.m_constructor.offset(); 122 int hasInstanceValue = bytecode.m_hasInstanceValue.offset(); 123 123 124 124 emitLoadPayload(hasInstanceValue, regT0); … … 146 146 { 147 147 auto bytecode = currentInstruction->as<OpInstanceof>(); 148 int dst = bytecode. dst.offset();149 int value = bytecode. value.offset();150 int proto = bytecode. prototype.offset();148 int dst = bytecode.m_dst.offset(); 149 int value = bytecode.m_value.offset(); 150 int proto = bytecode.m_prototype.offset(); 151 151 152 152 // Load the operands into registers. … … 183 183 184 184 auto bytecode = currentInstruction->as<OpInstanceof>(); 185 int dst = bytecode. dst.offset();186 int value = bytecode. value.offset();187 int proto = bytecode. prototype.offset();185 int dst = bytecode.m_dst.offset(); 186 int value = bytecode.m_value.offset(); 187 int proto = bytecode.m_prototype.offset(); 188 188 189 189 JITInstanceOfGenerator& gen = m_instanceOfs[m_instanceOfIndex++]; … … 201 201 202 202 auto bytecode = currentInstruction->as<OpInstanceofCustom>(); 203 int dst = bytecode. dst.offset();204 int value = bytecode. value.offset();205 int constructor = bytecode. constructor.offset();206 int hasInstanceValue = bytecode. hasInstanceValue.offset();203 int dst = bytecode.m_dst.offset(); 204 int value = bytecode.m_value.offset(); 205 int constructor = bytecode.m_constructor.offset(); 206 int hasInstanceValue = bytecode.m_hasInstanceValue.offset(); 207 207 208 208 emitLoad(value, regT1, regT0); … … 216 216 { 217 217 auto bytecode = currentInstruction->as<OpIsEmpty>(); 218 int dst = bytecode. dst.offset();219 int value = bytecode. operand.offset();218 int dst = bytecode.m_dst.offset(); 219 int value = bytecode.m_operand.offset(); 220 220 221 221 emitLoad(value, regT1, regT0); … … 228 228 { 229 229 auto bytecode = currentInstruction->as<OpIsUndefined>(); 230 int dst = bytecode. dst.offset();231 int value = bytecode. operand.offset();230 int dst = bytecode.m_dst.offset(); 231 int value = bytecode.m_operand.offset(); 232 232 233 233 emitLoad(value, regT1, regT0); … … 256 256 { 257 257 auto bytecode = currentInstruction->as<OpIsUndefinedOrNull>(); 258 int dst = bytecode. dst.offset();259 int value = bytecode. operand.offset();258 int dst = bytecode.m_dst.offset(); 259 int value = bytecode.m_operand.offset(); 260 260 261 261 emitLoadTag(value, regT0); … … 269 269 { 270 270 auto bytecode = currentInstruction->as<OpIsBoolean>(); 271 int dst = bytecode. dst.offset();272 int value = bytecode. operand.offset();271 int dst = bytecode.m_dst.offset(); 272 int value = bytecode.m_operand.offset(); 273 273 274 274 emitLoadTag(value, regT0); … … 280 280 { 281 281 auto bytecode = currentInstruction->as<OpIsNumber>(); 282 int dst = bytecode. dst.offset();283 int value = bytecode. operand.offset();282 int dst = bytecode.m_dst.offset(); 283 int value = bytecode.m_operand.offset(); 284 284 285 285 emitLoadTag(value, regT0); … … 292 292 { 293 293 auto bytecode = currentInstruction->as<OpIsCellWithType>(); 294 int dst = bytecode. dst.offset();295 int value = bytecode. operand.offset();296 int type = bytecode. type;294 int dst = bytecode.m_dst.offset(); 295 int value = bytecode.m_operand.offset(); 296 int type = bytecode.m_type; 297 297 298 298 emitLoad(value, regT1, regT0); … … 312 312 { 313 313 auto bytecode = currentInstruction->as<OpIsObject>(); 314 int dst = bytecode. dst.offset();315 int value = bytecode. operand.offset();314 int dst = bytecode.m_dst.offset(); 315 int value = bytecode.m_operand.offset(); 316 316 317 317 emitLoad(value, regT1, regT0); … … 331 331 { 332 332 auto bytecode = currentInstruction->as<OpToPrimitive>(); 333 int dst = bytecode. dst.offset();334 int src = bytecode. src.offset();333 int dst = bytecode.m_dst.offset(); 334 int src = bytecode.m_src.offset(); 335 335 336 336 emitLoad(src, regT1, regT0); … … 347 347 { 348 348 auto bytecode = currentInstruction->as<OpSetFunctionName>(); 349 int func = bytecode. function.offset();350 int name = bytecode. name.offset();349 int func = bytecode.m_function.offset(); 350 int name = bytecode.m_name.offset(); 351 351 emitLoadPayload(func, regT1); 352 352 emitLoad(name, regT3, regT2); … … 357 357 { 358 358 auto bytecode = currentInstruction->as<OpNot>(); 359 int dst = bytecode. dst.offset();360 int src = bytecode. operand.offset();359 int dst = bytecode.m_dst.offset(); 360 int src = bytecode.m_operand.offset(); 361 361 362 362 emitLoadTag(src, regT0); … … 372 372 { 373 373 auto bytecode = currentInstruction->as<OpJfalse>(); 374 int cond = bytecode. condition.offset();375 unsigned target = jumpTarget(currentInstruction, bytecode. target);374 int cond = bytecode.m_condition.offset(); 375 unsigned target = jumpTarget(currentInstruction, bytecode.m_target); 376 376 377 377 emitLoad(cond, regT1, regT0); … … 387 387 { 388 388 auto bytecode = currentInstruction->as<OpJtrue>(); 389 int cond = bytecode. condition.offset();390 unsigned target = jumpTarget(currentInstruction, bytecode. target);389 int cond = bytecode.m_condition.offset(); 390 unsigned target = jumpTarget(currentInstruction, bytecode.m_target); 391 391 392 392 emitLoad(cond, regT1, regT0); … … 401 401 { 402 402 auto bytecode = currentInstruction->as<OpJeqNull>(); 403 int src = bytecode. value.offset();404 unsigned target = jumpTarget(currentInstruction, bytecode. target);403 int src = bytecode.m_value.offset(); 404 unsigned target = jumpTarget(currentInstruction, bytecode.m_target); 405 405 406 406 emitLoad(src, regT1, regT0); … … 427 427 { 428 428 auto bytecode = currentInstruction->as<OpJneqNull>(); 429 int src = bytecode. value.offset();430 unsigned target = jumpTarget(currentInstruction, bytecode. target);429 int src = bytecode.m_value.offset(); 430 unsigned target = jumpTarget(currentInstruction, bytecode.m_target); 431 431 432 432 emitLoad(src, regT1, regT0); … … 454 454 auto bytecode = currentInstruction->as<OpJneqPtr>(); 455 455 auto& metadata = bytecode.metadata(m_codeBlock); 456 int src = bytecode. value.offset();457 Special::Pointer ptr = bytecode. specialPointer;458 unsigned target = jumpTarget(currentInstruction, bytecode. target);456 int src = bytecode.m_value.offset(); 457 Special::Pointer ptr = bytecode.m_specialPointer; 458 unsigned target = jumpTarget(currentInstruction, bytecode.m_target); 459 459 460 460 emitLoad(src, regT1, regT0); … … 462 462 Jump equal = branchPtr(Equal, regT0, TrustedImmPtr(actualPointerFor(m_codeBlock, ptr))); 463 463 notCell.link(this); 464 store8(TrustedImm32(1), &metadata. hasJumped);464 store8(TrustedImm32(1), &metadata.m_hasJumped); 465 465 addJump(jump(), target); 466 466 equal.link(this); … … 471 471 auto bytecode = currentInstruction->as<OpEq>(); 472 472 473 int dst = bytecode. dst.offset();474 int src1 = bytecode. lhs.offset();475 int src2 = bytecode. rhs.offset();473 int dst = bytecode.m_dst.offset(); 474 int src1 = bytecode.m_lhs.offset(); 475 int src2 = bytecode.m_rhs.offset(); 476 476 477 477 emitLoad2(src1, regT1, regT0, src2, regT3, regT2); … … 488 488 { 489 489 auto bytecode = currentInstruction->as<OpEq>(); 490 int dst = bytecode. dst.offset();490 int dst = bytecode.m_dst.offset(); 491 491 492 492 JumpList storeResult; … … 515 515 { 516 516 auto bytecode = currentInstruction->as<OpJeq>(); 517 unsigned target = jumpTarget(currentInstruction, bytecode. target);518 int src1 = bytecode. lhs.offset();519 int src2 = bytecode. rhs.offset();517 unsigned target = jumpTarget(currentInstruction, bytecode.m_target); 518 int src1 = bytecode.m_lhs.offset(); 519 int src2 = bytecode.m_rhs.offset(); 520 520 521 521 emitLoad2(src1, regT1, regT0, src2, regT3, regT2); … … 555 555 { 556 556 auto bytecode = currentInstruction->as<OpJeq>(); 557 unsigned target = jumpTarget(currentInstruction, bytecode. target);557 unsigned target = jumpTarget(currentInstruction, bytecode.m_target); 558 558 compileOpEqJumpSlow(iter, CompileOpEqType::Eq, target); 559 559 } … … 562 562 { 563 563 auto bytecode = currentInstruction->as<OpNeq>(); 564 int dst = bytecode. dst.offset();565 int src1 = bytecode. lhs.offset();566 int src2 = bytecode. rhs.offset();564 int dst = bytecode.m_dst.offset(); 565 int src1 = bytecode.m_lhs.offset(); 566 int src2 = bytecode.m_rhs.offset(); 567 567 568 568 emitLoad2(src1, regT1, regT0, src2, regT3, regT2); … … 579 579 { 580 580 auto bytecode = currentInstruction->as<OpNeq>(); 581 int dst = bytecode. dst.offset();581 int dst = bytecode.m_dst.offset(); 582 582 583 583 JumpList storeResult; … … 607 607 { 608 608 auto bytecode = currentInstruction->as<OpJneq>(); 609 unsigned target = jumpTarget(currentInstruction, bytecode. target);610 int src1 = bytecode. lhs.offset();611 int src2 = bytecode. rhs.offset();609 unsigned target = jumpTarget(currentInstruction, bytecode.m_target); 610 int src1 = bytecode.m_lhs.offset(); 611 int src2 = bytecode.m_rhs.offset(); 612 612 613 613 emitLoad2(src1, regT1, regT0, src2, regT3, regT2); … … 622 622 { 623 623 auto bytecode = currentInstruction->as<OpJneq>(); 624 unsigned target = jumpTarget(currentInstruction, bytecode. target);624 unsigned target = jumpTarget(currentInstruction, bytecode.m_target); 625 625 compileOpEqJumpSlow(iter, CompileOpEqType::NEq, target); 626 626 } … … 630 630 { 631 631 auto bytecode = currentInstruction->as<Op>(); 632 int dst = bytecode. dst.offset();633 int src1 = bytecode. lhs.offset();634 int src2 = bytecode. rhs.offset();632 int dst = bytecode.m_dst.offset(); 633 int src1 = bytecode.m_lhs.offset(); 634 int src2 = bytecode.m_rhs.offset(); 635 635 636 636 emitLoad2(src1, regT1, regT0, src2, regT3, regT2); … … 670 670 { 671 671 auto bytecode = currentInstruction->as<Op>(); 672 int target = jumpTarget(currentInstruction, bytecode. target);673 int src1 = bytecode. lhs.offset();674 int src2 = bytecode. rhs.offset();672 int target = jumpTarget(currentInstruction, bytecode.m_target); 673 int src1 = bytecode.m_lhs.offset(); 674 int src2 = bytecode.m_rhs.offset(); 675 675 676 676 emitLoad2(src1, regT1, regT0, src2, regT3, regT2); … … 709 709 710 710 auto bytecode = currentInstruction->as<OpJstricteq>(); 711 unsigned target = jumpTarget(currentInstruction, bytecode. target);711 unsigned target = jumpTarget(currentInstruction, bytecode.m_target); 712 712 callOperation(operationCompareStrictEq, JSValueRegs(regT1, regT0), JSValueRegs(regT3, regT2)); 713 713 emitJumpSlowToHot(branchTest32(NonZero, returnValueGPR), target); … … 719 719 720 720 auto bytecode = currentInstruction->as<OpJnstricteq>(); 721 unsigned target = jumpTarget(currentInstruction, bytecode. target);721 unsigned target = jumpTarget(currentInstruction, bytecode.m_target); 722 722 callOperation(operationCompareStrictEq, JSValueRegs(regT1, regT0), JSValueRegs(regT3, regT2)); 723 723 emitJumpSlowToHot(branchTest32(Zero, returnValueGPR), target); … … 727 727 { 728 728 auto bytecode = currentInstruction->as<OpEqNull>(); 729 int dst = bytecode. dst.offset();730 int src = bytecode. operand.offset();729 int dst = bytecode.m_dst.offset(); 730 int src = bytecode.m_operand.offset(); 731 731 732 732 emitLoad(src, regT1, regT0); … … 759 759 { 760 760 auto bytecode = currentInstruction->as<OpNeqNull>(); 761 int dst = bytecode. dst.offset();762 int src = bytecode. operand.offset();761 int dst = bytecode.m_dst.offset(); 762 int src = bytecode.m_operand.offset(); 763 763 764 764 emitLoad(src, regT1, regT0); … … 793 793 ASSERT(regT0 == returnValueGPR); 794 794 copyCalleeSavesToEntryFrameCalleeSavesBuffer(vm()->topEntryFrame); 795 emitLoad(bytecode. value.offset(), regT1, regT0);795 emitLoad(bytecode.m_value.offset(), regT1, regT0); 796 796 callOperationNoExceptionCheck(operationThrow, JSValueRegs(regT1, regT0)); 797 797 jumpToExceptionHandler(*vm()); … … 801 801 { 802 802 auto bytecode = currentInstruction->as<OpToNumber>(); 803 int dst = bytecode. dst.offset();804 int src = bytecode. operand.offset();803 int dst = bytecode.m_dst.offset(); 804 int src = bytecode.m_operand.offset(); 805 805 806 806 emitLoad(src, regT1, regT0); … … 818 818 { 819 819 auto bytecode = currentInstruction->as<OpToString>(); 820 int dst = bytecode. dst.offset();821 int src = bytecode. operand.offset();820 int dst = bytecode.m_dst.offset(); 821 int src = bytecode.m_operand.offset(); 822 822 823 823 emitLoad(src, regT1, regT0); … … 833 833 { 834 834 auto bytecode = currentInstruction->as<OpToObject>(); 835 int dst = bytecode. dst.offset();836 int src = bytecode. operand.offset();835 int dst = bytecode.m_dst.offset(); 836 int src = bytecode.m_operand.offset(); 837 837 838 838 emitLoad(src, regT1, regT0); … … 872 872 store32(TrustedImm32(0), Address(regT3, VM::exceptionOffset())); 873 873 874 unsigned exception = bytecode. exception.offset();874 unsigned exception = bytecode.m_exception.offset(); 875 875 emitStore(exception, regT1, regT2); 876 876 … … 878 878 load32(Address(regT2, Exception::valueOffset() + OBJECT_OFFSETOF(JSValue, u.asBits.tag)), regT1); 879 879 880 unsigned thrownValue = bytecode. thrownValue.offset();880 unsigned thrownValue = bytecode.m_thrownValue.offset(); 881 881 emitStore(thrownValue, regT1, regT0); 882 882 … … 887 887 888 888 auto& metadata = bytecode.metadata(m_codeBlock); 889 ValueProfileAndOperandBuffer* buffer = metadata. buffer;889 ValueProfileAndOperandBuffer* buffer = metadata.m_buffer; 890 890 if (buffer || !shouldEmitProfiling()) 891 891 callOperation(operationTryOSREnterAtCatch, m_bytecodeOffset); … … 914 914 { 915 915 auto bytecode = currentInstruction->as<OpGetParentScope>(); 916 int currentScope = bytecode. scope.offset();916 int currentScope = bytecode.m_scope.offset(); 917 917 emitLoadPayload(currentScope, regT0); 918 918 loadPtr(Address(regT0, JSScope::offsetOfNext()), regT0); 919 emitStoreCell(bytecode. dst.offset(), regT0);919 emitStoreCell(bytecode.m_dst.offset(), regT0); 920 920 } 921 921 … … 923 923 { 924 924 auto bytecode = currentInstruction->as<OpSwitchImm>(); 925 size_t tableIndex = bytecode. tableIndex;926 unsigned defaultOffset = jumpTarget(currentInstruction, bytecode. defaultOffset);927 unsigned scrutinee = bytecode. scrutinee.offset();925 size_t tableIndex = bytecode.m_tableIndex; 926 unsigned defaultOffset = jumpTarget(currentInstruction, bytecode.m_defaultOffset); 927 unsigned scrutinee = bytecode.m_scrutinee.offset(); 928 928 929 929 // create jump table for switch destinations, track this switch statement. … … 940 940 { 941 941 auto bytecode = currentInstruction->as<OpSwitchChar>(); 942 size_t tableIndex = bytecode. tableIndex;943 unsigned defaultOffset = jumpTarget(currentInstruction, bytecode. defaultOffset);944 unsigned scrutinee = bytecode. scrutinee.offset();942 size_t tableIndex = bytecode.m_tableIndex; 943 unsigned defaultOffset = jumpTarget(currentInstruction, bytecode.m_defaultOffset); 944 unsigned scrutinee = bytecode.m_scrutinee.offset(); 945 945 946 946 // create jump table for switch destinations, track this switch statement. … … 957 957 { 958 958 auto bytecode = currentInstruction->as<OpSwitchString>(); 959 size_t tableIndex = bytecode. tableIndex;960 unsigned defaultOffset = jumpTarget(currentInstruction, bytecode. defaultOffset);961 unsigned scrutinee = bytecode. scrutinee.offset();959 size_t tableIndex = bytecode.m_tableIndex; 960 unsigned defaultOffset = jumpTarget(currentInstruction, bytecode.m_defaultOffset); 961 unsigned scrutinee = bytecode.m_scrutinee.offset(); 962 962 963 963 // create jump table for switch destinations, track this switch statement. … … 975 975 load32(codeBlock()->debuggerRequestsAddress(), regT0); 976 976 Jump noDebuggerRequests = branchTest32(Zero, regT0); 977 callOperation(operationDebug, static_cast<int>(bytecode. debugHookType));977 callOperation(operationDebug, static_cast<int>(bytecode.m_debugHookType)); 978 978 noDebuggerRequests.link(this); 979 979 } … … 997 997 { 998 998 auto bytecode = currentInstruction->as<OpGetScope>(); 999 int dst = bytecode. dst.offset();999 int dst = bytecode.m_dst.offset(); 1000 1000 emitGetFromCallFrameHeaderPtr(CallFrameSlot::callee, regT0); 1001 1001 loadPtr(Address(regT0, JSFunction::offsetOfScopeChain()), regT0); … … 1007 1007 auto bytecode = currentInstruction->as<OpCreateThis>(); 1008 1008 auto& metadata = bytecode.metadata(m_codeBlock); 1009 int callee = bytecode. callee.offset();1010 WriteBarrierBase<JSCell>* cachedFunction = &metadata. cachedCallee;1009 int callee = bytecode.m_callee.offset(); 1010 WriteBarrierBase<JSCell>* cachedFunction = &metadata.m_cachedCallee; 1011 1011 RegisterID calleeReg = regT0; 1012 1012 RegisterID rareDataReg = regT4; … … 1037 1037 emitInitializeInlineStorage(resultReg, scratchReg); 1038 1038 addSlowCase(slowCases); 1039 emitStoreCell(bytecode. dst.offset(), resultReg);1039 emitStoreCell(bytecode.m_dst.offset(), resultReg); 1040 1040 } 1041 1041 … … 1044 1044 auto bytecode = currentInstruction->as<OpToThis>(); 1045 1045 auto& metadata = bytecode.metadata(m_codeBlock); 1046 WriteBarrierBase<Structure>* cachedStructure = &metadata. cachedStructure;1047 int thisRegister = bytecode. srcDst.offset();1046 WriteBarrierBase<Structure>* cachedStructure = &metadata.m_cachedStructure; 1047 int thisRegister = bytecode.m_srcDst.offset(); 1048 1048 1049 1049 emitLoad(thisRegister, regT3, regT2); … … 1059 1059 { 1060 1060 auto bytecode = currentInstruction->as<OpCheckTdz>(); 1061 emitLoadTag(bytecode. target.offset(), regT0);1061 emitLoadTag(bytecode.m_target.offset(), regT0); 1062 1062 addSlowCase(branchIfEmpty(regT0)); 1063 1063 } … … 1066 1066 { 1067 1067 auto bytecode = currentInstruction->as<OpHasStructureProperty>(); 1068 int dst = bytecode. dst.offset();1069 int base = bytecode. base.offset();1070 int enumerator = bytecode. enumerator.offset();1068 int dst = bytecode.m_dst.offset(); 1069 int base = bytecode.m_base.offset(); 1070 int enumerator = bytecode.m_enumerator.offset(); 1071 1071 1072 1072 emitLoadPayload(base, regT0); … … 1113 1113 auto bytecode = currentInstruction->as<OpHasIndexedProperty>(); 1114 1114 auto& metadata = bytecode.metadata(m_codeBlock); 1115 int dst = bytecode. dst.offset();1116 int base = bytecode. base.offset();1117 int property = bytecode. property.offset();1118 ArrayProfile* profile = &metadata. arrayProfile;1115 int dst = bytecode.m_dst.offset(); 1116 int base = bytecode.m_base.offset(); 1117 int property = bytecode.m_property.offset(); 1118 ArrayProfile* profile = &metadata.m_arrayProfile; 1119 1119 ByValInfo* byValInfo = m_codeBlock->addByValInfo(); 1120 1120 … … 1160 1160 1161 1161 auto bytecode = currentInstruction->as<OpHasIndexedProperty>(); 1162 int dst = bytecode. dst.offset();1163 int base = bytecode. base.offset();1164 int property = bytecode. property.offset();1162 int dst = bytecode.m_dst.offset(); 1163 int base = bytecode.m_base.offset(); 1164 int property = bytecode.m_property.offset(); 1165 1165 ByValInfo* byValInfo = m_byValCompilationInfo[m_byValInstructionIndex].byValInfo; 1166 1166 … … 1179 1179 { 1180 1180 auto bytecode = currentInstruction->as<OpGetDirectPname>(); 1181 int dst = bytecode. dst.offset();1182 int base = bytecode. base.offset();1183 int index = bytecode. index.offset();1184 int enumerator = bytecode. enumerator.offset();1181 int dst = bytecode.m_dst.offset(); 1182 int base = bytecode.m_base.offset(); 1183 int index = bytecode.m_index.offset(); 1184 int enumerator = bytecode.m_enumerator.offset(); 1185 1185 1186 1186 // Check that base is a cell … … 1220 1220 { 1221 1221 auto bytecode = currentInstruction->as<OpEnumeratorStructurePname>(); 1222 int dst = bytecode. dst.offset();1223 int enumerator = bytecode. enumerator.offset();1224 int index = bytecode. index.offset();1222 int dst = bytecode.m_dst.offset(); 1223 int enumerator = bytecode.m_enumerator.offset(); 1224 int index = bytecode.m_index.offset(); 1225 1225 1226 1226 emitLoadPayload(index, regT0); … … 1245 1245 { 1246 1246 auto bytecode = currentInstruction->as<OpEnumeratorGenericPname>(); 1247 int dst = bytecode. dst.offset();1248 int enumerator = bytecode. enumerator.offset();1249 int index = bytecode. index.offset();1247 int dst = bytecode.m_dst.offset(); 1248 int enumerator = bytecode.m_enumerator.offset(); 1249 int index = bytecode.m_index.offset(); 1250 1250 1251 1251 emitLoadPayload(index, regT0); … … 1271 1271 auto bytecode = currentInstruction->as<OpProfileType>(); 1272 1272 auto& metadata = bytecode.metadata(m_codeBlock); 1273 TypeLocation* cachedTypeLocation = metadata. typeLocation;1274 int valueToProfile = bytecode. target.offset();1273 TypeLocation* cachedTypeLocation = metadata.m_typeLocation; 1274 int valueToProfile = bytecode.m_target.offset(); 1275 1275 1276 1276 // Load payload in T0. Load tag in T3. … … 1345 1345 1346 1346 scratch1Reg = regT4; 1347 emitLoadPayload(bytecode. scope.offset(), regT3);1347 emitLoadPayload(bytecode.m_scope.offset(), regT3); 1348 1348 logShadowChickenProloguePacket(shadowPacketReg, scratch1Reg, regT3); 1349 1349 } … … 1358 1358 GPRReg scratch2Reg = regT2; 1359 1359 ensureShadowChickenPacket(*vm(), shadowPacketReg, scratch1Reg, scratch2Reg); 1360 emitLoadPayload(bytecode. thisValue.offset(), regT2);1361 emitLoadTag(bytecode. thisValue.offset(), regT1);1360 emitLoadPayload(bytecode.m_thisValue.offset(), regT2); 1361 emitLoadTag(bytecode.m_thisValue.offset(), regT1); 1362 1362 JSValueRegs thisRegs(regT1, regT2); 1363 emitLoadPayload(bytecode. scope.offset(), regT3);1363 emitLoadPayload(bytecode.m_scope.offset(), regT3); 1364 1364 logShadowChickenTailPacket(shadowPacketReg, thisRegs, regT3, m_codeBlock, CallSiteIndex(currentInstruction)); 1365 1365 } -
trunk/Source/JavaScriptCore/jit/JITOperations.cpp
r239455 r240041 1 1 /* 2 * Copyright (C) 2013-201 8Apple Inc. All rights reserved.2 * Copyright (C) 2013-2019 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 1662 1662 auto bytecode = codeBlock->instructions().at(bytecodeIndex)->as<OpCatch>(); 1663 1663 auto& metadata = bytecode.metadata(codeBlock); 1664 metadata. buffer->forEach([&] (ValueProfileAndOperand& profile) {1664 metadata.m_buffer->forEach([&] (ValueProfileAndOperand& profile) { 1665 1665 profile.m_profile.m_buckets[0] = JSValue::encode(exec->uncheckedR(profile.m_operand).jsValue()); 1666 1666 }); … … 2293 2293 2294 2294 auto bytecode = pc->as<OpGetFromScope>(); 2295 const Identifier& ident = codeBlock->identifier(bytecode. var);2296 JSObject* scope = jsCast<JSObject*>(exec->uncheckedR(bytecode. scope.offset()).jsValue());2297 GetPutInfo& getPutInfo = bytecode.metadata(codeBlock). getPutInfo;2295 const Identifier& ident = codeBlock->identifier(bytecode.m_var); 2296 JSObject* scope = jsCast<JSObject*>(exec->uncheckedR(bytecode.m_scope.offset()).jsValue()); 2297 GetPutInfo& getPutInfo = bytecode.metadata(codeBlock).m_getPutInfo; 2298 2298 2299 2299 // ModuleVar is always converted to ClosureVar for get_from_scope. … … 2335 2335 auto& metadata = bytecode.metadata(codeBlock); 2336 2336 2337 const Identifier& ident = codeBlock->identifier(bytecode. var);2338 JSObject* scope = jsCast<JSObject*>(exec->uncheckedR(bytecode. scope.offset()).jsValue());2339 JSValue value = exec->r(bytecode. value.offset()).jsValue();2340 GetPutInfo& getPutInfo = metadata. getPutInfo;2337 const Identifier& ident = codeBlock->identifier(bytecode.m_var); 2338 JSObject* scope = jsCast<JSObject*>(exec->uncheckedR(bytecode.m_scope.offset()).jsValue()); 2339 JSValue value = exec->r(bytecode.m_value.offset()).jsValue(); 2340 GetPutInfo& getPutInfo = metadata.m_getPutInfo; 2341 2341 2342 2342 // ModuleVar does not keep the scope register value alive in DFG. … … 2345 2345 if (getPutInfo.resolveType() == LocalClosureVar) { 2346 2346 JSLexicalEnvironment* environment = jsCast<JSLexicalEnvironment*>(scope); 2347 environment->variableAt(ScopeOffset(metadata. operand)).set(vm, environment, value);2348 if (WatchpointSet* set = metadata. watchpointSet)2347 environment->variableAt(ScopeOffset(metadata.m_operand)).set(vm, environment, value); 2348 if (WatchpointSet* set = metadata.m_watchpointSet) 2349 2349 set->touch(vm, "Executed op_put_scope<LocalClosureVar>"); 2350 2350 return; -
trunk/Source/JavaScriptCore/jit/JITPropertyAccess.cpp
r240023 r240041 1 1 /* 2 * Copyright (C) 2008-201 8Apple Inc. All rights reserved.2 * Copyright (C) 2008-2019 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 56 56 auto bytecode = currentInstruction->as<OpGetByVal>(); 57 57 auto& metadata = bytecode.metadata(m_codeBlock); 58 int dst = bytecode. dst.offset();59 int base = bytecode. base.offset();60 int property = bytecode. property.offset();61 ArrayProfile* profile = &metadata. arrayProfile;58 int dst = bytecode.m_dst.offset(); 59 int base = bytecode.m_base.offset(); 60 int property = bytecode.m_property.offset(); 61 ArrayProfile* profile = &metadata.m_arrayProfile; 62 62 ByValInfo* byValInfo = m_codeBlock->addByValInfo(); 63 63 … … 135 135 // scratch: regT3 136 136 137 int dst = bytecode. dst.offset();137 int dst = bytecode.m_dst.offset(); 138 138 139 139 slowCases.append(branchIfNotCell(regT1)); … … 160 160 { 161 161 auto bytecode = currentInstruction->as<OpGetByVal>(); 162 int dst = bytecode. dst.offset();163 int base = bytecode. base.offset();164 int property = bytecode. property.offset();162 int dst = bytecode.m_dst.offset(); 163 int base = bytecode.m_base.offset(); 164 int property = bytecode.m_property.offset(); 165 165 ByValInfo* byValInfo = m_byValCompilationInfo[m_byValInstructionIndex].byValInfo; 166 166 … … 206 206 auto bytecode = currentInstruction->as<Op>(); 207 207 auto& metadata = bytecode.metadata(m_codeBlock); 208 int base = bytecode. base.offset();209 int property = bytecode. property.offset();210 ArrayProfile* profile = &metadata. arrayProfile;208 int base = bytecode.m_base.offset(); 209 int property = bytecode.m_property.offset(); 210 ArrayProfile* profile = &metadata.m_arrayProfile; 211 211 ByValInfo* byValInfo = m_codeBlock->addByValInfo(); 212 212 … … 266 266 { 267 267 auto& metadata = bytecode.metadata(m_codeBlock); 268 int value = bytecode. value.offset();269 ArrayProfile* profile = &metadata. arrayProfile;268 int value = bytecode.m_value.offset(); 269 ArrayProfile* profile = &metadata.m_arrayProfile; 270 270 271 271 JumpList slowCases; … … 297 297 case ContiguousShape: 298 298 store64(regT3, BaseIndex(regT2, regT1, TimesEight)); 299 emitWriteBarrier(bytecode. base.offset(), value, ShouldFilterValue);299 emitWriteBarrier(bytecode.m_base.offset(), value, ShouldFilterValue); 300 300 break; 301 301 default: … … 324 324 { 325 325 auto& metadata = bytecode.metadata(m_codeBlock); 326 int value = bytecode. value.offset();327 ArrayProfile* profile = &metadata. arrayProfile;326 int value = bytecode.m_value.offset(); 327 ArrayProfile* profile = &metadata.m_arrayProfile; 328 328 329 329 JumpList slowCases; … … 338 338 emitGetVirtualRegister(value, regT3); 339 339 store64(regT3, BaseIndex(regT2, regT1, TimesEight, ArrayStorage::vectorOffset())); 340 emitWriteBarrier(bytecode. base.offset(), value, ShouldFilterValue);340 emitWriteBarrier(bytecode.m_base.offset(), value, ShouldFilterValue); 341 341 Jump end = jump(); 342 342 … … 363 363 // scratch: regT2 364 364 365 int base = bytecode. base.offset();366 int value = bytecode. value.offset();365 int base = bytecode.m_base.offset(); 366 int value = bytecode.m_value.offset(); 367 367 368 368 slowCases.append(branchIfNotCell(regT1)); … … 398 398 399 399 auto load = [&](auto bytecode) { 400 base = bytecode. base.offset();401 property = bytecode. property.offset();402 value = bytecode. value.offset();400 base = bytecode.m_base.offset(); 401 property = bytecode.m_property.offset(); 402 value = bytecode.m_value.offset(); 403 403 }; 404 404 … … 426 426 { 427 427 auto bytecode = currentInstruction->as<OpPutGetterById>(); 428 emitGetVirtualRegister(bytecode. base.offset(), regT0);429 int32_t options = bytecode. attributes;430 emitGetVirtualRegister(bytecode. accessor.offset(), regT1);431 callOperation(operationPutGetterById, regT0, m_codeBlock->identifier(bytecode. property).impl(), options, regT1);428 emitGetVirtualRegister(bytecode.m_base.offset(), regT0); 429 int32_t options = bytecode.m_attributes; 430 emitGetVirtualRegister(bytecode.m_accessor.offset(), regT1); 431 callOperation(operationPutGetterById, regT0, m_codeBlock->identifier(bytecode.m_property).impl(), options, regT1); 432 432 } 433 433 … … 435 435 { 436 436 auto bytecode = currentInstruction->as<OpPutSetterById>(); 437 emitGetVirtualRegister(bytecode. base.offset(), regT0);438 int32_t options = bytecode. attributes;439 emitGetVirtualRegister(bytecode. accessor.offset(), regT1);440 callOperation(operationPutSetterById, regT0, m_codeBlock->identifier(bytecode. property).impl(), options, regT1);437 emitGetVirtualRegister(bytecode.m_base.offset(), regT0); 438 int32_t options = bytecode.m_attributes; 439 emitGetVirtualRegister(bytecode.m_accessor.offset(), regT1); 440 callOperation(operationPutSetterById, regT0, m_codeBlock->identifier(bytecode.m_property).impl(), options, regT1); 441 441 } 442 442 … … 444 444 { 445 445 auto bytecode = currentInstruction->as<OpPutGetterSetterById>(); 446 emitGetVirtualRegister(bytecode. base.offset(), regT0);447 int32_t attribute = bytecode. attributes;448 emitGetVirtualRegister(bytecode. getter.offset(), regT1);449 emitGetVirtualRegister(bytecode. setter.offset(), regT2);450 callOperation(operationPutGetterSetter, regT0, m_codeBlock->identifier(bytecode. property).impl(), attribute, regT1, regT2);446 emitGetVirtualRegister(bytecode.m_base.offset(), regT0); 447 int32_t attribute = bytecode.m_attributes; 448 emitGetVirtualRegister(bytecode.m_getter.offset(), regT1); 449 emitGetVirtualRegister(bytecode.m_setter.offset(), regT2); 450 callOperation(operationPutGetterSetter, regT0, m_codeBlock->identifier(bytecode.m_property).impl(), attribute, regT1, regT2); 451 451 } 452 452 … … 454 454 { 455 455 auto bytecode = currentInstruction->as<OpPutGetterByVal>(); 456 emitGetVirtualRegister(bytecode. base.offset(), regT0);457 emitGetVirtualRegister(bytecode. property.offset(), regT1);458 int32_t attributes = bytecode. attributes;459 emitGetVirtualRegister(bytecode. accessor, regT2);456 emitGetVirtualRegister(bytecode.m_base.offset(), regT0); 457 emitGetVirtualRegister(bytecode.m_property.offset(), regT1); 458 int32_t attributes = bytecode.m_attributes; 459 emitGetVirtualRegister(bytecode.m_accessor, regT2); 460 460 callOperation(operationPutGetterByVal, regT0, regT1, attributes, regT2); 461 461 } … … 464 464 { 465 465 auto bytecode = currentInstruction->as<OpPutSetterByVal>(); 466 emitGetVirtualRegister(bytecode. base.offset(), regT0);467 emitGetVirtualRegister(bytecode. property.offset(), regT1);468 int32_t attributes = bytecode. attributes;469 emitGetVirtualRegister(bytecode. accessor.offset(), regT2);466 emitGetVirtualRegister(bytecode.m_base.offset(), regT0); 467 emitGetVirtualRegister(bytecode.m_property.offset(), regT1); 468 int32_t attributes = bytecode.m_attributes; 469 emitGetVirtualRegister(bytecode.m_accessor.offset(), regT2); 470 470 callOperation(operationPutSetterByVal, regT0, regT1, attributes, regT2); 471 471 } … … 474 474 { 475 475 auto bytecode = currentInstruction->as<OpDelById>(); 476 int dst = bytecode. dst.offset();477 int base = bytecode. base.offset();478 int property = bytecode. property;476 int dst = bytecode.m_dst.offset(); 477 int base = bytecode.m_base.offset(); 478 int property = bytecode.m_property; 479 479 emitGetVirtualRegister(base, regT0); 480 480 callOperation(operationDeleteByIdJSResult, dst, regT0, m_codeBlock->identifier(property).impl()); … … 484 484 { 485 485 auto bytecode = currentInstruction->as<OpDelByVal>(); 486 int dst = bytecode. dst.offset();487 int base = bytecode. base.offset();488 int property = bytecode. property.offset();486 int dst = bytecode.m_dst.offset(); 487 int base = bytecode.m_base.offset(); 488 int property = bytecode.m_property.offset(); 489 489 emitGetVirtualRegister(base, regT0); 490 490 emitGetVirtualRegister(property, regT1); … … 495 495 { 496 496 auto bytecode = currentInstruction->as<OpTryGetById>(); 497 int resultVReg = bytecode. dst.offset();498 int baseVReg = bytecode. base.offset();499 const Identifier* ident = &(m_codeBlock->identifier(bytecode. property));497 int resultVReg = bytecode.m_dst.offset(); 498 int baseVReg = bytecode.m_base.offset(); 499 const Identifier* ident = &(m_codeBlock->identifier(bytecode.m_property)); 500 500 501 501 emitGetVirtualRegister(baseVReg, regT0); … … 519 519 520 520 auto bytecode = currentInstruction->as<OpTryGetById>(); 521 int resultVReg = bytecode. dst.offset();522 const Identifier* ident = &(m_codeBlock->identifier(bytecode. property));521 int resultVReg = bytecode.m_dst.offset(); 522 const Identifier* ident = &(m_codeBlock->identifier(bytecode.m_property)); 523 523 524 524 JITGetByIdGenerator& gen = m_getByIds[m_getByIdIndex++]; … … 534 534 { 535 535 auto bytecode = currentInstruction->as<OpGetByIdDirect>(); 536 int resultVReg = bytecode. dst.offset();537 int baseVReg = bytecode. base.offset();538 const Identifier* ident = &(m_codeBlock->identifier(bytecode. property));536 int resultVReg = bytecode.m_dst.offset(); 537 int baseVReg = bytecode.m_base.offset(); 538 const Identifier* ident = &(m_codeBlock->identifier(bytecode.m_property)); 539 539 540 540 emitGetVirtualRegister(baseVReg, regT0); … … 558 558 559 559 auto bytecode = currentInstruction->as<OpGetByIdDirect>(); 560 int resultVReg = bytecode. dst.offset();561 const Identifier* ident = &(m_codeBlock->identifier(bytecode. property));560 int resultVReg = bytecode.m_dst.offset(); 561 const Identifier* ident = &(m_codeBlock->identifier(bytecode.m_property)); 562 562 563 563 JITGetByIdGenerator& gen = m_getByIds[m_getByIdIndex++]; … … 574 574 auto bytecode = currentInstruction->as<OpGetById>(); 575 575 auto& metadata = bytecode.metadata(m_codeBlock); 576 int resultVReg = bytecode. dst.offset();577 int baseVReg = bytecode. base.offset();578 const Identifier* ident = &(m_codeBlock->identifier(bytecode. property));576 int resultVReg = bytecode.m_dst.offset(); 577 int baseVReg = bytecode.m_base.offset(); 578 const Identifier* ident = &(m_codeBlock->identifier(bytecode.m_property)); 579 579 580 580 emitGetVirtualRegister(baseVReg, regT0); … … 583 583 584 584 if (*ident == m_vm->propertyNames->length && shouldEmitProfiling()) { 585 Jump notArrayLengthMode = branch8(NotEqual, AbsoluteAddress(&metadata.m ode), TrustedImm32(static_cast<uint8_t>(GetByIdMode::ArrayLength)));586 emitArrayProfilingSiteWithCell(regT0, regT1, &metadata.m odeMetadata.arrayLengthMode.arrayProfile);585 Jump notArrayLengthMode = branch8(NotEqual, AbsoluteAddress(&metadata.m_mode), TrustedImm32(static_cast<uint8_t>(GetByIdMode::ArrayLength))); 586 emitArrayProfilingSiteWithCell(regT0, regT1, &metadata.m_modeMetadata.arrayLengthMode.arrayProfile); 587 587 notArrayLengthMode.link(this); 588 588 } … … 602 602 { 603 603 auto bytecode = currentInstruction->as<OpGetByIdWithThis>(); 604 int resultVReg = bytecode. dst.offset();605 int baseVReg = bytecode. base.offset();606 int thisVReg = bytecode. thisValue.offset();607 const Identifier* ident = &(m_codeBlock->identifier(bytecode. property));604 int resultVReg = bytecode.m_dst.offset(); 605 int baseVReg = bytecode.m_base.offset(); 606 int thisVReg = bytecode.m_thisValue.offset(); 607 const Identifier* ident = &(m_codeBlock->identifier(bytecode.m_property)); 608 608 609 609 emitGetVirtualRegister(baseVReg, regT0); … … 628 628 629 629 auto bytecode = currentInstruction->as<OpGetById>(); 630 int resultVReg = bytecode. dst.offset();631 const Identifier* ident = &(m_codeBlock->identifier(bytecode. property));630 int resultVReg = bytecode.m_dst.offset(); 631 const Identifier* ident = &(m_codeBlock->identifier(bytecode.m_property)); 632 632 633 633 JITGetByIdGenerator& gen = m_getByIds[m_getByIdIndex++]; … … 645 645 646 646 auto bytecode = currentInstruction->as<OpGetByIdWithThis>(); 647 int resultVReg = bytecode. dst.offset();648 const Identifier* ident = &(m_codeBlock->identifier(bytecode. property));647 int resultVReg = bytecode.m_dst.offset(); 648 const Identifier* ident = &(m_codeBlock->identifier(bytecode.m_property)); 649 649 650 650 JITGetByIdWithThisGenerator& gen = m_getByIdsWithThis[m_getByIdWithThisIndex++]; … … 660 660 { 661 661 auto bytecode = currentInstruction->as<OpPutById>(); 662 int baseVReg = bytecode. base.offset();663 int valueVReg = bytecode. value.offset();664 bool direct = !!(bytecode. flags & PutByIdIsDirect);662 int baseVReg = bytecode.m_base.offset(); 663 int valueVReg = bytecode.m_value.offset(); 664 bool direct = !!(bytecode.m_flags & PutByIdIsDirect); 665 665 666 666 // In order to be able to patch both the Structure, and the object offset, we store one pointer, … … 690 690 691 691 auto bytecode = currentInstruction->as<OpPutById>(); 692 const Identifier* ident = &(m_codeBlock->identifier(bytecode. property));692 const Identifier* ident = &(m_codeBlock->identifier(bytecode.m_property)); 693 693 694 694 Label coldPathBegin(this); … … 704 704 { 705 705 auto bytecode = currentInstruction->as<OpInById>(); 706 int resultVReg = bytecode. dst.offset();707 int baseVReg = bytecode. base.offset();708 const Identifier* ident = &(m_codeBlock->identifier(bytecode. property));706 int resultVReg = bytecode.m_dst.offset(); 707 int baseVReg = bytecode.m_base.offset(); 708 const Identifier* ident = &(m_codeBlock->identifier(bytecode.m_property)); 709 709 710 710 emitGetVirtualRegister(baseVReg, regT0); … … 727 727 728 728 auto bytecode = currentInstruction->as<OpInById>(); 729 int resultVReg = bytecode. dst.offset();730 const Identifier* ident = &(m_codeBlock->identifier(bytecode. property));729 int resultVReg = bytecode.m_dst.offset(); 730 const Identifier* ident = &(m_codeBlock->identifier(bytecode.m_property)); 731 731 732 732 JITInByIdGenerator& gen = m_inByIds[m_inByIdIndex++]; … … 759 759 auto bytecode = currentInstruction->as<OpResolveScope>(); 760 760 auto& metadata = bytecode.metadata(m_codeBlock); 761 int dst = bytecode. dst.offset();762 int scope = bytecode. scope.offset();763 ResolveType resolveType = metadata. resolveType;764 unsigned depth = metadata. localScopeDepth;761 int dst = bytecode.m_dst.offset(); 762 int scope = bytecode.m_scope.offset(); 763 ResolveType resolveType = metadata.m_resolveType; 764 unsigned depth = metadata.m_localScopeDepth; 765 765 766 766 auto emitCode = [&] (ResolveType resolveType) { … … 784 784 break; 785 785 case ModuleVar: 786 move(TrustedImmPtr(metadata. lexicalEnvironment.get()), regT0);786 move(TrustedImmPtr(metadata.m_lexicalEnvironment.get()), regT0); 787 787 emitPutVirtualRegister(dst); 788 788 break; … … 801 801 case GlobalPropertyWithVarInjectionChecks: { 802 802 // Since these GlobalProperty can be changed to GlobalLexicalVar, we should load the value from metadata. 803 JSScope** constantScopeSlot = metadata. constantScope.slot();803 JSScope** constantScopeSlot = metadata.m_constantScope.slot(); 804 804 emitVarInjectionCheck(needsVarInjectionChecks(resolveType)); 805 805 loadPtr(constantScopeSlot, regT0); … … 810 810 case UnresolvedPropertyWithVarInjectionChecks: { 811 811 JumpList skipToEnd; 812 load32(&metadata. resolveType, regT0);812 load32(&metadata.m_resolveType, regT0); 813 813 814 814 Jump notGlobalProperty = branch32(NotEqual, regT0, TrustedImm32(GlobalProperty)); … … 873 873 auto bytecode = currentInstruction->as<OpGetFromScope>(); 874 874 auto& metadata = bytecode.metadata(m_codeBlock); 875 int dst = bytecode. dst.offset();876 int scope = bytecode. scope.offset();877 ResolveType resolveType = metadata. getPutInfo.resolveType();878 Structure** structureSlot = metadata. structure.slot();879 uintptr_t* operandSlot = reinterpret_cast<uintptr_t*>(&metadata. operand);875 int dst = bytecode.m_dst.offset(); 876 int scope = bytecode.m_scope.offset(); 877 ResolveType resolveType = metadata.m_getPutInfo.resolveType(); 878 Structure** structureSlot = metadata.m_structure.slot(); 879 uintptr_t* operandSlot = reinterpret_cast<uintptr_t*>(&metadata.m_operand); 880 880 881 881 auto emitCode = [&] (ResolveType resolveType, bool indirectLoadForOperand) { … … 937 937 case GlobalPropertyWithVarInjectionChecks: { 938 938 JumpList skipToEnd; 939 load32(&metadata. getPutInfo, regT0);939 load32(&metadata.m_getPutInfo, regT0); 940 940 and32(TrustedImm32(GetPutInfo::typeBits), regT0); // Load ResolveType into T0 941 941 … … 953 953 case UnresolvedPropertyWithVarInjectionChecks: { 954 954 JumpList skipToEnd; 955 load32(&metadata. getPutInfo, regT0);955 load32(&metadata.m_getPutInfo, regT0); 956 956 and32(TrustedImm32(GetPutInfo::typeBits), regT0); // Load ResolveType into T0 957 957 … … 992 992 993 993 auto bytecode = currentInstruction->as<OpGetFromScope>(); 994 int dst = bytecode. dst.offset();994 int dst = bytecode.m_dst.offset(); 995 995 callOperationWithProfile(bytecode.metadata(m_codeBlock), operationGetFromScope, dst, currentInstruction); 996 996 } … … 1023 1023 auto bytecode = currentInstruction->as<OpPutToScope>(); 1024 1024 auto& metadata = bytecode.metadata(m_codeBlock); 1025 int scope = bytecode. scope.offset();1026 int value = bytecode. value.offset();1025 int scope = bytecode.m_scope.offset(); 1026 int value = bytecode.m_value.offset(); 1027 1027 GetPutInfo getPutInfo = copiedGetPutInfo(bytecode); 1028 1028 ResolveType resolveType = getPutInfo.resolveType(); 1029 Structure** structureSlot = metadata. structure.slot();1030 uintptr_t* operandSlot = reinterpret_cast<uintptr_t*>(&metadata. operand);1029 Structure** structureSlot = metadata.m_structure.slot(); 1030 uintptr_t* operandSlot = reinterpret_cast<uintptr_t*>(&metadata.m_operand); 1031 1031 1032 1032 auto emitCode = [&] (ResolveType resolveType, bool indirectLoadForOperand) { … … 1064 1064 } 1065 1065 if (indirectLoadForOperand) 1066 emitPutGlobalVariableIndirect(bitwise_cast<JSValue**>(operandSlot), value, &metadata. watchpointSet);1066 emitPutGlobalVariableIndirect(bitwise_cast<JSValue**>(operandSlot), value, &metadata.m_watchpointSet); 1067 1067 else 1068 emitPutGlobalVariable(bitwise_cast<JSValue*>(*operandSlot), value, metadata. watchpointSet);1068 emitPutGlobalVariable(bitwise_cast<JSValue*>(*operandSlot), value, metadata.m_watchpointSet); 1069 1069 emitWriteBarrier(constantScope, value, ShouldFilterValue); 1070 1070 break; … … 1074 1074 case ClosureVarWithVarInjectionChecks: 1075 1075 emitVarInjectionCheck(needsVarInjectionChecks(resolveType)); 1076 emitPutClosureVar(scope, *operandSlot, value, metadata. watchpointSet);1076 emitPutClosureVar(scope, *operandSlot, value, metadata.m_watchpointSet); 1077 1077 emitWriteBarrier(scope, value, ShouldFilterValue); 1078 1078 break; … … 1092 1092 case GlobalPropertyWithVarInjectionChecks: { 1093 1093 JumpList skipToEnd; 1094 load32(&metadata. getPutInfo, regT0);1094 load32(&metadata.m_getPutInfo, regT0); 1095 1095 and32(TrustedImm32(GetPutInfo::typeBits), regT0); // Load ResolveType into T0 1096 1096 … … 1111 1111 case UnresolvedPropertyWithVarInjectionChecks: { 1112 1112 JumpList skipToEnd; 1113 load32(&metadata. getPutInfo, regT0);1113 load32(&metadata.m_getPutInfo, regT0); 1114 1114 and32(TrustedImm32(GetPutInfo::typeBits), regT0); // Load ResolveType into T0 1115 1115 … … 1159 1159 { 1160 1160 auto bytecode = currentInstruction->as<OpGetFromArguments>(); 1161 int dst = bytecode. dst.offset();1162 int arguments = bytecode. arguments.offset();1163 int index = bytecode. index;1161 int dst = bytecode.m_dst.offset(); 1162 int arguments = bytecode.m_arguments.offset(); 1163 int index = bytecode.m_index; 1164 1164 1165 1165 emitGetVirtualRegister(arguments, regT0); … … 1172 1172 { 1173 1173 auto bytecode = currentInstruction->as<OpPutToArguments>(); 1174 int arguments = bytecode. arguments.offset();1175 int index = bytecode. index;1176 int value = bytecode. value.offset();1174 int arguments = bytecode.m_arguments.offset(); 1175 int index = bytecode.m_index; 1176 int value = bytecode.m_value.offset(); 1177 1177 1178 1178 emitGetVirtualRegister(arguments, regT0); … … 1738 1738 { 1739 1739 auto& metadata = bytecode.metadata(m_codeBlock); 1740 ArrayProfile* profile = &metadata. arrayProfile;1740 ArrayProfile* profile = &metadata.m_arrayProfile; 1741 1741 ASSERT(isInt(type)); 1742 1742 1743 int value = bytecode. value.offset();1743 int value = bytecode.m_value.offset(); 1744 1744 1745 1745 #if USE(JSVALUE64) … … 1813 1813 { 1814 1814 auto& metadata = bytecode.metadata(m_codeBlock); 1815 ArrayProfile* profile = &metadata. arrayProfile;1815 ArrayProfile* profile = &metadata.m_arrayProfile; 1816 1816 ASSERT(isFloat(type)); 1817 1817 1818 int value = bytecode. value.offset();1818 int value = bytecode.m_value.offset(); 1819 1819 1820 1820 #if USE(JSVALUE64) -
trunk/Source/JavaScriptCore/jit/JITPropertyAccess32_64.cpp
r240023 r240041 1 1 /* 2 * Copyright (C) 2008-201 8Apple Inc. All rights reserved.2 * Copyright (C) 2008-2019 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 51 51 { 52 52 auto bytecode = currentInstruction->as<OpPutGetterById>(); 53 int base = bytecode. base.offset();54 int property = bytecode. property;55 int options = bytecode. attributes;56 int getter = bytecode. accessor.offset();53 int base = bytecode.m_base.offset(); 54 int property = bytecode.m_property; 55 int options = bytecode.m_attributes; 56 int getter = bytecode.m_accessor.offset(); 57 57 58 58 emitLoadPayload(base, regT1); … … 64 64 { 65 65 auto bytecode = currentInstruction->as<OpPutSetterById>(); 66 int base = bytecode. base.offset();67 int property = bytecode. property;68 int options = bytecode. attributes;69 int setter = bytecode. accessor.offset();66 int base = bytecode.m_base.offset(); 67 int property = bytecode.m_property; 68 int options = bytecode.m_attributes; 69 int setter = bytecode.m_accessor.offset(); 70 70 71 71 emitLoadPayload(base, regT1); … … 77 77 { 78 78 auto bytecode = currentInstruction->as<OpPutGetterSetterById>(); 79 int base = bytecode. base.offset();80 int property = bytecode. property;81 int attributes = bytecode. attributes;82 int getter = bytecode. getter.offset();83 int setter = bytecode. setter.offset();79 int base = bytecode.m_base.offset(); 80 int property = bytecode.m_property; 81 int attributes = bytecode.m_attributes; 82 int getter = bytecode.m_getter.offset(); 83 int setter = bytecode.m_setter.offset(); 84 84 85 85 emitLoadPayload(base, regT1); … … 92 92 { 93 93 auto bytecode = currentInstruction->as<OpPutGetterByVal>(); 94 int base = bytecode. base.offset();95 int property = bytecode. property.offset();96 int32_t attributes = bytecode. attributes;97 int getter = bytecode. accessor.offset();94 int base = bytecode.m_base.offset(); 95 int property = bytecode.m_property.offset(); 96 int32_t attributes = bytecode.m_attributes; 97 int getter = bytecode.m_accessor.offset(); 98 98 99 99 emitLoadPayload(base, regT2); … … 106 106 { 107 107 auto bytecode = currentInstruction->as<OpPutSetterByVal>(); 108 int base = bytecode. base.offset();109 int property = bytecode. property.offset();110 int32_t attributes = bytecode. attributes;111 int setter = bytecode. accessor.offset();108 int base = bytecode.m_base.offset(); 109 int property = bytecode.m_property.offset(); 110 int32_t attributes = bytecode.m_attributes; 111 int setter = bytecode.m_accessor.offset(); 112 112 113 113 emitLoadPayload(base, regT2); … … 120 120 { 121 121 auto bytecode = currentInstruction->as<OpDelById>(); 122 int dst = bytecode. dst.offset();123 int base = bytecode. base.offset();124 int property = bytecode. property;122 int dst = bytecode.m_dst.offset(); 123 int base = bytecode.m_base.offset(); 124 int property = bytecode.m_property; 125 125 emitLoad(base, regT1, regT0); 126 126 callOperation(operationDeleteByIdJSResult, dst, JSValueRegs(regT1, regT0), m_codeBlock->identifier(property).impl()); … … 130 130 { 131 131 auto bytecode = currentInstruction->as<OpDelByVal>(); 132 int dst = bytecode. dst.offset();133 int base = bytecode. base.offset();134 int property = bytecode. property.offset();132 int dst = bytecode.m_dst.offset(); 133 int base = bytecode.m_base.offset(); 134 int property = bytecode.m_property.offset(); 135 135 emitLoad2(base, regT1, regT0, property, regT3, regT2); 136 136 callOperation(operationDeleteByValJSResult, dst, JSValueRegs(regT1, regT0), JSValueRegs(regT3, regT2)); … … 141 141 auto bytecode = currentInstruction->as<OpGetByVal>(); 142 142 auto& metadata = bytecode.metadata(m_codeBlock); 143 int dst = bytecode. dst.offset();144 int base = bytecode. base.offset();145 int property = bytecode. property.offset();146 ArrayProfile* profile = &metadata. arrayProfile;143 int dst = bytecode.m_dst.offset(); 144 int base = bytecode.m_base.offset(); 145 int property = bytecode.m_property.offset(); 146 ArrayProfile* profile = &metadata.m_arrayProfile; 147 147 ByValInfo* byValInfo = m_codeBlock->addByValInfo(); 148 148 … … 201 201 // scratch: regT4 202 202 203 int dst = bytecode. dst.offset();203 int dst = bytecode.m_dst.offset(); 204 204 205 205 slowCases.append(branchIfNotCell(regT3)); … … 227 227 { 228 228 auto bytecode = currentInstruction->as<OpGetByVal>(); 229 int dst = bytecode. dst.offset();230 int base = bytecode. base.offset();231 int property = bytecode. property.offset();229 int dst = bytecode.m_dst.offset(); 230 int base = bytecode.m_base.offset(); 231 int property = bytecode.m_property.offset(); 232 232 ByValInfo* byValInfo = m_byValCompilationInfo[m_byValInstructionIndex].byValInfo; 233 233 … … 272 272 auto bytecode = currentInstruction->as<Op>(); 273 273 auto& metadata = bytecode.metadata(m_codeBlock); 274 int base = bytecode. base.offset();275 int property = bytecode. property.offset();276 ArrayProfile* profile = &metadata. arrayProfile;274 int base = bytecode.m_base.offset(); 275 int property = bytecode.m_property.offset(); 276 ArrayProfile* profile = &metadata.m_arrayProfile; 277 277 ByValInfo* byValInfo = m_codeBlock->addByValInfo(); 278 278 … … 322 322 { 323 323 auto& metadata = bytecode.metadata(m_codeBlock); 324 int base = bytecode. base.offset();325 int value = bytecode. value.offset();326 ArrayProfile* profile = &metadata. arrayProfile;324 int base = bytecode.m_base.offset(); 325 int value = bytecode.m_value.offset(); 326 ArrayProfile* profile = &metadata.m_arrayProfile; 327 327 328 328 JumpList slowCases; … … 383 383 { 384 384 auto& metadata = bytecode.metadata(m_codeBlock); 385 int base = bytecode. base.offset();386 int value = bytecode. value.offset();387 ArrayProfile* profile = &metadata. arrayProfile;385 int base = bytecode.m_base.offset(); 386 int value = bytecode.m_value.offset(); 387 ArrayProfile* profile = &metadata.m_arrayProfile; 388 388 389 389 JumpList slowCases; … … 424 424 // property: tag(regT3), payload(regT2) 425 425 426 int base = bytecode. base.offset();427 int value = bytecode. value.offset();426 int base = bytecode.m_base.offset(); 427 int value = bytecode.m_value.offset(); 428 428 429 429 slowCases.append(branchIfNotCell(regT3)); … … 464 464 465 465 auto load = [&](auto bytecode) { 466 base = bytecode. base.offset();467 property = bytecode. property.offset();468 value = bytecode. value.offset();466 base = bytecode.m_base.offset(); 467 property = bytecode.m_property.offset(); 468 value = bytecode.m_value.offset(); 469 469 }; 470 470 … … 494 494 { 495 495 auto bytecode = currentInstruction->as<OpTryGetById>(); 496 int dst = bytecode. dst.offset();497 int base = bytecode. base.offset();498 const Identifier* ident = &(m_codeBlock->identifier(bytecode. property));496 int dst = bytecode.m_dst.offset(); 497 int base = bytecode.m_base.offset(); 498 const Identifier* ident = &(m_codeBlock->identifier(bytecode.m_property)); 499 499 500 500 emitLoad(base, regT1, regT0); … … 517 517 518 518 auto bytecode = currentInstruction->as<OpTryGetById>(); 519 int resultVReg = bytecode. dst.offset();520 const Identifier* ident = &(m_codeBlock->identifier(bytecode. property));519 int resultVReg = bytecode.m_dst.offset(); 520 const Identifier* ident = &(m_codeBlock->identifier(bytecode.m_property)); 521 521 522 522 JITGetByIdGenerator& gen = m_getByIds[m_getByIdIndex++]; … … 533 533 { 534 534 auto bytecode = currentInstruction->as<OpGetByIdDirect>(); 535 int dst = bytecode. dst.offset();536 int base = bytecode. base.offset();537 const Identifier* ident = &(m_codeBlock->identifier(bytecode. property));535 int dst = bytecode.m_dst.offset(); 536 int base = bytecode.m_base.offset(); 537 const Identifier* ident = &(m_codeBlock->identifier(bytecode.m_property)); 538 538 539 539 emitLoad(base, regT1, regT0); … … 556 556 557 557 auto bytecode = currentInstruction->as<OpGetByIdDirect>(); 558 int resultVReg = bytecode. dst.offset();559 const Identifier* ident = &(m_codeBlock->identifier(bytecode. property));558 int resultVReg = bytecode.m_dst.offset(); 559 const Identifier* ident = &(m_codeBlock->identifier(bytecode.m_property)); 560 560 561 561 JITGetByIdGenerator& gen = m_getByIds[m_getByIdIndex++]; … … 573 573 auto bytecode = currentInstruction->as<OpGetById>(); 574 574 auto& metadata = bytecode.metadata(m_codeBlock); 575 int dst = bytecode. dst.offset();576 int base = bytecode. base.offset();577 const Identifier* ident = &(m_codeBlock->identifier(bytecode. property));575 int dst = bytecode.m_dst.offset(); 576 int base = bytecode.m_base.offset(); 577 const Identifier* ident = &(m_codeBlock->identifier(bytecode.m_property)); 578 578 579 579 emitLoad(base, regT1, regT0); … … 581 581 582 582 if (*ident == m_vm->propertyNames->length && shouldEmitProfiling()) { 583 Jump notArrayLengthMode = branch8(NotEqual, AbsoluteAddress(&metadata.m ode), TrustedImm32(static_cast<uint8_t>(GetByIdMode::ArrayLength)));584 emitArrayProfilingSiteWithCell(regT0, regT2, &metadata.m odeMetadata.arrayLengthMode.arrayProfile);583 Jump notArrayLengthMode = branch8(NotEqual, AbsoluteAddress(&metadata.m_mode), TrustedImm32(static_cast<uint8_t>(GetByIdMode::ArrayLength))); 584 emitArrayProfilingSiteWithCell(regT0, regT2, &metadata.m_modeMetadata.arrayLengthMode.arrayProfile); 585 585 notArrayLengthMode.link(this); 586 586 } … … 602 602 603 603 auto bytecode = currentInstruction->as<OpGetById>(); 604 int resultVReg = bytecode. dst.offset();605 const Identifier* ident = &(m_codeBlock->identifier(bytecode. property));604 int resultVReg = bytecode.m_dst.offset(); 605 const Identifier* ident = &(m_codeBlock->identifier(bytecode.m_property)); 606 606 607 607 JITGetByIdGenerator& gen = m_getByIds[m_getByIdIndex++]; … … 617 617 { 618 618 auto bytecode = currentInstruction->as<OpGetByIdWithThis>(); 619 int dst = bytecode. dst.offset();620 int base = bytecode. base.offset();621 int thisVReg = bytecode. thisValue.offset();622 const Identifier* ident = &(m_codeBlock->identifier(bytecode. property));619 int dst = bytecode.m_dst.offset(); 620 int base = bytecode.m_base.offset(); 621 int thisVReg = bytecode.m_thisValue.offset(); 622 const Identifier* ident = &(m_codeBlock->identifier(bytecode.m_property)); 623 623 624 624 emitLoad(base, regT1, regT0); … … 643 643 644 644 auto bytecode = currentInstruction->as<OpGetByIdWithThis>(); 645 int resultVReg = bytecode. dst.offset();646 const Identifier* ident = &(m_codeBlock->identifier(bytecode. property));645 int resultVReg = bytecode.m_dst.offset(); 646 const Identifier* ident = &(m_codeBlock->identifier(bytecode.m_property)); 647 647 648 648 JITGetByIdWithThisGenerator& gen = m_getByIdsWithThis[m_getByIdWithThisIndex++]; … … 662 662 663 663 auto bytecode = currentInstruction->as<OpPutById>(); 664 int base = bytecode. base.offset();665 int value = bytecode. value.offset();666 bool direct = !!(bytecode. flags & PutByIdIsDirect);664 int base = bytecode.m_base.offset(); 665 int value = bytecode.m_value.offset(); 666 bool direct = !!(bytecode.m_flags & PutByIdIsDirect); 667 667 668 668 emitLoad2(base, regT1, regT0, value, regT3, regT2); … … 688 688 689 689 auto bytecode = currentInstruction->as<OpPutById>(); 690 int base = bytecode. base.offset();691 const Identifier* ident = &(m_codeBlock->identifier(bytecode. property));690 int base = bytecode.m_base.offset(); 691 const Identifier* ident = &(m_codeBlock->identifier(bytecode.m_property)); 692 692 693 693 Label coldPathBegin(this); … … 707 707 { 708 708 auto bytecode = currentInstruction->as<OpInById>(); 709 int dst = bytecode. dst.offset();710 int base = bytecode. base.offset();711 const Identifier* ident = &(m_codeBlock->identifier(bytecode. property));709 int dst = bytecode.m_dst.offset(); 710 int base = bytecode.m_base.offset(); 711 const Identifier* ident = &(m_codeBlock->identifier(bytecode.m_property)); 712 712 713 713 emitLoad(base, regT1, regT0); … … 729 729 730 730 auto bytecode = currentInstruction->as<OpInById>(); 731 int resultVReg = bytecode. dst.offset();732 const Identifier* ident = &(m_codeBlock->identifier(bytecode. property));731 int resultVReg = bytecode.m_dst.offset(); 732 const Identifier* ident = &(m_codeBlock->identifier(bytecode.m_property)); 733 733 734 734 JITInByIdGenerator& gen = m_inByIds[m_inByIdIndex++]; … … 762 762 auto bytecode = currentInstruction->as<OpResolveScope>(); 763 763 auto& metadata = bytecode.metadata(m_codeBlock); 764 int dst = bytecode. dst.offset();765 int scope = bytecode. scope.offset();766 ResolveType resolveType = metadata. resolveType;767 unsigned depth = metadata. localScopeDepth;764 int dst = bytecode.m_dst.offset(); 765 int scope = bytecode.m_scope.offset(); 766 ResolveType resolveType = metadata.m_resolveType; 767 unsigned depth = metadata.m_localScopeDepth; 768 768 769 769 auto emitCode = [&] (ResolveType resolveType) { … … 789 789 case ModuleVar: 790 790 move(TrustedImm32(JSValue::CellTag), regT1); 791 move(TrustedImmPtr(metadata. lexicalEnvironment.get()), regT0);791 move(TrustedImmPtr(metadata.m_lexicalEnvironment.get()), regT0); 792 792 emitStore(dst, regT1, regT0); 793 793 break; … … 805 805 case GlobalPropertyWithVarInjectionChecks: { 806 806 // Since these GlobalProperty can be changed to GlobalLexicalVar, we should load the value from metadata. 807 JSScope** constantScopeSlot = metadata. constantScope.slot();807 JSScope** constantScopeSlot = metadata.m_constantScope.slot(); 808 808 emitVarInjectionCheck(needsVarInjectionChecks(resolveType)); 809 809 move(TrustedImm32(JSValue::CellTag), regT1); … … 815 815 case UnresolvedPropertyWithVarInjectionChecks: { 816 816 JumpList skipToEnd; 817 load32(&metadata. resolveType, regT0);817 load32(&metadata.m_resolveType, regT0); 818 818 819 819 Jump notGlobalProperty = branch32(NotEqual, regT0, TrustedImm32(GlobalProperty)); … … 879 879 auto bytecode = currentInstruction->as<OpGetFromScope>(); 880 880 auto& metadata = bytecode.metadata(m_codeBlock); 881 int dst = bytecode. dst.offset();882 int scope = bytecode. scope.offset();883 ResolveType resolveType = metadata. getPutInfo.resolveType();884 Structure** structureSlot = metadata. structure.slot();885 uintptr_t* operandSlot = reinterpret_cast<uintptr_t*>(&metadata. operand);881 int dst = bytecode.m_dst.offset(); 882 int scope = bytecode.m_scope.offset(); 883 ResolveType resolveType = metadata.m_getPutInfo.resolveType(); 884 Structure** structureSlot = metadata.m_structure.slot(); 885 uintptr_t* operandSlot = reinterpret_cast<uintptr_t*>(&metadata.m_operand); 886 886 887 887 auto emitCode = [&] (ResolveType resolveType, bool indirectLoadForOperand) { … … 940 940 case GlobalPropertyWithVarInjectionChecks: { 941 941 JumpList skipToEnd; 942 load32(&metadata. getPutInfo, regT0);942 load32(&metadata.m_getPutInfo, regT0); 943 943 and32(TrustedImm32(GetPutInfo::typeBits), regT0); // Load ResolveType into T0 944 944 … … 955 955 case UnresolvedPropertyWithVarInjectionChecks: { 956 956 JumpList skipToEnd; 957 load32(&metadata. getPutInfo, regT0);957 load32(&metadata.m_getPutInfo, regT0); 958 958 and32(TrustedImm32(GetPutInfo::typeBits), regT0); // Load ResolveType into T0 959 959 … … 994 994 995 995 auto bytecode = currentInstruction->as<OpGetFromScope>(); 996 int dst = bytecode. dst.offset();996 int dst = bytecode.m_dst.offset(); 997 997 callOperationWithProfile(bytecode.metadata(m_codeBlock), operationGetFromScope, dst, currentInstruction); 998 998 } … … 1030 1030 auto bytecode = currentInstruction->as<OpPutToScope>(); 1031 1031 auto& metadata = bytecode.metadata(m_codeBlock); 1032 int scope = bytecode. scope.offset();1033 int value = bytecode. value.offset();1032 int scope = bytecode.m_scope.offset(); 1033 int value = bytecode.m_value.offset(); 1034 1034 GetPutInfo getPutInfo = copiedGetPutInfo(bytecode); 1035 1035 ResolveType resolveType = getPutInfo.resolveType(); 1036 Structure** structureSlot = metadata. structure.slot();1037 uintptr_t* operandSlot = reinterpret_cast<uintptr_t*>(&metadata. operand);1036 Structure** structureSlot = metadata.m_structure.slot(); 1037 uintptr_t* operandSlot = reinterpret_cast<uintptr_t*>(&metadata.m_operand); 1038 1038 1039 1039 auto emitCode = [&] (ResolveType resolveType, bool indirectLoadForOperand) { … … 1069 1069 } 1070 1070 if (indirectLoadForOperand) 1071 emitPutGlobalVariableIndirect(bitwise_cast<JSValue**>(operandSlot), value, &metadata. watchpointSet);1071 emitPutGlobalVariableIndirect(bitwise_cast<JSValue**>(operandSlot), value, &metadata.m_watchpointSet); 1072 1072 else 1073 emitPutGlobalVariable(bitwise_cast<JSValue*>(*operandSlot), value, metadata. watchpointSet);1073 emitPutGlobalVariable(bitwise_cast<JSValue*>(*operandSlot), value, metadata.m_watchpointSet); 1074 1074 break; 1075 1075 } … … 1079 1079 emitWriteBarrier(scope, value, ShouldFilterValue); 1080 1080 emitVarInjectionCheck(needsVarInjectionChecks(resolveType)); 1081 emitPutClosureVar(scope, *operandSlot, value, metadata. watchpointSet);1081 emitPutClosureVar(scope, *operandSlot, value, metadata.m_watchpointSet); 1082 1082 break; 1083 1083 case ModuleVar: … … 1095 1095 case GlobalPropertyWithVarInjectionChecks: { 1096 1096 JumpList skipToEnd; 1097 load32(&metadata. getPutInfo, regT0);1097 load32(&metadata.m_getPutInfo, regT0); 1098 1098 and32(TrustedImm32(GetPutInfo::typeBits), regT0); // Load ResolveType into T0 1099 1099 … … 1114 1114 case UnresolvedPropertyWithVarInjectionChecks: { 1115 1115 JumpList skipToEnd; 1116 load32(&metadata. getPutInfo, regT0);1116 load32(&metadata.m_getPutInfo, regT0); 1117 1117 and32(TrustedImm32(GetPutInfo::typeBits), regT0); // Load ResolveType into T0 1118 1118 … … 1162 1162 { 1163 1163 auto bytecode = currentInstruction->as<OpGetFromArguments>(); 1164 int dst = bytecode. dst.offset();1165 int arguments = bytecode. arguments.offset();1166 int index = bytecode. index;1164 int dst = bytecode.m_dst.offset(); 1165 int arguments = bytecode.m_arguments.offset(); 1166 int index = bytecode.m_index; 1167 1167 1168 1168 emitLoadPayload(arguments, regT0); … … 1176 1176 { 1177 1177 auto bytecode = currentInstruction->as<OpPutToArguments>(); 1178 int arguments = bytecode. arguments.offset();1179 int index = bytecode. index;1180 int value = bytecode. value.offset();1178 int arguments = bytecode.m_arguments.offset(); 1179 int index = bytecode.m_index; 1180 int value = bytecode.m_value.offset(); 1181 1181 1182 1182 emitWriteBarrier(arguments, value, ShouldFilterValue); -
trunk/Source/JavaScriptCore/llint/LLIntSlowPaths.cpp
r240023 r240041 1 1 /* 2 * Copyright (C) 2011-201 8Apple Inc. All rights reserved.2 * Copyright (C) 2011-2019 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 134 134 LLINT_CHECK_EXCEPTION(); \ 135 135 if (__b_condition) \ 136 JUMP_TO(JUMP_OFFSET(bytecode. target)); \136 JUMP_TO(JUMP_OFFSET(bytecode.m_target)); \ 137 137 else \ 138 138 JUMP_TO(pc->size()); \ … … 143 143 JSValue __r_returnValue = (value); \ 144 144 LLINT_CHECK_EXCEPTION(); \ 145 LLINT_OP(bytecode. dst) = __r_returnValue; \145 LLINT_OP(bytecode.m_dst) = __r_returnValue; \ 146 146 LLINT_END_IMPL(); \ 147 147 } while (false) … … 150 150 JSValue __rp_returnValue = (value); \ 151 151 LLINT_CHECK_EXCEPTION(); \ 152 LLINT_OP(bytecode. dst) = __rp_returnValue; \152 LLINT_OP(bytecode.m_dst) = __rp_returnValue; \ 153 153 LLINT_PROFILE_VALUE(__rp_returnValue); \ 154 154 LLINT_END_IMPL(); \ … … 156 156 157 157 #define LLINT_PROFILE_VALUE(value) do { \ 158 bytecode.metadata(exec). profile.m_buckets[0] = JSValue::encode(value); \158 bytecode.metadata(exec).m_profile.m_buckets[0] = JSValue::encode(value); \ 159 159 } while (false) 160 160 … … 572 572 auto bytecode = pc->as<OpNewObject>(); 573 573 auto& metadata = bytecode.metadata(exec); 574 LLINT_RETURN(constructEmptyObject(exec, metadata. objectAllocationProfile.structure()));574 LLINT_RETURN(constructEmptyObject(exec, metadata.m_objectAllocationProfile.structure())); 575 575 } 576 576 … … 580 580 auto bytecode = pc->as<OpNewArray>(); 581 581 auto& metadata = bytecode.metadata(exec); 582 LLINT_RETURN(constructArrayNegativeIndexed(exec, &metadata. arrayAllocationProfile, bitwise_cast<JSValue*>(&LLINT_OP(bytecode.argv)), bytecode.argc));582 LLINT_RETURN(constructArrayNegativeIndexed(exec, &metadata.m_arrayAllocationProfile, bitwise_cast<JSValue*>(&LLINT_OP(bytecode.m_argv)), bytecode.m_argc)); 583 583 } 584 584 … … 588 588 auto bytecode = pc->as<OpNewArrayWithSize>(); 589 589 auto& metadata = bytecode.metadata(exec); 590 LLINT_RETURN(constructArrayWithSizeQuirk(exec, &metadata. arrayAllocationProfile, exec->lexicalGlobalObject(), LLINT_OP_C(bytecode.length).jsValue()));590 LLINT_RETURN(constructArrayWithSizeQuirk(exec, &metadata.m_arrayAllocationProfile, exec->lexicalGlobalObject(), LLINT_OP_C(bytecode.m_length).jsValue())); 591 591 } 592 592 … … 595 595 LLINT_BEGIN(); 596 596 auto bytecode = pc->as<OpNewRegexp>(); 597 RegExp* regExp = jsCast<RegExp*>(LLINT_OP_C(bytecode. regexp).jsValue());597 RegExp* regExp = jsCast<RegExp*>(LLINT_OP_C(bytecode.m_regexp).jsValue()); 598 598 ASSERT(regExp->isValid()); 599 599 LLINT_RETURN(RegExpObject::create(vm, exec->lexicalGlobalObject()->regExpStructure(), regExp)); … … 604 604 LLINT_BEGIN(); 605 605 auto bytecode = pc->as<OpInstanceof>(); 606 JSValue value = LLINT_OP_C(bytecode. value).jsValue();607 JSValue proto = LLINT_OP_C(bytecode. prototype).jsValue();606 JSValue value = LLINT_OP_C(bytecode.m_value).jsValue(); 607 JSValue proto = LLINT_OP_C(bytecode.m_prototype).jsValue(); 608 608 LLINT_RETURN(jsBoolean(JSObject::defaultHasInstance(exec, value, proto))); 609 609 } … … 614 614 615 615 auto bytecode = pc->as<OpInstanceofCustom>(); 616 JSValue value = LLINT_OP_C(bytecode. value).jsValue();617 JSValue constructor = LLINT_OP_C(bytecode. constructor).jsValue();618 JSValue hasInstanceValue = LLINT_OP_C(bytecode. hasInstanceValue).jsValue();616 JSValue value = LLINT_OP_C(bytecode.m_value).jsValue(); 617 JSValue constructor = LLINT_OP_C(bytecode.m_constructor).jsValue(); 618 JSValue hasInstanceValue = LLINT_OP_C(bytecode.m_hasInstanceValue).jsValue(); 619 619 620 620 ASSERT(constructor.isObject()); … … 630 630 auto bytecode = pc->as<OpTryGetById>(); 631 631 CodeBlock* codeBlock = exec->codeBlock(); 632 const Identifier& ident = codeBlock->identifier(bytecode. property);633 JSValue baseValue = LLINT_OP_C(bytecode. base).jsValue();632 const Identifier& ident = codeBlock->identifier(bytecode.m_property); 633 JSValue baseValue = LLINT_OP_C(bytecode.m_base).jsValue(); 634 634 PropertySlot slot(baseValue, PropertySlot::PropertySlot::InternalMethodType::VMInquiry); 635 635 … … 645 645 auto bytecode = pc->as<OpGetByIdDirect>(); 646 646 CodeBlock* codeBlock = exec->codeBlock(); 647 const Identifier& ident = codeBlock->identifier(bytecode. property);648 JSValue baseValue = LLINT_OP_C(bytecode. base).jsValue();647 const Identifier& ident = codeBlock->identifier(bytecode.m_property); 648 JSValue baseValue = LLINT_OP_C(bytecode.m_base).jsValue(); 649 649 PropertySlot slot(baseValue, PropertySlot::PropertySlot::InternalMethodType::GetOwnProperty); 650 650 … … 657 657 auto& metadata = bytecode.metadata(exec); 658 658 { 659 StructureID oldStructureID = metadata. structure;659 StructureID oldStructureID = metadata.m_structure; 660 660 if (oldStructureID) { 661 661 Structure* a = vm.heap.structureIDTable().get(oldStructureID); … … 673 673 if (slot.isValue()) { 674 674 // Start out by clearing out the old cache. 675 metadata. structure = 0;676 metadata. offset = 0;675 metadata.m_structure = 0; 676 metadata.m_offset = 0; 677 677 678 678 if (structure->propertyAccessesAreCacheable() … … 682 682 ConcurrentJSLocker locker(codeBlock->m_lock); 683 683 684 metadata. structure = structure->id();685 metadata. offset = slot.cachedOffset();684 metadata.m_structure = structure->id(); 685 metadata.m_offset = slot.cachedOffset(); 686 686 } 687 687 } … … 736 736 737 737 if (slot.isUnset()) { 738 metadata.m ode = GetByIdMode::Unset;739 metadata.m odeMetadata.unsetMode.structure = structure->id();738 metadata.m_mode = GetByIdMode::Unset; 739 metadata.m_modeMetadata.unsetMode.structure = structure->id(); 740 740 return; 741 741 } 742 742 ASSERT(slot.isValue()); 743 743 744 metadata.m ode = GetByIdMode::ProtoLoad;745 metadata.m odeMetadata.protoLoadMode.structure = structure->id();746 metadata.m odeMetadata.protoLoadMode.cachedOffset = offset;747 metadata.m odeMetadata.protoLoadMode.cachedSlot = slot.slotBase();744 metadata.m_mode = GetByIdMode::ProtoLoad; 745 metadata.m_modeMetadata.protoLoadMode.structure = structure->id(); 746 metadata.m_modeMetadata.protoLoadMode.cachedOffset = offset; 747 metadata.m_modeMetadata.protoLoadMode.cachedSlot = slot.slotBase(); 748 748 // We know that this pointer will remain valid because it will be cleared by either a watchpoint fire or 749 749 // during GC when we clear the LLInt caches. 750 metadata.m odeMetadata.protoLoadMode.cachedSlot = slot.slotBase();750 metadata.m_modeMetadata.protoLoadMode.cachedSlot = slot.slotBase(); 751 751 } 752 752 … … 758 758 auto& metadata = bytecode.metadata(exec); 759 759 CodeBlock* codeBlock = exec->codeBlock(); 760 const Identifier& ident = codeBlock->identifier(bytecode. property);761 JSValue baseValue = LLINT_OP_C(bytecode. base).jsValue();760 const Identifier& ident = codeBlock->identifier(bytecode.m_property); 761 JSValue baseValue = LLINT_OP_C(bytecode.m_base).jsValue(); 762 762 PropertySlot slot(baseValue, PropertySlot::PropertySlot::InternalMethodType::Get); 763 763 764 764 JSValue result = baseValue.get(exec, ident, slot); 765 765 LLINT_CHECK_EXCEPTION(); 766 LLINT_OP(bytecode. dst) = result;766 LLINT_OP(bytecode.m_dst) = result; 767 767 768 768 if (!LLINT_ALWAYS_ACCESS_SLOW … … 771 771 { 772 772 StructureID oldStructureID; 773 auto mode = metadata.m ode;773 auto mode = metadata.m_mode; 774 774 switch (mode) { 775 775 case GetByIdMode::Default: 776 oldStructureID = metadata.m odeMetadata.defaultMode.structure;776 oldStructureID = metadata.m_modeMetadata.defaultMode.structure; 777 777 break; 778 778 case GetByIdMode::Unset: 779 oldStructureID = metadata.m odeMetadata.unsetMode.structure;779 oldStructureID = metadata.m_modeMetadata.unsetMode.structure; 780 780 break; 781 781 case GetByIdMode::ProtoLoad: 782 oldStructureID = metadata.m odeMetadata.protoLoadMode.structure;782 oldStructureID = metadata.m_modeMetadata.protoLoadMode.structure; 783 783 break; 784 784 default: … … 800 800 if (slot.isValue() && slot.slotBase() == baseValue) { 801 801 // Start out by clearing out the old cache. 802 metadata.m ode = GetByIdMode::Default;803 metadata.m odeMetadata.defaultMode.structure = 0;804 metadata.m odeMetadata.defaultMode.cachedOffset = 0;802 metadata.m_mode = GetByIdMode::Default; 803 metadata.m_modeMetadata.defaultMode.structure = 0; 804 metadata.m_modeMetadata.defaultMode.cachedOffset = 0; 805 805 806 806 // Prevent the prototype cache from ever happening. 807 metadata. hitCountForLLIntCaching = 0;807 metadata.m_hitCountForLLIntCaching = 0; 808 808 809 809 if (structure->propertyAccessesAreCacheable() … … 813 813 ConcurrentJSLocker locker(codeBlock->m_lock); 814 814 815 metadata.m odeMetadata.defaultMode.structure = structure->id();816 metadata.m odeMetadata.defaultMode.cachedOffset = slot.cachedOffset();815 metadata.m_modeMetadata.defaultMode.structure = structure->id(); 816 metadata.m_modeMetadata.defaultMode.cachedOffset = slot.cachedOffset(); 817 817 } 818 } else if (UNLIKELY(metadata. hitCountForLLIntCaching && (slot.isValue() || slot.isUnset()))) {818 } else if (UNLIKELY(metadata.m_hitCountForLLIntCaching && (slot.isValue() || slot.isUnset()))) { 819 819 ASSERT(slot.slotBase() != baseValue); 820 820 821 if (!(--metadata. hitCountForLLIntCaching))821 if (!(--metadata.m_hitCountForLLIntCaching)) 822 822 setupGetByIdPrototypeCache(exec, vm, pc, metadata, baseCell, slot, ident); 823 823 } … … 825 825 && isJSArray(baseValue) 826 826 && ident == vm.propertyNames->length) { 827 metadata.m ode = GetByIdMode::ArrayLength;828 new (&metadata.m odeMetadata.arrayLengthMode.arrayProfile) ArrayProfile(codeBlock->bytecodeOffset(pc));829 metadata.m odeMetadata.arrayLengthMode.arrayProfile.observeStructure(baseValue.asCell()->structure(vm));827 metadata.m_mode = GetByIdMode::ArrayLength; 828 new (&metadata.m_modeMetadata.arrayLengthMode.arrayProfile) ArrayProfile(codeBlock->bytecodeOffset(pc)); 829 metadata.m_modeMetadata.arrayLengthMode.arrayProfile.observeStructure(baseValue.asCell()->structure(vm)); 830 830 831 831 // Prevent the prototype cache from ever happening. 832 metadata. hitCountForLLIntCaching = 0;832 metadata.m_hitCountForLLIntCaching = 0; 833 833 } 834 834 … … 843 843 auto& metadata = bytecode.metadata(exec); 844 844 CodeBlock* codeBlock = exec->codeBlock(); 845 const Identifier& ident = codeBlock->identifier(bytecode. property);846 847 JSValue baseValue = LLINT_OP_C(bytecode. base).jsValue();845 const Identifier& ident = codeBlock->identifier(bytecode.m_property); 846 847 JSValue baseValue = LLINT_OP_C(bytecode.m_base).jsValue(); 848 848 PutPropertySlot slot(baseValue, codeBlock->isStrictMode(), codeBlock->putByIdContext()); 849 if (bytecode. flags & PutByIdIsDirect)850 CommonSlowPaths::putDirectWithReify(vm, exec, asObject(baseValue), ident, LLINT_OP_C(bytecode. value).jsValue(), slot);849 if (bytecode.m_flags & PutByIdIsDirect) 850 CommonSlowPaths::putDirectWithReify(vm, exec, asObject(baseValue), ident, LLINT_OP_C(bytecode.m_value).jsValue(), slot); 851 851 else 852 baseValue.putInline(exec, ident, LLINT_OP_C(bytecode. value).jsValue(), slot);852 baseValue.putInline(exec, ident, LLINT_OP_C(bytecode.m_value).jsValue(), slot); 853 853 LLINT_CHECK_EXCEPTION(); 854 854 … … 858 858 859 859 { 860 StructureID oldStructureID = metadata. oldStructure;860 StructureID oldStructureID = metadata.m_oldStructure; 861 861 if (oldStructureID) { 862 862 Structure* a = vm.heap.structureIDTable().get(oldStructureID); … … 873 873 874 874 // Start out by clearing out the old cache. 875 metadata. oldStructure = 0;876 metadata. offset = 0;877 metadata. newStructure = 0;878 metadata. structureChain.clear();875 metadata.m_oldStructure = 0; 876 metadata.m_offset = 0; 877 metadata.m_newStructure = 0; 878 metadata.m_structureChain.clear(); 879 879 880 880 JSCell* baseCell = baseValue.asCell(); … … 897 897 if (result != InvalidPrototypeChain && !sawPolyProto) { 898 898 ASSERT(structure->previousID()->isObject()); 899 metadata. oldStructure = structure->previousID()->id();900 metadata. offset = slot.cachedOffset();901 metadata. newStructure = structure->id();902 if (!(bytecode. flags & PutByIdIsDirect)) {899 metadata.m_oldStructure = structure->previousID()->id(); 900 metadata.m_offset = slot.cachedOffset(); 901 metadata.m_newStructure = structure->id(); 902 if (!(bytecode.m_flags & PutByIdIsDirect)) { 903 903 StructureChain* chain = structure->prototypeChain(exec, asObject(baseCell)); 904 904 ASSERT(chain); 905 metadata. structureChain.set(vm, codeBlock, chain);905 metadata.m_structureChain.set(vm, codeBlock, chain); 906 906 } 907 907 } … … 909 909 } else { 910 910 structure->didCachePropertyReplacement(vm, slot.cachedOffset()); 911 metadata. oldStructure = structure->id();912 metadata. offset = slot.cachedOffset();911 metadata.m_oldStructure = structure->id(); 912 metadata.m_offset = slot.cachedOffset(); 913 913 } 914 914 } … … 923 923 auto bytecode = pc->as<OpDelById>(); 924 924 CodeBlock* codeBlock = exec->codeBlock(); 925 JSObject* baseObject = LLINT_OP_C(bytecode. base).jsValue().toObject(exec);925 JSObject* baseObject = LLINT_OP_C(bytecode.m_base).jsValue().toObject(exec); 926 926 LLINT_CHECK_EXCEPTION(); 927 bool couldDelete = baseObject->methodTable(vm)->deleteProperty(baseObject, exec, codeBlock->identifier(bytecode. property));927 bool couldDelete = baseObject->methodTable(vm)->deleteProperty(baseObject, exec, codeBlock->identifier(bytecode.m_property)); 928 928 LLINT_CHECK_EXCEPTION(); 929 929 if (!couldDelete && codeBlock->isStrictMode()) … … 934 934 static ALWAYS_INLINE JSValue getByVal(VM& vm, ExecState* exec, OpGetByVal bytecode) 935 935 { 936 JSValue baseValue = LLINT_OP_C(bytecode. base).jsValue();937 JSValue subscript = LLINT_OP_C(bytecode. property).jsValue();936 JSValue baseValue = LLINT_OP_C(bytecode.m_base).jsValue(); 937 JSValue subscript = LLINT_OP_C(bytecode.m_property).jsValue(); 938 938 auto scope = DECLARE_THROW_SCOPE(vm); 939 939 … … 951 951 uint32_t i = subscript.asUInt32(); 952 952 auto& metadata = bytecode.metadata(exec); 953 ArrayProfile* arrayProfile = &metadata. arrayProfile;953 ArrayProfile* arrayProfile = &metadata.m_arrayProfile; 954 954 955 955 if (isJSString(baseValue)) { … … 1001 1001 1002 1002 auto bytecode = pc->as<OpPutByVal>(); 1003 JSValue baseValue = LLINT_OP_C(bytecode. base).jsValue();1004 JSValue subscript = LLINT_OP_C(bytecode. property).jsValue();1005 JSValue value = LLINT_OP_C(bytecode. value).jsValue();1003 JSValue baseValue = LLINT_OP_C(bytecode.m_base).jsValue(); 1004 JSValue subscript = LLINT_OP_C(bytecode.m_property).jsValue(); 1005 JSValue value = LLINT_OP_C(bytecode.m_value).jsValue(); 1006 1006 bool isStrictMode = exec->codeBlock()->isStrictMode(); 1007 1007 … … 1032 1032 1033 1033 auto bytecode = pc->as<OpPutByValDirect>(); 1034 JSValue baseValue = LLINT_OP_C(bytecode. base).jsValue();1035 JSValue subscript = LLINT_OP_C(bytecode. property).jsValue();1036 JSValue value = LLINT_OP_C(bytecode. value).jsValue();1034 JSValue baseValue = LLINT_OP_C(bytecode.m_base).jsValue(); 1035 JSValue subscript = LLINT_OP_C(bytecode.m_property).jsValue(); 1036 JSValue value = LLINT_OP_C(bytecode.m_value).jsValue(); 1037 1037 RELEASE_ASSERT(baseValue.isObject()); 1038 1038 JSObject* baseObject = asObject(baseValue); … … 1072 1072 LLINT_BEGIN(); 1073 1073 auto bytecode = pc->as<OpDelByVal>(); 1074 JSValue baseValue = LLINT_OP_C(bytecode. base).jsValue();1074 JSValue baseValue = LLINT_OP_C(bytecode.m_base).jsValue(); 1075 1075 JSObject* baseObject = baseValue.toObject(exec); 1076 1076 LLINT_CHECK_EXCEPTION(); 1077 1077 1078 JSValue subscript = LLINT_OP_C(bytecode. property).jsValue();1078 JSValue subscript = LLINT_OP_C(bytecode.m_property).jsValue(); 1079 1079 1080 1080 bool couldDelete; … … 1101 1101 LLINT_BEGIN(); 1102 1102 auto bytecode = pc->as<OpPutGetterById>(); 1103 ASSERT(LLINT_OP(bytecode. base).jsValue().isObject());1104 JSObject* baseObj = asObject(LLINT_OP(bytecode. base).jsValue());1105 1106 unsigned options = bytecode. attributes;1107 1108 JSValue getter = LLINT_OP(bytecode. accessor).jsValue();1103 ASSERT(LLINT_OP(bytecode.m_base).jsValue().isObject()); 1104 JSObject* baseObj = asObject(LLINT_OP(bytecode.m_base).jsValue()); 1105 1106 unsigned options = bytecode.m_attributes; 1107 1108 JSValue getter = LLINT_OP(bytecode.m_accessor).jsValue(); 1109 1109 ASSERT(getter.isObject()); 1110 1110 1111 baseObj->putGetter(exec, exec->codeBlock()->identifier(bytecode. property), asObject(getter), options);1111 baseObj->putGetter(exec, exec->codeBlock()->identifier(bytecode.m_property), asObject(getter), options); 1112 1112 LLINT_END(); 1113 1113 } … … 1117 1117 LLINT_BEGIN(); 1118 1118 auto bytecode = pc->as<OpPutSetterById>(); 1119 ASSERT(LLINT_OP(bytecode. base).jsValue().isObject());1120 JSObject* baseObj = asObject(LLINT_OP(bytecode. base).jsValue());1121 1122 unsigned options = bytecode. attributes;1123 1124 JSValue setter = LLINT_OP(bytecode. accessor).jsValue();1119 ASSERT(LLINT_OP(bytecode.m_base).jsValue().isObject()); 1120 JSObject* baseObj = asObject(LLINT_OP(bytecode.m_base).jsValue()); 1121 1122 unsigned options = bytecode.m_attributes; 1123 1124 JSValue setter = LLINT_OP(bytecode.m_accessor).jsValue(); 1125 1125 ASSERT(setter.isObject()); 1126 1126 1127 baseObj->putSetter(exec, exec->codeBlock()->identifier(bytecode. property), asObject(setter), options);1127 baseObj->putSetter(exec, exec->codeBlock()->identifier(bytecode.m_property), asObject(setter), options); 1128 1128 LLINT_END(); 1129 1129 } … … 1133 1133 LLINT_BEGIN(); 1134 1134 auto bytecode = pc->as<OpPutGetterSetterById>(); 1135 ASSERT(LLINT_OP(bytecode. base).jsValue().isObject());1136 JSObject* baseObject = asObject(LLINT_OP(bytecode. base).jsValue());1137 1138 JSValue getter = LLINT_OP(bytecode. getter).jsValue();1139 JSValue setter = LLINT_OP(bytecode. setter).jsValue();1135 ASSERT(LLINT_OP(bytecode.m_base).jsValue().isObject()); 1136 JSObject* baseObject = asObject(LLINT_OP(bytecode.m_base).jsValue()); 1137 1138 JSValue getter = LLINT_OP(bytecode.m_getter).jsValue(); 1139 JSValue setter = LLINT_OP(bytecode.m_setter).jsValue(); 1140 1140 ASSERT(getter.isObject() || setter.isObject()); 1141 1141 GetterSetter* accessor = GetterSetter::create(vm, exec->lexicalGlobalObject(), getter, setter); 1142 1142 1143 CommonSlowPaths::putDirectAccessorWithReify(vm, exec, baseObject, exec->codeBlock()->identifier(bytecode. property), accessor, bytecode.attributes);1143 CommonSlowPaths::putDirectAccessorWithReify(vm, exec, baseObject, exec->codeBlock()->identifier(bytecode.m_property), accessor, bytecode.m_attributes); 1144 1144 LLINT_END(); 1145 1145 } … … 1149 1149 LLINT_BEGIN(); 1150 1150 auto bytecode = pc->as<OpPutGetterByVal>(); 1151 ASSERT(LLINT_OP(bytecode. base).jsValue().isObject());1152 JSObject* baseObj = asObject(LLINT_OP(bytecode. base).jsValue());1153 JSValue subscript = LLINT_OP_C(bytecode. property).jsValue();1154 1155 unsigned options = bytecode. attributes;1156 1157 JSValue getter = LLINT_OP(bytecode. accessor).jsValue();1151 ASSERT(LLINT_OP(bytecode.m_base).jsValue().isObject()); 1152 JSObject* baseObj = asObject(LLINT_OP(bytecode.m_base).jsValue()); 1153 JSValue subscript = LLINT_OP_C(bytecode.m_property).jsValue(); 1154 1155 unsigned options = bytecode.m_attributes; 1156 1157 JSValue getter = LLINT_OP(bytecode.m_accessor).jsValue(); 1158 1158 ASSERT(getter.isObject()); 1159 1159 … … 1169 1169 LLINT_BEGIN(); 1170 1170 auto bytecode = pc->as<OpPutSetterByVal>(); 1171 ASSERT(LLINT_OP(bytecode. base).jsValue().isObject());1172 JSObject* baseObj = asObject(LLINT_OP(bytecode. base).jsValue());1173 JSValue subscript = LLINT_OP_C(bytecode. property).jsValue();1174 1175 unsigned options = bytecode. attributes;1176 1177 JSValue setter = LLINT_OP(bytecode. accessor).jsValue();1171 ASSERT(LLINT_OP(bytecode.m_base).jsValue().isObject()); 1172 JSObject* baseObj = asObject(LLINT_OP(bytecode.m_base).jsValue()); 1173 JSValue subscript = LLINT_OP_C(bytecode.m_property).jsValue(); 1174 1175 unsigned options = bytecode.m_attributes; 1176 1177 JSValue setter = LLINT_OP(bytecode.m_accessor).jsValue(); 1178 1178 ASSERT(setter.isObject()); 1179 1179 … … 1189 1189 LLINT_BEGIN(); 1190 1190 auto bytecode = pc->as<OpJtrue>(); 1191 LLINT_BRANCH(LLINT_OP_C(bytecode. condition).jsValue().toBoolean(exec));1191 LLINT_BRANCH(LLINT_OP_C(bytecode.m_condition).jsValue().toBoolean(exec)); 1192 1192 } 1193 1193 … … 1196 1196 LLINT_BEGIN(); 1197 1197 auto bytecode = pc->as<OpJfalse>(); 1198 LLINT_BRANCH(!LLINT_OP_C(bytecode. condition).jsValue().toBoolean(exec));1198 LLINT_BRANCH(!LLINT_OP_C(bytecode.m_condition).jsValue().toBoolean(exec)); 1199 1199 } 1200 1200 … … 1203 1203 LLINT_BEGIN(); 1204 1204 auto bytecode = pc->as<OpJless>(); 1205 LLINT_BRANCH(jsLess<true>(exec, LLINT_OP_C(bytecode. lhs).jsValue(), LLINT_OP_C(bytecode.rhs).jsValue()));1205 LLINT_BRANCH(jsLess<true>(exec, LLINT_OP_C(bytecode.m_lhs).jsValue(), LLINT_OP_C(bytecode.m_rhs).jsValue())); 1206 1206 } 1207 1207 … … 1210 1210 LLINT_BEGIN(); 1211 1211 auto bytecode = pc->as<OpJnless>(); 1212 LLINT_BRANCH(!jsLess<true>(exec, LLINT_OP_C(bytecode. lhs).jsValue(), LLINT_OP_C(bytecode.rhs).jsValue()));1212 LLINT_BRANCH(!jsLess<true>(exec, LLINT_OP_C(bytecode.m_lhs).jsValue(), LLINT_OP_C(bytecode.m_rhs).jsValue())); 1213 1213 } 1214 1214 … … 1217 1217 LLINT_BEGIN(); 1218 1218 auto bytecode = pc->as<OpJgreater>(); 1219 LLINT_BRANCH(jsLess<false>(exec, LLINT_OP_C(bytecode. rhs).jsValue(), LLINT_OP_C(bytecode.lhs).jsValue()));1219 LLINT_BRANCH(jsLess<false>(exec, LLINT_OP_C(bytecode.m_rhs).jsValue(), LLINT_OP_C(bytecode.m_lhs).jsValue())); 1220 1220 } 1221 1221 … … 1224 1224 LLINT_BEGIN(); 1225 1225 auto bytecode = pc->as<OpJngreater>(); 1226 LLINT_BRANCH(!jsLess<false>(exec, LLINT_OP_C(bytecode. rhs).jsValue(), LLINT_OP_C(bytecode.lhs).jsValue()));1226 LLINT_BRANCH(!jsLess<false>(exec, LLINT_OP_C(bytecode.m_rhs).jsValue(), LLINT_OP_C(bytecode.m_lhs).jsValue())); 1227 1227 } 1228 1228 … … 1231 1231 LLINT_BEGIN(); 1232 1232 auto bytecode = pc->as<OpJlesseq>(); 1233 LLINT_BRANCH(jsLessEq<true>(exec, LLINT_OP_C(bytecode. lhs).jsValue(), LLINT_OP_C(bytecode.rhs).jsValue()));1233 LLINT_BRANCH(jsLessEq<true>(exec, LLINT_OP_C(bytecode.m_lhs).jsValue(), LLINT_OP_C(bytecode.m_rhs).jsValue())); 1234 1234 } 1235 1235 … … 1238 1238 LLINT_BEGIN(); 1239 1239 auto bytecode = pc->as<OpJnlesseq>(); 1240 LLINT_BRANCH(!jsLessEq<true>(exec, LLINT_OP_C(bytecode. lhs).jsValue(), LLINT_OP_C(bytecode.rhs).jsValue()));1240 LLINT_BRANCH(!jsLessEq<true>(exec, LLINT_OP_C(bytecode.m_lhs).jsValue(), LLINT_OP_C(bytecode.m_rhs).jsValue())); 1241 1241 } 1242 1242 … … 1245 1245 LLINT_BEGIN(); 1246 1246 auto bytecode = pc->as<OpJgreatereq>(); 1247 LLINT_BRANCH(jsLessEq<false>(exec, LLINT_OP_C(bytecode. rhs).jsValue(), LLINT_OP_C(bytecode.lhs).jsValue()));1247 LLINT_BRANCH(jsLessEq<false>(exec, LLINT_OP_C(bytecode.m_rhs).jsValue(), LLINT_OP_C(bytecode.m_lhs).jsValue())); 1248 1248 } 1249 1249 … … 1252 1252 LLINT_BEGIN(); 1253 1253 auto bytecode = pc->as<OpJngreatereq>(); 1254 LLINT_BRANCH(!jsLessEq<false>(exec, LLINT_OP_C(bytecode. rhs).jsValue(), LLINT_OP_C(bytecode.lhs).jsValue()));1254 LLINT_BRANCH(!jsLessEq<false>(exec, LLINT_OP_C(bytecode.m_rhs).jsValue(), LLINT_OP_C(bytecode.m_lhs).jsValue())); 1255 1255 } 1256 1256 … … 1259 1259 LLINT_BEGIN(); 1260 1260 auto bytecode = pc->as<OpJeq>(); 1261 LLINT_BRANCH(JSValue::equal(exec, LLINT_OP_C(bytecode. lhs).jsValue(), LLINT_OP_C(bytecode.rhs).jsValue()));1261 LLINT_BRANCH(JSValue::equal(exec, LLINT_OP_C(bytecode.m_lhs).jsValue(), LLINT_OP_C(bytecode.m_rhs).jsValue())); 1262 1262 } 1263 1263 … … 1266 1266 LLINT_BEGIN(); 1267 1267 auto bytecode = pc->as<OpJneq>(); 1268 LLINT_BRANCH(!JSValue::equal(exec, LLINT_OP_C(bytecode. lhs).jsValue(), LLINT_OP_C(bytecode.rhs).jsValue()));1268 LLINT_BRANCH(!JSValue::equal(exec, LLINT_OP_C(bytecode.m_lhs).jsValue(), LLINT_OP_C(bytecode.m_rhs).jsValue())); 1269 1269 } 1270 1270 … … 1273 1273 LLINT_BEGIN(); 1274 1274 auto bytecode = pc->as<OpJstricteq>(); 1275 LLINT_BRANCH(JSValue::strictEqual(exec, LLINT_OP_C(bytecode. lhs).jsValue(), LLINT_OP_C(bytecode.rhs).jsValue()));1275 LLINT_BRANCH(JSValue::strictEqual(exec, LLINT_OP_C(bytecode.m_lhs).jsValue(), LLINT_OP_C(bytecode.m_rhs).jsValue())); 1276 1276 } 1277 1277 … … 1280 1280 LLINT_BEGIN(); 1281 1281 auto bytecode = pc->as<OpJnstricteq>(); 1282 LLINT_BRANCH(!JSValue::strictEqual(exec, LLINT_OP_C(bytecode. lhs).jsValue(), LLINT_OP_C(bytecode.rhs).jsValue()));1282 LLINT_BRANCH(!JSValue::strictEqual(exec, LLINT_OP_C(bytecode.m_lhs).jsValue(), LLINT_OP_C(bytecode.m_rhs).jsValue())); 1283 1283 } 1284 1284 … … 1287 1287 LLINT_BEGIN(); 1288 1288 auto bytecode = pc->as<OpSwitchImm>(); 1289 JSValue scrutinee = LLINT_OP_C(bytecode. scrutinee).jsValue();1289 JSValue scrutinee = LLINT_OP_C(bytecode.m_scrutinee).jsValue(); 1290 1290 ASSERT(scrutinee.isDouble()); 1291 1291 double value = scrutinee.asDouble(); 1292 1292 int32_t intValue = static_cast<int32_t>(value); 1293 int defaultOffset = JUMP_OFFSET(bytecode. defaultOffset);1293 int defaultOffset = JUMP_OFFSET(bytecode.m_defaultOffset); 1294 1294 if (value == intValue) { 1295 1295 CodeBlock* codeBlock = exec->codeBlock(); 1296 JUMP_TO(codeBlock->switchJumpTable(bytecode. tableIndex).offsetForValue(intValue, defaultOffset));1296 JUMP_TO(codeBlock->switchJumpTable(bytecode.m_tableIndex).offsetForValue(intValue, defaultOffset)); 1297 1297 } else 1298 1298 JUMP_TO(defaultOffset); … … 1304 1304 LLINT_BEGIN(); 1305 1305 auto bytecode = pc->as<OpSwitchChar>(); 1306 JSValue scrutinee = LLINT_OP_C(bytecode. scrutinee).jsValue();1306 JSValue scrutinee = LLINT_OP_C(bytecode.m_scrutinee).jsValue(); 1307 1307 ASSERT(scrutinee.isString()); 1308 1308 JSString* string = asString(scrutinee); 1309 1309 ASSERT(string->length() == 1); 1310 int defaultOffset = JUMP_OFFSET(bytecode. defaultOffset);1310 int defaultOffset = JUMP_OFFSET(bytecode.m_defaultOffset); 1311 1311 StringImpl* impl = string->value(exec).impl(); 1312 1312 CodeBlock* codeBlock = exec->codeBlock(); 1313 JUMP_TO(codeBlock->switchJumpTable(bytecode. tableIndex).offsetForValue((*impl)[0], defaultOffset));1313 JUMP_TO(codeBlock->switchJumpTable(bytecode.m_tableIndex).offsetForValue((*impl)[0], defaultOffset)); 1314 1314 LLINT_END(); 1315 1315 } … … 1319 1319 LLINT_BEGIN(); 1320 1320 auto bytecode = pc->as<OpSwitchString>(); 1321 JSValue scrutinee = LLINT_OP_C(bytecode. scrutinee).jsValue();1322 int defaultOffset = JUMP_OFFSET(bytecode. defaultOffset);1321 JSValue scrutinee = LLINT_OP_C(bytecode.m_scrutinee).jsValue(); 1322 int defaultOffset = JUMP_OFFSET(bytecode.m_defaultOffset); 1323 1323 if (!scrutinee.isString()) 1324 1324 JUMP_TO(defaultOffset); 1325 1325 else { 1326 1326 CodeBlock* codeBlock = exec->codeBlock(); 1327 JUMP_TO(codeBlock->stringSwitchJumpTable(bytecode. tableIndex).offsetForValue(asString(scrutinee)->value(exec).impl(), defaultOffset));1327 JUMP_TO(codeBlock->stringSwitchJumpTable(bytecode.m_tableIndex).offsetForValue(asString(scrutinee)->value(exec).impl(), defaultOffset)); 1328 1328 } 1329 1329 LLINT_END(); … … 1335 1335 auto bytecode = pc->as<OpNewFunc>(); 1336 1336 CodeBlock* codeBlock = exec->codeBlock(); 1337 JSScope* scope = exec->uncheckedR(bytecode. scope).Register::scope();1337 JSScope* scope = exec->uncheckedR(bytecode.m_scope).Register::scope(); 1338 1338 slowPathLogF("Creating function!\n"); 1339 LLINT_RETURN(JSFunction::create(vm, codeBlock->functionDecl(bytecode. functionDecl), scope));1339 LLINT_RETURN(JSFunction::create(vm, codeBlock->functionDecl(bytecode.m_functionDecl), scope)); 1340 1340 } 1341 1341 … … 1345 1345 auto bytecode = pc->as<OpNewGeneratorFunc>(); 1346 1346 CodeBlock* codeBlock = exec->codeBlock(); 1347 JSScope* scope = exec->uncheckedR(bytecode. scope).Register::scope();1347 JSScope* scope = exec->uncheckedR(bytecode.m_scope).Register::scope(); 1348 1348 slowPathLogF("Creating function!\n"); 1349 LLINT_RETURN(JSGeneratorFunction::create(vm, codeBlock->functionDecl(bytecode. functionDecl), scope));1349 LLINT_RETURN(JSGeneratorFunction::create(vm, codeBlock->functionDecl(bytecode.m_functionDecl), scope)); 1350 1350 } 1351 1351 … … 1355 1355 auto bytecode = pc->as<OpNewAsyncFunc>(); 1356 1356 CodeBlock* codeBlock = exec->codeBlock(); 1357 JSScope* scope = exec->uncheckedR(bytecode. scope).Register::scope();1357 JSScope* scope = exec->uncheckedR(bytecode.m_scope).Register::scope(); 1358 1358 slowPathLogF("Creating async function!\n"); 1359 LLINT_RETURN(JSAsyncFunction::create(vm, codeBlock->functionDecl(bytecode. functionDecl), scope));1359 LLINT_RETURN(JSAsyncFunction::create(vm, codeBlock->functionDecl(bytecode.m_functionDecl), scope)); 1360 1360 } 1361 1361 … … 1365 1365 auto bytecode = pc->as<OpNewAsyncGeneratorFunc>(); 1366 1366 CodeBlock* codeBlock = exec->codeBlock(); 1367 JSScope* scope = exec->uncheckedR(bytecode. scope).Register::scope();1367 JSScope* scope = exec->uncheckedR(bytecode.m_scope).Register::scope(); 1368 1368 slowPathLogF("Creating async generator function!\n"); 1369 LLINT_RETURN(JSAsyncGeneratorFunction::create(vm, codeBlock->functionDecl(bytecode. functionDecl), scope));1369 LLINT_RETURN(JSAsyncGeneratorFunction::create(vm, codeBlock->functionDecl(bytecode.m_functionDecl), scope)); 1370 1370 } 1371 1371 … … 1376 1376 auto bytecode = pc->as<OpNewFuncExp>(); 1377 1377 CodeBlock* codeBlock = exec->codeBlock(); 1378 JSScope* scope = exec->uncheckedR(bytecode. scope).Register::scope();1379 FunctionExecutable* executable = codeBlock->functionExpr(bytecode. functionDecl);1378 JSScope* scope = exec->uncheckedR(bytecode.m_scope).Register::scope(); 1379 FunctionExecutable* executable = codeBlock->functionExpr(bytecode.m_functionDecl); 1380 1380 1381 1381 LLINT_RETURN(JSFunction::create(vm, executable, scope)); … … 1388 1388 auto bytecode = pc->as<OpNewGeneratorFuncExp>(); 1389 1389 CodeBlock* codeBlock = exec->codeBlock(); 1390 JSScope* scope = exec->uncheckedR(bytecode. scope).Register::scope();1391 FunctionExecutable* executable = codeBlock->functionExpr(bytecode. functionDecl);1390 JSScope* scope = exec->uncheckedR(bytecode.m_scope).Register::scope(); 1391 FunctionExecutable* executable = codeBlock->functionExpr(bytecode.m_functionDecl); 1392 1392 1393 1393 LLINT_RETURN(JSGeneratorFunction::create(vm, executable, scope)); … … 1400 1400 auto bytecode = pc->as<OpNewAsyncFuncExp>(); 1401 1401 CodeBlock* codeBlock = exec->codeBlock(); 1402 JSScope* scope = exec->uncheckedR(bytecode. scope).Register::scope();1403 FunctionExecutable* executable = codeBlock->functionExpr(bytecode. functionDecl);1402 JSScope* scope = exec->uncheckedR(bytecode.m_scope).Register::scope(); 1403 FunctionExecutable* executable = codeBlock->functionExpr(bytecode.m_functionDecl); 1404 1404 1405 1405 LLINT_RETURN(JSAsyncFunction::create(vm, executable, scope)); … … 1412 1412 auto bytecode = pc->as<OpNewAsyncGeneratorFuncExp>(); 1413 1413 CodeBlock* codeBlock = exec->codeBlock(); 1414 JSScope* scope = exec->uncheckedR(bytecode. scope).Register::scope();1415 FunctionExecutable* executable = codeBlock->functionExpr(bytecode. functionDecl);1414 JSScope* scope = exec->uncheckedR(bytecode.m_scope).Register::scope(); 1415 FunctionExecutable* executable = codeBlock->functionExpr(bytecode.m_functionDecl); 1416 1416 1417 1417 LLINT_RETURN(JSAsyncGeneratorFunction::create(vm, executable, scope)); … … 1422 1422 LLINT_BEGIN(); 1423 1423 auto bytecode = pc->as<OpSetFunctionName>(); 1424 JSFunction* func = jsCast<JSFunction*>(LLINT_OP(bytecode. function).Register::unboxedCell());1425 JSValue name = LLINT_OP_C(bytecode. name).Register::jsValue();1424 JSFunction* func = jsCast<JSFunction*>(LLINT_OP(bytecode.m_function).Register::unboxedCell()); 1425 JSValue name = LLINT_OP_C(bytecode.m_name).Register::jsValue(); 1426 1426 func->setFunctionName(exec, name); 1427 1427 LLINT_END(); … … 1573 1573 // - Return a tuple of machine code address to call and the new call frame. 1574 1574 1575 JSValue calleeAsValue = LLINT_OP_C(bytecode. callee).jsValue();1576 1577 ExecState* execCallee = exec - bytecode. argv;1578 1579 execCallee->setArgumentCountIncludingThis(bytecode. argc);1575 JSValue calleeAsValue = LLINT_OP_C(bytecode.m_callee).jsValue(); 1576 1577 ExecState* execCallee = exec - bytecode.m_argv; 1578 1579 execCallee->setArgumentCountIncludingThis(bytecode.m_argc); 1580 1580 execCallee->uncheckedR(CallFrameSlot::callee) = calleeAsValue; 1581 1581 execCallee->setCallerFrame(exec); 1582 1582 1583 1583 auto& metadata = bytecode.metadata(exec); 1584 return setUpCall(execCallee, kind, calleeAsValue, &metadata. callLinkInfo);1584 return setUpCall(execCallee, kind, calleeAsValue, &metadata.m_callLinkInfo); 1585 1585 } 1586 1586 … … 1615 1615 case op_call_varargs: { 1616 1616 auto bytecode = pc->as<OpCallVarargs>(); 1617 numUsedStackSlots = -bytecode. firstFree.offset();1618 arguments = LLINT_OP_C(bytecode. arguments).jsValue();1619 firstVarArg = bytecode. firstVarArg;1617 numUsedStackSlots = -bytecode.m_firstFree.offset(); 1618 arguments = LLINT_OP_C(bytecode.m_arguments).jsValue(); 1619 firstVarArg = bytecode.m_firstVarArg; 1620 1620 break; 1621 1621 } 1622 1622 case op_tail_call_varargs: { 1623 1623 auto bytecode = pc->as<OpTailCallVarargs>(); 1624 numUsedStackSlots = -bytecode. firstFree.offset();1625 arguments = LLINT_OP_C(bytecode. arguments).jsValue();1626 firstVarArg = bytecode. firstVarArg;1624 numUsedStackSlots = -bytecode.m_firstFree.offset(); 1625 arguments = LLINT_OP_C(bytecode.m_arguments).jsValue(); 1626 firstVarArg = bytecode.m_firstVarArg; 1627 1627 break; 1628 1628 } 1629 1629 case op_construct_varargs: { 1630 1630 auto bytecode = pc->as<OpConstructVarargs>(); 1631 numUsedStackSlots = -bytecode. firstFree.offset();1632 arguments = LLINT_OP_C(bytecode. arguments).jsValue();1633 firstVarArg = bytecode. firstVarArg;1631 numUsedStackSlots = -bytecode.m_firstFree.offset(); 1632 arguments = LLINT_OP_C(bytecode.m_arguments).jsValue(); 1633 firstVarArg = bytecode.m_firstVarArg; 1634 1634 break; 1635 1635 } … … 1654 1654 1655 1655 auto bytecode = pc->as<OpTailCallForwardArguments>(); 1656 unsigned numUsedStackSlots = -bytecode. firstFree.offset();1656 unsigned numUsedStackSlots = -bytecode.m_firstFree.offset(); 1657 1657 1658 1658 unsigned arguments = sizeFrameForForwardArguments(exec, vm, numUsedStackSlots); … … 1681 1681 1682 1682 auto bytecode = pc->as<Op>(); 1683 JSValue calleeAsValue = LLINT_OP_C(bytecode. callee).jsValue();1683 JSValue calleeAsValue = LLINT_OP_C(bytecode.m_callee).jsValue(); 1684 1684 1685 1685 ExecState* execCallee = vm.newCallFrameReturnValue; 1686 1686 1687 1687 if (set == SetArgumentsWith::Object) { 1688 setupVarargsFrameAndSetThis(exec, execCallee, LLINT_OP_C(bytecode. thisValue).jsValue(), LLINT_OP_C(bytecode.arguments).jsValue(), bytecode.firstVarArg, vm.varargsLength);1688 setupVarargsFrameAndSetThis(exec, execCallee, LLINT_OP_C(bytecode.m_thisValue).jsValue(), LLINT_OP_C(bytecode.m_arguments).jsValue(), bytecode.m_firstVarArg, vm.varargsLength); 1689 1689 LLINT_CALL_CHECK_EXCEPTION(exec, exec); 1690 1690 } else 1691 setupForwardArgumentsFrameAndSetThis(exec, execCallee, LLINT_OP_C(bytecode. thisValue).jsValue(), vm.varargsLength);1691 setupForwardArgumentsFrameAndSetThis(exec, execCallee, LLINT_OP_C(bytecode.m_thisValue).jsValue(), vm.varargsLength); 1692 1692 1693 1693 execCallee->setCallerFrame(exec); … … 1722 1722 LLINT_BEGIN_NO_SET_PC(); 1723 1723 auto bytecode = pc->as<OpCallEval>(); 1724 JSValue calleeAsValue = LLINT_OP(bytecode. callee).jsValue();1725 1726 ExecState* execCallee = exec - bytecode. argv;1727 1728 execCallee->setArgumentCountIncludingThis(bytecode. argc);1724 JSValue calleeAsValue = LLINT_OP(bytecode.m_callee).jsValue(); 1725 1726 ExecState* execCallee = exec - bytecode.m_argv; 1727 1728 execCallee->setArgumentCountIncludingThis(bytecode.m_argc); 1729 1729 execCallee->setCallerFrame(exec); 1730 1730 execCallee->uncheckedR(CallFrameSlot::callee) = calleeAsValue; … … 1754 1754 LLINT_BEGIN(); 1755 1755 auto bytecode = pc->as<OpStrcat>(); 1756 LLINT_RETURN(jsStringFromRegisterArray(exec, &LLINT_OP(bytecode. src), bytecode.count));1756 LLINT_RETURN(jsStringFromRegisterArray(exec, &LLINT_OP(bytecode.m_src), bytecode.m_count)); 1757 1757 } 1758 1758 … … 1761 1761 LLINT_BEGIN(); 1762 1762 auto bytecode = pc->as<OpToPrimitive>(); 1763 LLINT_RETURN(LLINT_OP_C(bytecode. src).jsValue().toPrimitive(exec));1763 LLINT_RETURN(LLINT_OP_C(bytecode.m_src).jsValue().toPrimitive(exec)); 1764 1764 } 1765 1765 … … 1768 1768 LLINT_BEGIN(); 1769 1769 auto bytecode = pc->as<OpThrow>(); 1770 LLINT_THROW(LLINT_OP_C(bytecode. value).jsValue());1770 LLINT_THROW(LLINT_OP_C(bytecode.m_value).jsValue()); 1771 1771 } 1772 1772 … … 1784 1784 LLINT_BEGIN(); 1785 1785 auto bytecode = pc->as<OpDebug>(); 1786 vm.interpreter->debug(exec, bytecode. debugHookType);1786 vm.interpreter->debug(exec, bytecode.m_debugHookType); 1787 1787 1788 1788 LLINT_END(); … … 1802 1802 auto bytecode = pc->as<OpGetFromScope>(); 1803 1803 auto& metadata = bytecode.metadata(exec); 1804 const Identifier& ident = exec->codeBlock()->identifier(bytecode. var);1805 JSObject* scope = jsCast<JSObject*>(LLINT_OP(bytecode. scope).jsValue());1804 const Identifier& ident = exec->codeBlock()->identifier(bytecode.m_var); 1805 JSObject* scope = jsCast<JSObject*>(LLINT_OP(bytecode.m_scope).jsValue()); 1806 1806 1807 1807 // ModuleVar is always converted to ClosureVar for get_from_scope. 1808 ASSERT(metadata. getPutInfo.resolveType() != ModuleVar);1808 ASSERT(metadata.m_getPutInfo.resolveType() != ModuleVar); 1809 1809 1810 1810 LLINT_RETURN(scope->getPropertySlot(exec, ident, [&] (bool found, PropertySlot& slot) -> JSValue { 1811 1811 if (!found) { 1812 if (metadata. getPutInfo.resolveMode() == ThrowIfNotFound)1812 if (metadata.m_getPutInfo.resolveMode() == ThrowIfNotFound) 1813 1813 return throwException(exec, throwScope, createUndefinedVariableError(exec, ident)); 1814 1814 return jsUndefined(); … … 1838 1838 auto& metadata = bytecode.metadata(exec); 1839 1839 CodeBlock* codeBlock = exec->codeBlock(); 1840 const Identifier& ident = codeBlock->identifier(bytecode. var);1841 JSObject* scope = jsCast<JSObject*>(LLINT_OP(bytecode. scope).jsValue());1842 JSValue value = LLINT_OP_C(bytecode. value).jsValue();1843 if (metadata. getPutInfo.resolveType() == LocalClosureVar) {1840 const Identifier& ident = codeBlock->identifier(bytecode.m_var); 1841 JSObject* scope = jsCast<JSObject*>(LLINT_OP(bytecode.m_scope).jsValue()); 1842 JSValue value = LLINT_OP_C(bytecode.m_value).jsValue(); 1843 if (metadata.m_getPutInfo.resolveType() == LocalClosureVar) { 1844 1844 JSLexicalEnvironment* environment = jsCast<JSLexicalEnvironment*>(scope); 1845 environment->variableAt(ScopeOffset(metadata. operand)).set(vm, environment, value);1845 environment->variableAt(ScopeOffset(metadata.m_operand)).set(vm, environment, value); 1846 1846 1847 1847 // Have to do this *after* the write, because if this puts the set into IsWatched, then we need 1848 1848 // to have already changed the value of the variable. Otherwise we might watch and constant-fold 1849 1849 // to the Undefined value from before the assignment. 1850 if (metadata. watchpointSet)1851 metadata. watchpointSet->touch(vm, "Executed op_put_scope<LocalClosureVar>");1850 if (metadata.m_watchpointSet) 1851 metadata.m_watchpointSet->touch(vm, "Executed op_put_scope<LocalClosureVar>"); 1852 1852 LLINT_END(); 1853 1853 } … … 1857 1857 if (hasProperty 1858 1858 && scope->isGlobalLexicalEnvironment() 1859 && !isInitialization(metadata. getPutInfo.initializationMode())) {1859 && !isInitialization(metadata.m_getPutInfo.initializationMode())) { 1860 1860 // When we can't statically prove we need a TDZ check, we must perform the check on the slow path. 1861 1861 PropertySlot slot(scope, PropertySlot::InternalMethodType::Get); … … 1865 1865 } 1866 1866 1867 if (metadata. getPutInfo.resolveMode() == ThrowIfNotFound && !hasProperty)1867 if (metadata.m_getPutInfo.resolveMode() == ThrowIfNotFound && !hasProperty) 1868 1868 LLINT_THROW(createUndefinedVariableError(exec, ident)); 1869 1869 1870 PutPropertySlot slot(scope, codeBlock->isStrictMode(), PutPropertySlot::UnknownContext, isInitialization(metadata. getPutInfo.initializationMode()));1870 PutPropertySlot slot(scope, codeBlock->isStrictMode(), PutPropertySlot::UnknownContext, isInitialization(metadata.m_getPutInfo.initializationMode())); 1871 1871 scope->methodTable(vm)->put(scope, exec, ident, value, slot); 1872 1872 … … 1891 1891 1892 1892 auto bytecode = pc->as<OpLogShadowChickenPrologue>(); 1893 JSScope* scope = exec->uncheckedR(bytecode. scope).Register::scope();1893 JSScope* scope = exec->uncheckedR(bytecode.m_scope).Register::scope(); 1894 1894 vm.shadowChicken().log(vm, exec, ShadowChicken::Packet::prologue(exec->jsCallee(), exec, exec->callerFrame(), scope)); 1895 1895 … … 1902 1902 1903 1903 auto bytecode = pc->as<OpLogShadowChickenTail>(); 1904 JSValue thisValue = LLINT_OP(bytecode. thisValue).jsValue();1905 JSScope* scope = exec->uncheckedR(bytecode. scope).Register::scope();1904 JSValue thisValue = LLINT_OP(bytecode.m_thisValue).jsValue(); 1905 JSScope* scope = exec->uncheckedR(bytecode.m_scope).Register::scope(); 1906 1906 1907 1907 #if USE(JSVALUE64) … … 1923 1923 auto bytecode = pc->as<OpCatch>(); 1924 1924 auto& metadata = bytecode.metadata(exec); 1925 metadata. buffer->forEach([&] (ValueProfileAndOperand& profile) {1925 metadata.m_buffer->forEach([&] (ValueProfileAndOperand& profile) { 1926 1926 profile.m_profile.m_buckets[0] = JSValue::encode(exec->uncheckedR(profile.m_operand).jsValue()); 1927 1927 }); -
trunk/Source/JavaScriptCore/llint/LowLevelInterpreter.asm
r240023 r240041 1 # Copyright (C) 2011-201 8Apple Inc. All rights reserved.1 # Copyright (C) 2011-2019 Apple Inc. All rights reserved. 2 2 # 3 3 # Redistribution and use in source and binary forms, with or without … … 307 307 end 308 308 309 macro getu(size, op, field , dst)309 macro getu(size, op, fieldName, dst) 310 310 size(getuOperandNarrow, getuOperandWide, macro (getu) 311 getu(op, field , dst)311 getu(op, fieldName, dst) 312 312 end) 313 313 end 314 314 315 macro get(size, op, field , dst)315 macro get(size, op, fieldName, dst) 316 316 size(getOperandNarrow, getOperandWide, macro (get) 317 get(op, field , dst)317 get(op, fieldName, dst) 318 318 end) 319 319 end … … 329 329 macro metadata(size, opcode, dst, scratch) 330 330 loadi constexpr %opcode%::opcodeID * 4[metadataTable], dst # offset = metadataTable<unsigned*>[opcodeID] 331 getu(size, opcode, m etadataID, scratch) # scratch = bytecode.metadataID331 getu(size, opcode, m_metadataID, scratch) # scratch = bytecode.m_metadataID 332 332 muli sizeof %opcode%::Metadata, scratch # scratch *= sizeof(Op::Metadata) 333 333 addi scratch, dst # offset += scratch … … 361 361 macro llintOp(name, op, fn) 362 362 commonOp(llint_%name%, traceExecution, macro(size) 363 macro getImpl(field , dst)364 get(size, op, field , dst)363 macro getImpl(fieldName, dst) 364 get(size, op, fieldName, dst) 365 365 end 366 366 … … 392 392 macro llintOpWithJump(name, op, impl) 393 393 llintOpWithMetadata(name, op, macro(size, get, dispatch, metadata, return) 394 macro jump(field )395 get(field , t0)394 macro jump(fieldName) 395 get(fieldName, t0) 396 396 jumpImpl(t0) 397 397 end … … 838 838 end 839 839 840 macro unpoison(poison, field , scratch)840 macro unpoison(poison, fieldReg, scratch) 841 841 if POISON 842 842 loadp poison, scratch 843 xorp scratch, field 843 xorp scratch, fieldReg 844 844 end 845 845 end … … 1539 1539 1540 1540 llintOpWithJump(op_jmp, OpJmp, macro (size, get, jump, dispatch) 1541 jump( target)1541 jump(m_target) 1542 1542 end) 1543 1543 -
trunk/Source/JavaScriptCore/llint/LowLevelInterpreter32_64.asm
r240023 r240041 1 # Copyright (C) 2011-201 8Apple Inc. All rights reserved.1 # Copyright (C) 2011-2019 Apple Inc. All rights reserved. 2 2 # 3 3 # Redistribution and use in source and binary forms, with or without … … 36 36 end 37 37 38 macro getuOperandNarrow(op, field , dst)39 loadb constexpr %op%_%field %_index[PC], dst40 end 41 42 macro getOperandNarrow(op, field , dst)43 loadbsp constexpr %op%_%field %_index[PC], dst44 end 45 46 macro getuOperandWide(op, field , dst)47 loadi constexpr %op%_%field %_index * 4 + 1[PC], dst48 end 49 50 macro getOperandWide(op, field , dst)51 loadis constexpr %op%_%field %_index * 4 + 1[PC], dst38 macro getuOperandNarrow(op, fieldName, dst) 39 loadb constexpr %op%_%fieldName%_index[PC], dst 40 end 41 42 macro getOperandNarrow(op, fieldName, dst) 43 loadbsp constexpr %op%_%fieldName%_index[PC], dst 44 end 45 46 macro getuOperandWide(op, fieldName, dst) 47 loadi constexpr %op%_%fieldName%_index * 4 + 1[PC], dst 48 end 49 50 macro getOperandWide(op, fieldName, dst) 51 loadis constexpr %op%_%fieldName%_index * 4 + 1[PC], dst 52 52 end 53 53 … … 56 56 move tag, t5 57 57 move payload, t3 58 get( dst, t2)58 get(m_dst, t2) 59 59 storei t5, TagOffset[cfr, t2, 8] 60 60 storei t3, PayloadOffset[cfr, t2, 8] … … 70 70 metadata(t5, t2) 71 71 valueProfile(op, t5, t1, t0) 72 get( dst, t2)72 get(m_dst, t2) 73 73 storei t1, TagOffset[cfr, t2, 8] 74 74 storei t0, PayloadOffset[cfr, t2, 8] … … 80 80 macro dispatchAfterCall(size, op, dispatch) 81 81 loadi ArgumentCount + TagOffset[cfr], PC 82 get(size, op, dst, t3)82 get(size, op, m_dst, t3) 83 83 storei r1, TagOffset[cfr, t3, 8] 84 84 storei r0, PayloadOffset[cfr, t3, 8] … … 439 439 end 440 440 441 macro loadVariable(get, operand, index, tag, payload)442 get( operand, index)443 loadi TagOffset[cfr, index , 8], tag444 loadi PayloadOffset[cfr, index , 8], payload441 macro loadVariable(get, fieldName, indexReg, tagReg, payloadReg) 442 get(fieldName, indexReg) 443 loadi TagOffset[cfr, indexReg, 8], tagReg 444 loadi PayloadOffset[cfr, indexReg, 8], payloadReg 445 445 end 446 446 … … 533 533 end 534 534 535 macro writeBarrierOnOperand(size, get, cell Operand)536 get(cell Operand, t1)535 macro writeBarrierOnOperand(size, get, cellFieldName) 536 get(cellFieldName, t1) 537 537 loadConstantOrVariablePayload(size, t1, CellTag, t2, .writeBarrierDone) 538 538 skipIfIsRememberedOrInEden( … … 551 551 end 552 552 553 macro writeBarrierOnOperands(size, get, cell Operand, valueOperand)554 get(value Operand, t1)553 macro writeBarrierOnOperands(size, get, cellFieldName, valueFieldName) 554 get(valueFieldName, t1) 555 555 loadConstantOrVariableTag(size, t1, t0) 556 556 bineq t0, CellTag, .writeBarrierDone 557 557 558 writeBarrierOnOperand(size, get, cell Operand)558 writeBarrierOnOperand(size, get, cellFieldName) 559 559 .writeBarrierDone: 560 560 end 561 561 562 macro writeBarrierOnGlobal(size, get, value Operand, loadHelper)563 get(value Operand, t1)562 macro writeBarrierOnGlobal(size, get, valueFieldName, loadMacro) 563 get(valueFieldName, t1) 564 564 loadConstantOrVariableTag(size, t1, t0) 565 565 bineq t0, CellTag, .writeBarrierDone 566 566 567 load Helper(t3)567 loadMacro(t3) 568 568 569 569 skipIfIsRememberedOrInEden( … … 582 582 end 583 583 584 macro writeBarrierOnGlobalObject(size, get, value Operand)585 writeBarrierOnGlobal(size, get, value Operand,584 macro writeBarrierOnGlobalObject(size, get, valueFieldName) 585 writeBarrierOnGlobal(size, get, valueFieldName, 586 586 macro(registerToStoreGlobal) 587 587 loadp CodeBlock[cfr], registerToStoreGlobal … … 590 590 end 591 591 592 macro writeBarrierOnGlobalLexicalEnvironment(size, get, value Operand)593 writeBarrierOnGlobal(size, get, value Operand,592 macro writeBarrierOnGlobalLexicalEnvironment(size, get, valueFieldName) 593 writeBarrierOnGlobal(size, get, valueFieldName, 594 594 macro(registerToStoreGlobal) 595 595 loadp CodeBlock[cfr], registerToStoreGlobal … … 600 600 601 601 macro valueProfile(op, metadata, tag, payload) 602 storei tag, %op%::Metadata:: profile.m_buckets + TagOffset[metadata]603 storei payload, %op%::Metadata:: profile.m_buckets + PayloadOffset[metadata]602 storei tag, %op%::Metadata::m_profile.m_buckets + TagOffset[metadata] 603 storei payload, %op%::Metadata::m_profile.m_buckets + PayloadOffset[metadata] 604 604 end 605 605 … … 714 714 715 715 llintOpWithProfile(op_get_argument, OpGetArgument, macro (size, get, dispatch, return) 716 get( index, t2)716 get(m_index, t2) 717 717 loadi PayloadOffset + ArgumentCount[cfr], t0 718 718 bilteq t0, t2, .opGetArgumentOutOfBounds … … 741 741 742 742 llintOpWithMetadata(op_to_this, OpToThis, macro (size, get, dispatch, metadata, return) 743 get( srcDst, t0)743 get(m_srcDst, t0) 744 744 bineq TagOffset[cfr, t0, 8], CellTag, .opToThisSlow 745 745 loadi PayloadOffset[cfr, t0, 8], t0 746 746 bbneq JSCell::m_type[t0], FinalObjectType, .opToThisSlow 747 747 metadata(t2, t3) 748 loadp OpToThis::Metadata:: cachedStructure[t2], t2748 loadp OpToThis::Metadata::m_cachedStructure[t2], t2 749 749 bpneq JSCell::m_structureID[t0], t2, .opToThisSlow 750 750 dispatch() … … 757 757 758 758 llintOp(op_check_tdz, OpCheckTdz, macro (size, get, dispatch) 759 get( target, t0)759 get(m_target, t0) 760 760 loadConstantOrVariableTag(size, t0, t1) 761 761 bineq t1, EmptyValueTag, .opNotTDZ … … 768 768 769 769 llintOpWithReturn(op_mov, OpMov, macro (size, get, dispatch, return) 770 get( src, t1)770 get(m_src, t1) 771 771 loadConstantOrVariable(size, t1, t2, t3) 772 772 return(t2, t3) … … 775 775 776 776 llintOpWithReturn(op_not, OpNot, macro (size, get, dispatch, return) 777 get( operand, t0)777 get(m_operand, t0) 778 778 loadConstantOrVariable(size, t0, t2, t3) 779 779 bineq t2, BooleanTag, .opNotSlow … … 789 789 macro equalityComparisonOp(name, op, integerComparison) 790 790 llintOpWithReturn(op_%name%, op, macro (size, get, dispatch, return) 791 get( rhs, t2)792 get( lhs, t0)791 get(m_rhs, t2) 792 get(m_lhs, t0) 793 793 loadConstantOrVariable(size, t2, t3, t1) 794 794 loadConstantOrVariable2Reg(size, t0, t2, t0) … … 808 808 macro equalityJumpOp(name, op, integerComparison) 809 809 llintOpWithJump(op_%name%, op, macro (size, get, jump, dispatch) 810 get( rhs, t2)811 get( lhs, t0)810 get(m_rhs, t2) 811 get(m_lhs, t0) 812 812 loadConstantOrVariable(size, t2, t3, t1) 813 813 loadConstantOrVariable2Reg(size, t0, t2, t0) … … 819 819 820 820 .jumpTarget: 821 jump( target)821 jump(m_target) 822 822 823 823 .slow: … … 830 830 macro equalNullComparisonOp(name, op, fn) 831 831 llintOpWithReturn(name, op, macro (size, get, dispatch, return) 832 get( operand, t0)832 get(m_operand, t0) 833 833 assertNotConstant(size, t0) 834 834 loadi TagOffset[cfr, t0, 8], t1 … … 861 861 862 862 llintOpWithReturn(op_is_undefined_or_null, OpIsUndefinedOrNull, macro (size, get, dispatch, return) 863 get( operand, t0)863 get(m_operand, t0) 864 864 assertNotConstant(size, t0) 865 865 loadi TagOffset[cfr, t0, 8], t1 … … 872 872 macro strictEqOp(name, op, equalityOperation) 873 873 llintOpWithReturn(op_%name%, op, macro (size, get, dispatch, return) 874 get( rhs, t2)875 get( lhs, t0)874 get(m_rhs, t2) 875 get(m_lhs, t0) 876 876 loadConstantOrVariable(size, t2, t3, t1) 877 877 loadConstantOrVariable2Reg(size, t0, t2, t0) … … 894 894 macro strictEqualityJumpOp(name, op, equalityOperation) 895 895 llintOpWithJump(op_%name%, op, macro (size, get, jump, dispatch) 896 get( rhs, t2)897 get( lhs, t0)896 get(m_rhs, t2) 897 get(m_lhs, t0) 898 898 loadConstantOrVariable(size, t2, t3, t1) 899 899 loadConstantOrVariable2Reg(size, t0, t2, t0) … … 908 908 909 909 .jumpTarget: 910 jump( target)910 jump(m_target) 911 911 912 912 .slow: … … 935 935 macro preOp(name, op, operation) 936 936 llintOp(op_%name%, op, macro (size, get, dispatch) 937 get( srcDst, t0)937 get(m_srcDst, t0) 938 938 bineq TagOffset[cfr, t0, 8], Int32Tag, .slow 939 939 loadi PayloadOffset[cfr, t0, 8], t1 … … 950 950 951 951 llintOpWithProfile(op_to_number, OpToNumber, macro (size, get, dispatch, return) 952 get( operand, t0)952 get(m_operand, t0) 953 953 loadConstantOrVariable(size, t0, t2, t3) 954 954 bieq t2, Int32Tag, .opToNumberIsInt … … 964 964 965 965 llintOpWithReturn(op_to_string, OpToString, macro (size, get, dispatch, return) 966 get( operand, t0)966 get(m_operand, t0) 967 967 loadConstantOrVariable(size, t0, t2, t3) 968 968 bineq t2, CellTag, .opToStringSlow … … 978 978 979 979 llintOpWithProfile(op_to_object, OpToObject, macro (size, get, dispatch, return) 980 get( operand, t0)980 get(m_operand, t0) 981 981 loadConstantOrVariable(size, t0, t2, t3) 982 982 bineq t2, CellTag, .opToObjectSlow … … 993 993 994 994 macro arithProfile(type) 995 ori type, OpNegate::Metadata:: arithProfile[t5]995 ori type, OpNegate::Metadata::m_arithProfile[t5] 996 996 end 997 997 998 998 metadata(t5, t0) 999 get( operand, t0)999 get(m_operand, t0) 1000 1000 loadConstantOrVariable(size, t0, t1, t2) 1001 1001 bineq t1, Int32Tag, .opNegateSrcNotInt … … 1019 1019 llintOpWithMetadata(op_%name%, op, macro (size, get, dispatch, metadata, return) 1020 1020 macro arithProfile(type) 1021 ori type, %op%::Metadata:: arithProfile[t5]1021 ori type, %op%::Metadata::m_arithProfile[t5] 1022 1022 end 1023 1023 1024 1024 metadata(t5, t2) 1025 get( rhs, t2)1026 get( lhs, t0)1025 get(m_rhs, t2) 1026 get(m_lhs, t0) 1027 1027 loadConstantOrVariable(size, t2, t3, t1) 1028 1028 loadConstantOrVariable2Reg(size, t0, t2, t0) … … 1030 1030 bineq t3, Int32Tag, .op2NotInt 1031 1031 arithProfile(ArithProfileIntInt) 1032 get( dst, t2)1032 get(m_dst, t2) 1033 1033 integerOperationAndStore(t3, t1, t0, .slow, t2) 1034 1034 dispatch() … … 1046 1046 arithProfile(ArithProfileNumberNumber) 1047 1047 .op1NotIntReady: 1048 get( dst, t1)1048 get(m_dst, t1) 1049 1049 fii2d t0, t2, ft0 1050 1050 doubleOperation(ft1, ft0) … … 1054 1054 .op2NotInt: 1055 1055 # First operand is definitely an int, the second operand is definitely not. 1056 get( dst, t2)1056 get(m_dst, t2) 1057 1057 bia t3, LowestTag, .slow 1058 1058 arithProfile(ArithProfileIntNumber) … … 1121 1121 1122 1122 llintOpWithReturn(op_unsigned, OpUnsigned, macro (size, get, dispatch, return) 1123 get( operand, t1)1123 get(m_operand, t1) 1124 1124 loadConstantOrVariablePayload(size, t1, Int32Tag, t2, .opUnsignedSlow) 1125 1125 bilt t2, 0, .opUnsignedSlow … … 1133 1133 macro commonBitOp(opKind, name, op, operation) 1134 1134 opKind(op_%name%, op, macro (size, get, dispatch, return) 1135 get( rhs, t2)1136 get( lhs, t0)1135 get(m_rhs, t2) 1136 get(m_lhs, t0) 1137 1137 loadConstantOrVariable(size, t2, t3, t1) 1138 1138 loadConstantOrVariable2Reg(size, t0, t2, t0) … … 1178 1178 1179 1179 llintOpWithProfile(op_bitnot, OpBitnot, macro (size, get, dispatch, return) 1180 get( operand, t0)1180 get(m_operand, t0) 1181 1181 loadConstantOrVariable(size, t0, t2, t3) 1182 1182 bineq t2, Int32Tag, .opBitNotSlow … … 1190 1190 1191 1191 llintOp(op_overrides_has_instance, OpOverridesHasInstance, macro (size, get, dispatch) 1192 get( dst, t3)1192 get(m_dst, t3) 1193 1193 storei BooleanTag, TagOffset[cfr, t3, 8] 1194 1194 1195 1195 # First check if hasInstanceValue is the one on Function.prototype[Symbol.hasInstance] 1196 get( hasInstanceValue, t0)1196 get(m_hasInstanceValue, t0) 1197 1197 loadConstantOrVariablePayload(size, t0, CellTag, t2, .opOverrideshasInstanceValueNotCell) 1198 1198 loadConstantOrVariable(size, t0, t1, t2) … … 1206 1206 1207 1207 # We know the constructor is a cell. 1208 get( constructor, t0)1208 get(m_constructor, t0) 1209 1209 loadConstantOrVariablePayloadUnchecked(size, t0, t1) 1210 1210 tbz JSCell::m_flags[t1], ImplementsDefaultHasInstance, t0 … … 1220 1220 1221 1221 llintOpWithReturn(op_is_empty, OpIsEmpty, macro (size, get, dispatch, return) 1222 get( operand, t1)1222 get(m_operand, t1) 1223 1223 loadConstantOrVariable(size, t1, t2, t3) 1224 1224 cieq t2, EmptyValueTag, t3 … … 1228 1228 1229 1229 llintOpWithReturn(op_is_undefined, OpIsUndefined, macro (size, get, dispatch, return) 1230 get( operand, t1)1230 get(m_operand, t1) 1231 1231 loadConstantOrVariable(size, t1, t2, t3) 1232 1232 bieq t2, CellTag, .opIsUndefinedCell … … 1246 1246 1247 1247 llintOpWithReturn(op_is_boolean, OpIsBoolean, macro (size, get, dispatch, return) 1248 get( operand, t1)1248 get(m_operand, t1) 1249 1249 loadConstantOrVariableTag(size, t1, t0) 1250 1250 cieq t0, BooleanTag, t0 … … 1254 1254 1255 1255 llintOpWithReturn(op_is_number, OpIsNumber, macro (size, get, dispatch, return) 1256 get( operand, t1)1256 get(m_operand, t1) 1257 1257 loadConstantOrVariableTag(size, t1, t0) 1258 1258 addi 1, t0 … … 1263 1263 1264 1264 llintOpWithReturn(op_is_cell_with_type, OpIsCellWithType, macro (size, get, dispatch, return) 1265 get( operand, t1)1265 get(m_operand, t1) 1266 1266 loadConstantOrVariable(size, t1, t0, t3) 1267 1267 bineq t0, CellTag, .notCellCase 1268 getu(size, OpIsCellWithType, type, t0)1268 getu(size, OpIsCellWithType, m_type, t0) 1269 1269 cbeq JSCell::m_type[t3], t0, t1 1270 1270 return(BooleanTag, t1) … … 1275 1275 1276 1276 llintOpWithReturn(op_is_object, OpIsObject, macro (size, get, dispatch, return) 1277 get( operand, t1)1277 get(m_operand, t1) 1278 1278 loadConstantOrVariable(size, t1, t0, t3) 1279 1279 bineq t0, CellTag, .opIsObjectNotCell … … 1328 1328 llintOpWithMetadata(op_get_by_id_direct, OpGetByIdDirect, macro (size, get, dispatch, metadata, return) 1329 1329 metadata(t5, t0) 1330 get( base, t0)1331 loadi OpGetByIdDirect::Metadata:: structure[t5], t11330 get(m_base, t0) 1331 loadi OpGetByIdDirect::Metadata::m_structure[t5], t1 1332 1332 loadConstantOrVariablePayload(size, t0, CellTag, t3, .opGetByIdDirectSlow) 1333 loadi OpGetByIdDirect::Metadata:: offset[t5], t21333 loadi OpGetByIdDirect::Metadata::m_offset[t5], t2 1334 1334 bineq JSCell::m_structureID[t3], t1, .opGetByIdDirectSlow 1335 1335 loadPropertyAtVariableOffset(t2, t3, t0, t1) … … 1345 1345 llintOpWithMetadata(op_get_by_id, OpGetById, macro (size, get, dispatch, metadata, return) 1346 1346 metadata(t5, t0) 1347 loadb OpGetById::Metadata::m ode[t5], t11348 get( base, t0)1347 loadb OpGetById::Metadata::m_mode[t5], t1 1348 get(m_base, t0) 1349 1349 1350 1350 .opGetByIdProtoLoad: 1351 1351 bbneq t1, constexpr GetByIdMode::ProtoLoad, .opGetByIdArrayLength 1352 loadi OpGetById::Metadata::m odeMetadata.protoLoadMode.structure[t5], t11352 loadi OpGetById::Metadata::m_modeMetadata.protoLoadMode.structure[t5], t1 1353 1353 loadConstantOrVariablePayload(size, t0, CellTag, t3, .opGetByIdSlow) 1354 loadis OpGetById::Metadata::m odeMetadata.protoLoadMode.cachedOffset[t5], t21354 loadis OpGetById::Metadata::m_modeMetadata.protoLoadMode.cachedOffset[t5], t2 1355 1355 bineq JSCell::m_structureID[t3], t1, .opGetByIdSlow 1356 loadp OpGetById::Metadata::m odeMetadata.protoLoadMode.cachedSlot[t5], t31356 loadp OpGetById::Metadata::m_modeMetadata.protoLoadMode.cachedSlot[t5], t3 1357 1357 loadPropertyAtVariableOffset(t2, t3, t0, t1) 1358 1358 valueProfile(OpGetById, t5, t0, t1) … … 1363 1363 loadConstantOrVariablePayload(size, t0, CellTag, t3, .opGetByIdSlow) 1364 1364 move t3, t2 1365 arrayProfile(OpGetById::Metadata::m odeMetadata.arrayLengthMode.arrayProfile, t2, t5, t0)1365 arrayProfile(OpGetById::Metadata::m_modeMetadata.arrayLengthMode.arrayProfile, t2, t5, t0) 1366 1366 btiz t2, IsArray, .opGetByIdSlow 1367 1367 btiz t2, IndexingShapeMask, .opGetByIdSlow … … 1374 1374 .opGetByIdUnset: 1375 1375 bbneq t1, constexpr GetByIdMode::Unset, .opGetByIdDefault 1376 loadi OpGetById::Metadata::m odeMetadata.unsetMode.structure[t5], t11376 loadi OpGetById::Metadata::m_modeMetadata.unsetMode.structure[t5], t1 1377 1377 loadConstantOrVariablePayload(size, t0, CellTag, t3, .opGetByIdSlow) 1378 1378 bineq JSCell::m_structureID[t3], t1, .opGetByIdSlow … … 1381 1381 1382 1382 .opGetByIdDefault: 1383 loadi OpGetById::Metadata::m odeMetadata.defaultMode.structure[t5], t11383 loadi OpGetById::Metadata::m_modeMetadata.defaultMode.structure[t5], t1 1384 1384 loadConstantOrVariablePayload(size, t0, CellTag, t3, .opGetByIdSlow) 1385 loadis OpGetById::Metadata::m odeMetadata.defaultMode.cachedOffset[t5], t21385 loadis OpGetById::Metadata::m_modeMetadata.defaultMode.cachedOffset[t5], t2 1386 1386 bineq JSCell::m_structureID[t3], t1, .opGetByIdSlow 1387 1387 loadPropertyAtVariableOffset(t2, t3, t0, t1) … … 1396 1396 1397 1397 llintOpWithMetadata(op_put_by_id, OpPutById, macro (size, get, dispatch, metadata, return) 1398 writeBarrierOnOperands(size, get, base,value)1398 writeBarrierOnOperands(size, get, m_base, m_value) 1399 1399 metadata(t5, t3) 1400 get( base, t3)1400 get(m_base, t3) 1401 1401 loadConstantOrVariablePayload(size, t3, CellTag, t0, .opPutByIdSlow) 1402 1402 loadi JSCell::m_structureID[t0], t2 1403 bineq t2, OpPutById::Metadata:: oldStructure[t5], .opPutByIdSlow1403 bineq t2, OpPutById::Metadata::m_oldStructure[t5], .opPutByIdSlow 1404 1404 1405 1405 # At this point, we have: … … 1409 1409 # We will lose currentStructureID in the shenanigans below. 1410 1410 1411 loadi OpPutById::Metadata:: newStructure[t5], t11411 loadi OpPutById::Metadata::m_newStructure[t5], t1 1412 1412 1413 1413 btiz t1, .opPutByIdNotTransition … … 1415 1415 # This is the transition case. t1 holds the new Structure*. If we have a chain, we need to 1416 1416 # check it. t0 is the base. We may clobber t1 to use it as scratch. 1417 loadp OpPutById::Metadata:: structureChain[t5], t31417 loadp OpPutById::Metadata::m_structureChain[t5], t3 1418 1418 btpz t3, .opPutByIdTransitionDirect 1419 1419 1420 loadi OpPutById::Metadata:: oldStructure[t5], t2 # Need old structure again.1420 loadi OpPutById::Metadata::m_oldStructure[t5], t2 # Need old structure again. 1421 1421 loadp StructureChain::m_vector[t3], t3 1422 1422 assert(macro (ok) btpnz t3, ok end) … … 1432 1432 1433 1433 .opPutByIdTransitionChainDone: 1434 loadi OpPutById::Metadata:: newStructure[t5], t11434 loadi OpPutById::Metadata::m_newStructure[t5], t1 1435 1435 1436 1436 .opPutByIdTransitionDirect: 1437 1437 storei t1, JSCell::m_structureID[t0] 1438 get( value, t1)1438 get(m_value, t1) 1439 1439 loadConstantOrVariable(size, t1, t2, t3) 1440 loadi OpPutById::Metadata:: offset[t5], t11440 loadi OpPutById::Metadata::m_offset[t5], t1 1441 1441 storePropertyAtVariableOffset(t1, t0, t2, t3) 1442 writeBarrierOnOperand(size, get, base)1442 writeBarrierOnOperand(size, get, m_base) 1443 1443 dispatch() 1444 1444 1445 1445 .opPutByIdNotTransition: 1446 1446 # The only thing live right now is t0, which holds the base. 1447 get( value, t1)1447 get(m_value, t1) 1448 1448 loadConstantOrVariable(size, t1, t2, t3) 1449 loadi OpPutById::Metadata:: offset[t5], t11449 loadi OpPutById::Metadata::m_offset[t5], t1 1450 1450 storePropertyAtVariableOffset(t1, t0, t2, t3) 1451 1451 dispatch() … … 1459 1459 llintOpWithMetadata(op_get_by_val, OpGetByVal, macro (size, get, dispatch, metadata, return) 1460 1460 metadata(t5, t2) 1461 get( base, t2)1461 get(m_base, t2) 1462 1462 loadConstantOrVariablePayload(size, t2, CellTag, t0, .opGetByValSlow) 1463 1463 move t0, t2 1464 arrayProfile(OpGetByVal::Metadata:: arrayProfile, t2, t5, t1)1465 get( property, t3)1464 arrayProfile(OpGetByVal::Metadata::m_arrayProfile, t2, t5, t1) 1465 get(m_property, t3) 1466 1466 loadConstantOrVariablePayload(size, t3, Int32Tag, t1, .opGetByValSlow) 1467 1467 loadp JSObject::m_butterfly[t0], t3 … … 1483 1483 # FIXME: This could be massively optimized. 1484 1484 fd2ii ft0, t1, t2 1485 get( dst, t0)1485 get(m_dst, t0) 1486 1486 jmp .opGetByValNotEmpty 1487 1487 … … 1494 1494 1495 1495 .opGetByValDone: 1496 get( dst, t0)1496 get(m_dst, t0) 1497 1497 bieq t2, EmptyValueTag, .opGetByValSlow 1498 1498 .opGetByValNotEmpty: … … 1513 1513 biaeq t3, -sizeof IndexingHeader + IndexingHeader::u.lengths.publicLength[t0], .outOfBounds 1514 1514 .storeResult: 1515 get( value, t2)1515 get(m_value, t2) 1516 1516 storeCallback(t2, t1, t0, t3) 1517 1517 dispatch() … … 1519 1519 .outOfBounds: 1520 1520 biaeq t3, -sizeof IndexingHeader + IndexingHeader::u.lengths.vectorLength[t0], .opPutByValOutOfBounds 1521 storeb 1, %op%::Metadata:: arrayProfile.m_mayStoreToHole[t5]1521 storeb 1, %op%::Metadata::m_arrayProfile.m_mayStoreToHole[t5] 1522 1522 addi 1, t3, t2 1523 1523 storei t2, -sizeof IndexingHeader + IndexingHeader::u.lengths.publicLength[t0] … … 1525 1525 end 1526 1526 1527 writeBarrierOnOperands(size, get, base,value)1527 writeBarrierOnOperands(size, get, m_base, m_value) 1528 1528 metadata(t5, t0) 1529 get( base, t0)1529 get(m_base, t0) 1530 1530 loadConstantOrVariablePayload(size, t0, CellTag, t1, .opPutByValSlow) 1531 1531 move t1, t2 1532 arrayProfile(%op%::Metadata:: arrayProfile, t2, t5, t0)1533 get( property, t0)1532 arrayProfile(%op%::Metadata::m_arrayProfile, t2, t5, t0) 1533 get(m_property, t0) 1534 1534 loadConstantOrVariablePayload(size, t0, Int32Tag, t3, .opPutByValSlow) 1535 1535 loadp JSObject::m_butterfly[t1], t0 … … 1577 1577 bieq ArrayStorage::m_vector + TagOffset[t0, t3, 8], EmptyValueTag, .opPutByValArrayStorageEmpty 1578 1578 .opPutByValArrayStorageStoreResult: 1579 get( value, t2)1579 get(m_value, t2) 1580 1580 loadConstantOrVariable2Reg(size, t2, t1, t2) 1581 1581 storei t1, ArrayStorage::m_vector + TagOffset[t0, t3, 8] … … 1584 1584 1585 1585 .opPutByValArrayStorageEmpty: 1586 storeb 1, %op%::Metadata:: arrayProfile.m_mayStoreToHole[t5]1586 storeb 1, %op%::Metadata::m_arrayProfile.m_mayStoreToHole[t5] 1587 1587 addi 1, ArrayStorage::m_numValuesInVector[t0] 1588 1588 bib t3, -sizeof IndexingHeader + IndexingHeader::u.lengths.publicLength[t0], .opPutByValArrayStorageStoreResult … … 1592 1592 1593 1593 .opPutByValOutOfBounds: 1594 storeb 1, %op%::Metadata:: arrayProfile.m_outOfBounds[t5]1594 storeb 1, %op%::Metadata::m_arrayProfile.m_outOfBounds[t5] 1595 1595 .opPutByValSlow: 1596 1596 callSlowPath(_llint_slow_path_%name%) … … 1607 1607 macro llintJumpTrueOrFalseOp(name, op, conditionOp) 1608 1608 llintOpWithJump(op_%name%, op, macro (size, get, jump, dispatch) 1609 get( condition, t1)1609 get(m_condition, t1) 1610 1610 loadConstantOrVariablePayload(size, t1, BooleanTag, t0, .slow) 1611 1611 conditionOp(t0, .target) … … 1613 1613 1614 1614 .target: 1615 jump( target)1615 jump(m_target) 1616 1616 1617 1617 .slow: … … 1624 1624 macro equalNullJumpOp(name, op, cellHandler, immediateHandler) 1625 1625 llintOpWithJump(op_%name%, op, macro (size, get, jump, dispatch) 1626 get( value, t0)1626 get(m_value, t0) 1627 1627 assertNotConstant(size, t0) 1628 1628 loadi TagOffset[cfr, t0, 8], t1 … … 1634 1634 1635 1635 .target: 1636 jump( target)1636 jump(m_target) 1637 1637 1638 1638 .immediate: … … 1665 1665 1666 1666 llintOpWithMetadata(op_jneq_ptr, OpJneqPtr, macro (size, get, dispatch, metadata, return) 1667 get( value, t0)1668 get( specialPointer, t1)1667 get(m_value, t0) 1668 get(m_specialPointer, t1) 1669 1669 loadp CodeBlock[cfr], t2 1670 1670 loadp CodeBlock::m_globalObject[t2], t2 … … 1674 1674 .opJneqPtrBranch: 1675 1675 metadata(t5, t2) 1676 storeb 1, OpJneqPtr::Metadata:: hasJumped[t5]1677 get( target, t0)1676 storeb 1, OpJneqPtr::Metadata::m_hasJumped[t5] 1677 get(m_target, t0) 1678 1678 jumpImpl(t0) 1679 1679 .opJneqPtrFallThrough: … … 1684 1684 macro compareUnsignedJumpOp(name, op, integerCompare) 1685 1685 llintOpWithJump(op_%name%, op, macro (size, get, jump, dispatch) 1686 get( lhs, t2)1687 get( rhs, t3)1686 get(m_lhs, t2) 1687 get(m_rhs, t3) 1688 1688 loadConstantOrVariable(size, t2, t0, t1) 1689 1689 loadConstantOrVariable2Reg(size, t3, t2, t3) … … 1692 1692 1693 1693 .jumpTarget: 1694 jump( target)1694 jump(m_target) 1695 1695 end) 1696 1696 end … … 1699 1699 macro compareUnsignedOp(name, op, integerCompareAndSet) 1700 1700 llintOpWithReturn(op_%name%, op, macro (size, get, dispatch, return) 1701 get( rhs, t2)1702 get( lhs, t0)1701 get(m_rhs, t2) 1702 get(m_lhs, t0) 1703 1703 loadConstantOrVariable(size, t2, t3, t1) 1704 1704 loadConstantOrVariable2Reg(size, t0, t2, t0) … … 1711 1711 macro compareJumpOp(name, op, integerCompare, doubleCompare) 1712 1712 llintOpWithJump(op_%name%, op, macro (size, get, jump, dispatch) 1713 get( lhs, t2)1714 get( rhs, t3)1713 get(m_lhs, t2) 1714 get(m_rhs, t3) 1715 1715 loadConstantOrVariable(size, t2, t0, t1) 1716 1716 loadConstantOrVariable2Reg(size, t3, t2, t3) … … 1741 1741 1742 1742 .jumpTarget: 1743 jump( target)1743 jump(m_target) 1744 1744 1745 1745 .slow: … … 1751 1751 1752 1752 llintOpWithJump(op_switch_imm, OpSwitchImm, macro (size, get, jump, dispatch) 1753 get( scrutinee, t2)1754 get( tableIndex, t3)1753 get(m_scrutinee, t2) 1754 get(m_tableIndex, t3) 1755 1755 loadConstantOrVariable(size, t2, t1, t0) 1756 1756 loadp CodeBlock[cfr], t2 … … 1770 1770 bib t1, LowestTag, .opSwitchImmSlow # Go to slow path if it's a double. 1771 1771 .opSwitchImmFallThrough: 1772 jump( defaultOffset)1772 jump(m_defaultOffset) 1773 1773 1774 1774 .opSwitchImmSlow: … … 1779 1779 1780 1780 llintOpWithJump(op_switch_char, OpSwitchChar, macro (size, get, jump, dispatch) 1781 get( scrutinee, t2)1782 get( tableIndex, t3)1781 get(m_scrutinee, t2) 1782 get(m_tableIndex, t3) 1783 1783 loadConstantOrVariable(size, t2, t1, t0) 1784 1784 loadp CodeBlock[cfr], t2 … … 1807 1807 1808 1808 .opSwitchCharFallThrough: 1809 jump( defaultOffset)1809 jump(m_defaultOffset) 1810 1810 1811 1811 .opSwitchOnRope: … … 1816 1816 1817 1817 macro arrayProfileForCall(op, getu) 1818 getu( argv, t3)1818 getu(m_argv, t3) 1819 1819 negi t3 1820 1820 bineq ThisArgumentOffset + TagOffset[cfr, t3, 8], CellTag, .done 1821 1821 loadi ThisArgumentOffset + PayloadOffset[cfr, t3, 8], t0 1822 1822 loadp JSCell::m_structureID[t0], t0 1823 storep t0, %op%::Metadata:: arrayProfile.m_lastSeenStructureID[t5]1823 storep t0, %op%::Metadata::m_arrayProfile.m_lastSeenStructureID[t5] 1824 1824 .done: 1825 1825 end … … 1829 1829 metadata(t5, t0) 1830 1830 1831 prologue(macro (field , dst)1832 getu(size, op, field , dst)1831 prologue(macro (fieldName, dst) 1832 getu(size, op, fieldName, dst) 1833 1833 end, metadata) 1834 1834 1835 get( callee, t0)1836 loadp %op%::Metadata:: callLinkInfo.callee[t5], t21835 get(m_callee, t0) 1836 loadp %op%::Metadata::m_callLinkInfo.callee[t5], t2 1837 1837 loadConstantOrVariablePayload(size, t0, CellTag, t3, .opCallSlow) 1838 1838 bineq t3, t2, .opCallSlow 1839 getu(size, op, argv, t3)1839 getu(size, op, m_argv, t3) 1840 1840 lshifti 3, t3 1841 1841 negi t3 1842 1842 addp cfr, t3 # t3 contains the new value of cfr 1843 1843 storei t2, Callee + PayloadOffset[t3] 1844 getu(size, op, argc, t2)1844 getu(size, op, m_argc, t2) 1845 1845 storei PC, ArgumentCount + TagOffset[cfr] 1846 1846 storei t2, ArgumentCount + PayloadOffset[t3] 1847 1847 storei CellTag, Callee + TagOffset[t3] 1848 1848 move t3, sp 1849 prepareCall(%op%::Metadata:: callLinkInfo.machineCodeTarget[t5], t2, t3, t4, JSEntryPtrTag)1850 callTargetFunction(size, op, dispatch, %op%::Metadata:: callLinkInfo.machineCodeTarget[t5], JSEntryPtrTag)1849 prepareCall(%op%::Metadata::m_callLinkInfo.machineCodeTarget[t5], t2, t3, t4, JSEntryPtrTag) 1850 callTargetFunction(size, op, dispatch, %op%::Metadata::m_callLinkInfo.machineCodeTarget[t5], JSEntryPtrTag) 1851 1851 1852 1852 .opCallSlow: … … 1857 1857 llintOp(op_ret, OpRet, macro (size, get, dispatch) 1858 1858 checkSwitchToJITForEpilogue() 1859 get( value, t2)1859 get(m_value, t2) 1860 1860 loadConstantOrVariable(size, t2, t1, t0) 1861 1861 doReturn() … … 1864 1864 1865 1865 llintOpWithReturn(op_to_primitive, OpToPrimitive, macro (size, get, dispatch, return) 1866 get( src, t2)1866 get(m_src, t2) 1867 1867 loadConstantOrVariable(size, t2, t1, t0) 1868 1868 bineq t1, CellTag, .opToPrimitiveIsImm … … 1908 1908 loadi VM::m_exception[t3], t0 1909 1909 storei 0, VM::m_exception[t3] 1910 get(size, OpCatch, exception, t2)1910 get(size, OpCatch, m_exception, t2) 1911 1911 storei t0, PayloadOffset[cfr, t2, 8] 1912 1912 storei CellTag, TagOffset[cfr, t2, 8] … … 1914 1914 loadi Exception::m_value + TagOffset[t0], t1 1915 1915 loadi Exception::m_value + PayloadOffset[t0], t0 1916 get(size, OpCatch, thrownValue, t2)1916 get(size, OpCatch, m_thrownValue, t2) 1917 1917 storei t0, PayloadOffset[cfr, t2, 8] 1918 1918 storei t1, TagOffset[cfr, t2, 8] … … 1927 1927 llintOp(op_end, OpEnd, macro (size, get, dispatch) 1928 1928 checkSwitchToJITForEpilogue() 1929 get( value, t0)1929 get(m_value, t0) 1930 1930 assertNotConstant(size, t0) 1931 1931 loadi TagOffset[cfr, t0, 8], t1 … … 2094 2094 2095 2095 macro getConstantScope() 2096 loadp OpResolveScope::Metadata:: constantScope[t5], t02096 loadp OpResolveScope::Metadata::m_constantScope[t5], t0 2097 2097 return(CellTag, t0) 2098 2098 end 2099 2099 2100 2100 macro resolveScope() 2101 loadi OpResolveScope::Metadata:: localScopeDepth[t5], t22102 get( scope, t0)2101 loadi OpResolveScope::Metadata::m_localScopeDepth[t5], t2 2102 get(m_scope, t0) 2103 2103 loadp PayloadOffset[cfr, t0, 8], t0 2104 2104 btiz t2, .resolveScopeLoopEnd … … 2114 2114 2115 2115 metadata(t5, t0) 2116 loadp OpResolveScope::Metadata:: resolveType[t5], t02116 loadp OpResolveScope::Metadata::m_resolveType[t5], t0 2117 2117 2118 2118 #rGlobalProperty: … … 2163 2163 2164 2164 macro loadWithStructureCheck(op, get, operand, slowPath) 2165 get( scope, t0)2165 get(m_scope, t0) 2166 2166 loadp PayloadOffset[cfr, t0, 8], t0 2167 loadp %op%::Metadata:: structure[t5], t12167 loadp %op%::Metadata::m_structure[t5], t1 2168 2168 bpneq JSCell::m_structureID[t0], t1, slowPath 2169 2169 end … … 2172 2172 llintOpWithMetadata(op_get_from_scope, OpGetFromScope, macro (size, get, dispatch, metadata, return) 2173 2173 macro getProperty() 2174 loadp OpGetFromScope::Metadata:: operand[t5], t32174 loadp OpGetFromScope::Metadata::m_operand[t5], t3 2175 2175 loadPropertyAtVariableOffset(t3, t0, t1, t2) 2176 2176 valueProfile(OpGetFromScope, t5, t1, t2) … … 2179 2179 2180 2180 macro getGlobalVar(tdzCheckIfNecessary) 2181 loadp OpGetFromScope::Metadata:: operand[t5], t02181 loadp OpGetFromScope::Metadata::m_operand[t5], t0 2182 2182 loadp TagOffset[t0], t1 2183 2183 loadp PayloadOffset[t0], t2 … … 2188 2188 2189 2189 macro getClosureVar() 2190 loadp OpGetFromScope::Metadata:: operand[t5], t32190 loadp OpGetFromScope::Metadata::m_operand[t5], t3 2191 2191 loadp JSLexicalEnvironment_variables + TagOffset[t0, t3, 8], t1 2192 2192 loadp JSLexicalEnvironment_variables + PayloadOffset[t0, t3, 8], t2 … … 2196 2196 2197 2197 metadata(t5, t0) 2198 loadi OpGetFromScope::Metadata:: getPutInfo[t5], t02198 loadi OpGetFromScope::Metadata::m_getPutInfo[t5], t0 2199 2199 andi ResolveTypeMask, t0 2200 2200 … … 2217 2217 .gClosureVar: 2218 2218 bineq t0, ClosureVar, .gGlobalPropertyWithVarInjectionChecks 2219 loadVariable(get, scope, t2, t1, t0)2219 loadVariable(get, m_scope, t2, t1, t0) 2220 2220 getClosureVar() 2221 2221 … … 2241 2241 bineq t0, ClosureVarWithVarInjectionChecks, .gDynamic 2242 2242 varInjectionCheck(.gDynamic) 2243 loadVariable(get, scope, t2, t1, t0)2243 loadVariable(get, m_scope, t2, t1, t0) 2244 2244 getClosureVar() 2245 2245 … … 2252 2252 llintOpWithMetadata(op_put_to_scope, OpPutToScope, macro (size, get, dispatch, metadata, return) 2253 2253 macro putProperty() 2254 get( value, t1)2254 get(m_value, t1) 2255 2255 loadConstantOrVariable(size, t1, t2, t3) 2256 loadis OpPutToScope::Metadata:: operand[t5], t12256 loadis OpPutToScope::Metadata::m_operand[t5], t1 2257 2257 storePropertyAtVariableOffset(t1, t0, t2, t3) 2258 2258 end 2259 2259 2260 2260 macro putGlobalVariable() 2261 get( value, t0)2261 get(m_value, t0) 2262 2262 loadConstantOrVariable(size, t0, t1, t2) 2263 loadp OpPutToScope::Metadata:: watchpointSet[t5], t32263 loadp OpPutToScope::Metadata::m_watchpointSet[t5], t3 2264 2264 notifyWrite(t3, .pDynamic) 2265 loadp OpPutToScope::Metadata:: operand[t5], t02265 loadp OpPutToScope::Metadata::m_operand[t5], t0 2266 2266 storei t1, TagOffset[t0] 2267 2267 storei t2, PayloadOffset[t0] … … 2269 2269 2270 2270 macro putClosureVar() 2271 get( value, t1)2271 get(m_value, t1) 2272 2272 loadConstantOrVariable(size, t1, t2, t3) 2273 loadis OpPutToScope::Metadata:: operand[t5], t12273 loadis OpPutToScope::Metadata::m_operand[t5], t1 2274 2274 storei t2, JSLexicalEnvironment_variables + TagOffset[t0, t1, 8] 2275 2275 storei t3, JSLexicalEnvironment_variables + PayloadOffset[t0, t1, 8] … … 2277 2277 2278 2278 macro putLocalClosureVar() 2279 get( value, t1)2279 get(m_value, t1) 2280 2280 loadConstantOrVariable(size, t1, t2, t3) 2281 loadp OpPutToScope::Metadata:: watchpointSet[t5], t12281 loadp OpPutToScope::Metadata::m_watchpointSet[t5], t1 2282 2282 btpz t1, .noVariableWatchpointSet 2283 2283 notifyWrite(t1, .pDynamic) 2284 2284 .noVariableWatchpointSet: 2285 loadis OpPutToScope::Metadata:: operand[t5], t12285 loadis OpPutToScope::Metadata::m_operand[t5], t1 2286 2286 storei t2, JSLexicalEnvironment_variables + TagOffset[t0, t1, 8] 2287 2287 storei t3, JSLexicalEnvironment_variables + PayloadOffset[t0, t1, 8] … … 2290 2290 2291 2291 metadata(t5, t0) 2292 loadi OpPutToScope::Metadata:: getPutInfo[t5], t02292 loadi OpPutToScope::Metadata::m_getPutInfo[t5], t0 2293 2293 andi ResolveTypeMask, t0 2294 2294 2295 2295 #pLocalClosureVar: 2296 2296 bineq t0, LocalClosureVar, .pGlobalProperty 2297 loadVariable(get, scope, t2, t1, t0)2297 loadVariable(get, m_scope, t2, t1, t0) 2298 2298 putLocalClosureVar() 2299 writeBarrierOnOperands(size, get, scope,value)2299 writeBarrierOnOperands(size, get, m_scope, m_value) 2300 2300 dispatch() 2301 2301 … … 2304 2304 loadWithStructureCheck(OpPutToScope, get, scope, .pDynamic) 2305 2305 putProperty() 2306 writeBarrierOnOperands(size, get, scope,value)2306 writeBarrierOnOperands(size, get, m_scope, m_value) 2307 2307 dispatch() 2308 2308 … … 2310 2310 bineq t0, GlobalVar, .pGlobalLexicalVar 2311 2311 putGlobalVariable() 2312 writeBarrierOnGlobalObject(size, get, value)2312 writeBarrierOnGlobalObject(size, get, m_value) 2313 2313 dispatch() 2314 2314 … … 2316 2316 bineq t0, GlobalLexicalVar, .pClosureVar 2317 2317 putGlobalVariable() 2318 writeBarrierOnGlobalLexicalEnvironment(size, get, value)2318 writeBarrierOnGlobalLexicalEnvironment(size, get, m_value) 2319 2319 dispatch() 2320 2320 2321 2321 .pClosureVar: 2322 2322 bineq t0, ClosureVar, .pGlobalPropertyWithVarInjectionChecks 2323 loadVariable(get, scope, t2, t1, t0)2323 loadVariable(get, m_scope, t2, t1, t0) 2324 2324 putClosureVar() 2325 writeBarrierOnOperands(size, get, scope,value)2325 writeBarrierOnOperands(size, get, m_scope, m_value) 2326 2326 dispatch() 2327 2327 … … 2330 2330 loadWithStructureCheck(OpPutToScope, get, scope, .pDynamic) 2331 2331 putProperty() 2332 writeBarrierOnOperands(size, get, scope,value)2332 writeBarrierOnOperands(size, get, m_scope, m_value) 2333 2333 dispatch() 2334 2334 … … 2337 2337 varInjectionCheck(.pDynamic) 2338 2338 putGlobalVariable() 2339 writeBarrierOnGlobalObject(size, get, value)2339 writeBarrierOnGlobalObject(size, get, m_value) 2340 2340 dispatch() 2341 2341 … … 2344 2344 varInjectionCheck(.pDynamic) 2345 2345 putGlobalVariable() 2346 writeBarrierOnGlobalLexicalEnvironment(size, get, value)2346 writeBarrierOnGlobalLexicalEnvironment(size, get, m_value) 2347 2347 dispatch() 2348 2348 … … 2350 2350 bineq t0, ClosureVarWithVarInjectionChecks, .pModuleVar 2351 2351 varInjectionCheck(.pDynamic) 2352 loadVariable(get, scope, t2, t1, t0)2352 loadVariable(get, m_scope, t2, t1, t0) 2353 2353 putClosureVar() 2354 writeBarrierOnOperands(size, get, scope,value)2354 writeBarrierOnOperands(size, get, m_scope, m_value) 2355 2355 dispatch() 2356 2356 … … 2367 2367 2368 2368 llintOpWithProfile(op_get_from_arguments, OpGetFromArguments, macro (size, get, dispatch, return) 2369 get( arguments, t0)2369 get(m_arguments, t0) 2370 2370 loadi PayloadOffset[cfr, t0, 8], t0 2371 get( index, t1)2371 get(m_index, t1) 2372 2372 loadi DirectArguments_storage + TagOffset[t0, t1, 8], t2 2373 2373 loadi DirectArguments_storage + PayloadOffset[t0, t1, 8], t3 … … 2377 2377 2378 2378 llintOp(op_put_to_arguments, OpPutToArguments, macro (size, get, dispatch) 2379 writeBarrierOnOperands(size, get, arguments,value)2380 get( arguments, t0)2379 writeBarrierOnOperands(size, get, m_arguments, m_value) 2380 get(m_arguments, t0) 2381 2381 loadi PayloadOffset[cfr, t0, 8], t0 2382 get( value, t1)2382 get(m_value, t1) 2383 2383 loadConstantOrVariable(size, t1, t2, t3) 2384 get( index, t1)2384 get(m_index, t1) 2385 2385 storei t2, DirectArguments_storage + TagOffset[t0, t1, 8] 2386 2386 storei t3, DirectArguments_storage + PayloadOffset[t0, t1, 8] … … 2390 2390 2391 2391 llintOpWithReturn(op_get_parent_scope, OpGetParentScope, macro (size, get, dispatch, return) 2392 get( scope, t0)2392 get(m_scope, t0) 2393 2393 loadp PayloadOffset[cfr, t0, 8], t0 2394 2394 loadp JSScope::m_next[t0], t0 … … 2405 2405 2406 2406 # t0 is holding the payload, t5 is holding the tag. 2407 get( target, t2)2407 get(m_target, t2) 2408 2408 loadConstantOrVariable(size, t2, t5, t0) 2409 2409 … … 2419 2419 2420 2420 # Store the TypeLocation onto the log entry. 2421 loadp OpProfileType::Metadata:: typeLocation[t3], t32421 loadp OpProfileType::Metadata::m_typeLocation[t3], t3 2422 2422 storep t3, TypeProfilerLog::LogEntry::location[t2] 2423 2423 … … 2445 2445 llintOpWithMetadata(op_profile_control_flow, OpProfileControlFlow, macro (size, get, dispatch, metadata, return) 2446 2446 metadata(t5, t0) 2447 loadp OpProfileControlFlow::Metadata:: basicBlockLocation[t5], t02447 loadp OpProfileControlFlow::Metadata::m_basicBlockLocation[t5], t0 2448 2448 loadi BasicBlockLocation::m_executionCount[t0], t1 2449 2449 baddio 1, t1, .done … … 2457 2457 loadi PayloadOffset + ArgumentCount[cfr], t0 2458 2458 subi 1, t0 2459 get( numParametersToSkip, t1)2459 get(m_numParametersToSkip, t1) 2460 2460 bilteq t0, t1, .storeZero 2461 2461 subi t1, t0 … … 2475 2475 loadp Callee + PayloadOffset[cfr], t1 2476 2476 storep t1, ShadowChicken::Packet::callee[t0] 2477 get( scope, t1)2477 get(m_scope, t1) 2478 2478 loadi PayloadOffset[cfr, t1, 8], t1 2479 2479 storep t1, ShadowChicken::Packet::scope[t0] … … 2489 2489 storep cfr, ShadowChicken::Packet::frame[t0] 2490 2490 storep ShadowChickenTailMarker, ShadowChicken::Packet::callee[t0] 2491 loadVariable(get, thisValue, t3, t2, t1)2491 loadVariable(get, m_thisValue, t3, t2, t1) 2492 2492 storei t2, TagOffset + ShadowChicken::Packet::thisValue[t0] 2493 2493 storei t1, PayloadOffset + ShadowChicken::Packet::thisValue[t0] 2494 get( scope, t1)2494 get(m_scope, t1) 2495 2495 loadi PayloadOffset[cfr, t1, 8], t1 2496 2496 storep t1, ShadowChicken::Packet::scope[t0] -
trunk/Source/JavaScriptCore/llint/LowLevelInterpreter64.asm
r240023 r240041 1 2 # Copyright (C) 2011-2018 Apple Inc. All rights reserved. 1 # Copyright (C) 2011-2019 Apple Inc. All rights reserved. 3 2 # 4 3 # Redistribution and use in source and binary forms, with or without … … 38 37 end 39 38 40 macro getuOperandNarrow(op, field , dst)41 loadb constexpr %op%_%field %_index[PB, PC, 1], dst42 end 43 44 macro getOperandNarrow(op, field , dst)45 loadbsp constexpr %op%_%field %_index[PB, PC, 1], dst46 end 47 48 macro getuOperandWide(op, field , dst)49 loadi constexpr %op%_%field %_index * 4 + 1[PB, PC, 1], dst50 end 51 52 macro getOperandWide(op, field , dst)53 loadis constexpr %op%_%field %_index * 4 + 1[PB, PC, 1], dst39 macro getuOperandNarrow(op, fieldName, dst) 40 loadb constexpr %op%_%fieldName%_index[PB, PC, 1], dst 41 end 42 43 macro getOperandNarrow(op, fieldName, dst) 44 loadbsp constexpr %op%_%fieldName%_index[PB, PC, 1], dst 45 end 46 47 macro getuOperandWide(op, fieldName, dst) 48 loadi constexpr %op%_%fieldName%_index * 4 + 1[PB, PC, 1], dst 49 end 50 51 macro getOperandWide(op, fieldName, dst) 52 loadis constexpr %op%_%fieldName%_index * 4 + 1[PB, PC, 1], dst 54 53 end 55 54 … … 57 56 fn(macro (value) 58 57 move value, t2 59 get( dst, t1)58 get(m_dst, t1) 60 59 storeq t2, [cfr, t1, 8] 61 60 dispatch() … … 68 67 metadata(t1, t2) 69 68 valueProfile(op, t1, t3) 70 get( dst, t1)69 get(m_dst, t1) 71 70 storeq t3, [cfr, t1, 8] 72 71 dispatch() … … 75 74 76 75 macro valueProfile(op, metadata, value) 77 storeq value, %op%::Metadata:: profile.m_buckets[metadata]76 storeq value, %op%::Metadata::m_profile.m_buckets[metadata] 78 77 end 79 78 … … 83 82 loadp CodeBlock::m_instructionsRawPointer[PB], PB 84 83 unpoison(_g_CodeBlockPoison, PB, t1) 85 get(size, op, dst, t1)84 get(size, op, m_dst, t1) 86 85 storeq r0, [cfr, t1, 8] 87 86 metadata(size, op, t2, t1) … … 426 425 end 427 426 428 macro loadVariable(get, field , value)429 get(field , value)430 loadq [cfr, value , 8], value427 macro loadVariable(get, fieldName, valueReg) 428 get(fieldName, valueReg) 429 loadq [cfr, valueReg, 8], valueReg 431 430 end 432 431 … … 469 468 end 470 469 471 macro writeBarrierOnOperandWithReload(size, get, cell Operand, reloadAfterSlowPath)472 get(cell Operand, t1)470 macro writeBarrierOnOperandWithReload(size, get, cellFieldName, reloadAfterSlowPath) 471 get(cellFieldName, t1) 473 472 loadConstantOrVariableCell(size, t1, t2, .writeBarrierDone) 474 473 skipIfIsRememberedOrInEden( … … 485 484 end 486 485 487 macro writeBarrierOnOperand(size, get, cell Operand)488 writeBarrierOnOperandWithReload(size, get, cell Operand, macro () end)489 end 490 491 macro writeBarrierOnOperands(size, get, cell Operand, valueOperand)492 get(value Operand, t1)486 macro writeBarrierOnOperand(size, get, cellFieldName) 487 writeBarrierOnOperandWithReload(size, get, cellFieldName, macro () end) 488 end 489 490 macro writeBarrierOnOperands(size, get, cellFieldName, valueFieldName) 491 get(valueFieldName, t1) 493 492 loadConstantOrVariableCell(size, t1, t0, .writeBarrierDone) 494 493 btpz t0, .writeBarrierDone 495 494 496 writeBarrierOnOperand(size, get, cell Operand)495 writeBarrierOnOperand(size, get, cellFieldName) 497 496 .writeBarrierDone: 498 497 end 499 498 500 macro writeBarrierOnGlobal(size, get, value Operand, loadHelper)501 get(value Operand, t1)499 macro writeBarrierOnGlobal(size, get, valueFieldName, loadMacro) 500 get(valueFieldName, t1) 502 501 loadConstantOrVariableCell(size, t1, t0, .writeBarrierDone) 503 502 btpz t0, .writeBarrierDone 504 503 505 load Helper(t3)504 loadMacro(t3) 506 505 skipIfIsRememberedOrInEden( 507 506 t3, … … 516 515 end 517 516 518 macro writeBarrierOnGlobalObject(size, get, value Operand)519 writeBarrierOnGlobal(size, get, value Operand,517 macro writeBarrierOnGlobalObject(size, get, valueFieldName) 518 writeBarrierOnGlobal(size, get, valueFieldName, 520 519 macro(registerToStoreGlobal) 521 520 loadp CodeBlock[cfr], registerToStoreGlobal … … 524 523 end 525 524 526 macro writeBarrierOnGlobalLexicalEnvironment(size, get, value Operand)527 writeBarrierOnGlobal(size, get, value Operand,525 macro writeBarrierOnGlobalLexicalEnvironment(size, get, valueFieldName) 526 writeBarrierOnGlobal(size, get, valueFieldName, 528 527 macro(registerToStoreGlobal) 529 528 loadp CodeBlock[cfr], registerToStoreGlobal … … 668 667 669 668 llintOpWithProfile(op_get_argument, OpGetArgument, macro (size, get, dispatch, return) 670 get( index, t2)669 get(m_index, t2) 671 670 loadi PayloadOffset + ArgumentCount[cfr], t0 672 671 bilteq t0, t2, .opGetArgumentOutOfBounds … … 695 694 696 695 llintOpWithMetadata(op_to_this, OpToThis, macro (size, get, dispatch, metadata, return) 697 get( srcDst, t0)696 get(m_srcDst, t0) 698 697 loadq [cfr, t0, 8], t0 699 698 btqnz t0, tagMask, .opToThisSlow … … 701 700 loadStructureWithScratch(t0, t1, t2, t3) 702 701 metadata(t2, t3) 703 loadp OpToThis::Metadata:: cachedStructure[t2], t2702 loadp OpToThis::Metadata::m_cachedStructure[t2], t2 704 703 bpneq t1, t2, .opToThisSlow 705 704 dispatch() … … 712 711 713 712 llintOp(op_check_tdz, OpCheckTdz, macro (size, get, dispatch) 714 get( target, t0)713 get(m_target, t0) 715 714 loadConstantOrVariable(size, t0, t1) 716 715 bqneq t1, ValueEmpty, .opNotTDZ … … 723 722 724 723 llintOpWithReturn(op_mov, OpMov, macro (size, get, dispatch, return) 725 get( src, t1)724 get(m_src, t1) 726 725 loadConstantOrVariable(size, t1, t2) 727 726 return(t2) … … 730 729 731 730 llintOpWithReturn(op_not, OpNot, macro (size, get, dispatch, return) 732 get( operand, t0)731 get(m_operand, t0) 733 732 loadConstantOrVariable(size, t0, t2) 734 733 xorq ValueFalse, t2 … … 745 744 macro equalityComparisonOp(name, op, integerComparison) 746 745 llintOpWithReturn(op_%name%, op, macro (size, get, dispatch, return) 747 get( rhs, t0)748 get( lhs, t2)746 get(m_rhs, t0) 747 get(m_lhs, t2) 749 748 loadConstantOrVariableInt32(size, t0, t1, .slow) 750 749 loadConstantOrVariableInt32(size, t2, t0, .slow) … … 762 761 macro equalNullComparisonOp(name, op, fn) 763 762 llintOpWithReturn(name, op, macro (size, get, dispatch, return) 764 get( operand, t0)763 get(m_operand, t0) 765 764 loadq [cfr, t0, 8], t0 766 765 btqnz t0, tagMask, .immediate … … 792 791 793 792 llintOpWithReturn(op_is_undefined_or_null, OpIsUndefinedOrNull, macro (size, get, dispatch, return) 794 get( operand, t0)793 get(m_operand, t0) 795 794 loadq [cfr, t0, 8], t0 796 795 andq ~TagBitUndefined, t0 … … 803 802 macro strictEqOp(name, op, equalityOperation) 804 803 llintOpWithReturn(op_%name%, op, macro (size, get, dispatch, return) 805 get( rhs, t0)806 get( lhs, t2)804 get(m_rhs, t0) 805 get(m_lhs, t2) 807 806 loadConstantOrVariable(size, t0, t1) 808 807 loadConstantOrVariable(size, t2, t0) … … 837 836 macro strictEqualityJumpOp(name, op, equalityOperation) 838 837 llintOpWithJump(op_%name%, op, macro (size, get, jump, dispatch) 839 get( lhs, t2)840 get( rhs, t3)838 get(m_lhs, t2) 839 get(m_rhs, t3) 841 840 loadConstantOrVariable(size, t2, t0) 842 841 loadConstantOrVariable(size, t3, t1) … … 854 853 855 854 .jumpTarget: 856 jump( target)855 jump(m_target) 857 856 858 857 .slow: … … 873 872 macro preOp(name, op, arithmeticOperation) 874 873 llintOp(op_%name%, op, macro (size, get, dispatch) 875 get( srcDst, t0)874 get(m_srcDst, t0) 876 875 loadq [cfr, t0, 8], t1 877 876 bqb t1, tagTypeNumber, .slow … … 887 886 888 887 llintOpWithProfile(op_to_number, OpToNumber, macro (size, get, dispatch, return) 889 get( operand, t0)888 get(m_operand, t0) 890 889 loadConstantOrVariable(size, t0, t2) 891 890 bqaeq t2, tagTypeNumber, .opToNumberIsImmediate … … 901 900 902 901 llintOpWithReturn(op_to_string, OpToString, macro (size, get, dispatch, return) 903 get( operand, t1)902 get(m_operand, t1) 904 903 loadConstantOrVariable(size, t1, t0) 905 904 btqnz t0, tagMask, .opToStringSlow … … 915 914 916 915 llintOpWithProfile(op_to_object, OpToObject, macro (size, get, dispatch, return) 917 get( operand, t0)916 get(m_operand, t0) 918 917 loadConstantOrVariable(size, t0, t2) 919 918 btqnz t2, tagMask, .opToObjectSlow … … 928 927 929 928 llintOpWithMetadata(op_negate, OpNegate, macro (size, get, dispatch, metadata, return) 930 get( operand, t0)929 get(m_operand, t0) 931 930 loadConstantOrVariable(size, t0, t3) 932 931 metadata(t1, t2) 933 loadis OpNegate::Metadata:: arithProfile[t1], t2932 loadis OpNegate::Metadata::m_arithProfile[t1], t2 934 933 bqb t3, tagTypeNumber, .opNegateNotInt 935 934 btiz t3, 0x7fffffff, .opNegateSlow … … 937 936 orq tagTypeNumber, t3 938 937 ori ArithProfileInt, t2 939 storei t2, OpNegate::Metadata:: arithProfile[t1]938 storei t2, OpNegate::Metadata::m_arithProfile[t1] 940 939 return(t3) 941 940 .opNegateNotInt: … … 943 942 xorq 0x8000000000000000, t3 944 943 ori ArithProfileNumber, t2 945 storei t2, OpNegate::Metadata:: arithProfile[t1]944 storei t2, OpNegate::Metadata::m_arithProfile[t1] 946 945 return(t3) 947 946 … … 957 956 958 957 macro profile(type) 959 ori type, %op%::Metadata:: arithProfile[t5]958 ori type, %op%::Metadata::m_arithProfile[t5] 960 959 end 961 960 962 get( rhs, t0)963 get( lhs, t2)961 get(m_rhs, t0) 962 get(m_lhs, t2) 964 963 loadConstantOrVariable(size, t0, t1) 965 964 loadConstantOrVariable(size, t2, t0) 966 965 bqb t0, tagTypeNumber, .op1NotInt 967 966 bqb t1, tagTypeNumber, .op2NotInt 968 get( dst, t2)967 get(m_dst, t2) 969 968 integerOperationAndStore(t1, t0, .slow, t2) 970 969 … … 985 984 ci2d t1, ft1 986 985 .op1NotIntReady: 987 get( dst, t2)986 get(m_dst, t2) 988 987 addq tagTypeNumber, t0 989 988 fq2d t0, ft0 … … 996 995 .op2NotInt: 997 996 # First operand is definitely an int, the second is definitely not. 998 get( dst, t2)997 get(m_dst, t2) 999 998 btqz t1, tagTypeNumber, .slow 1000 999 profile(ArithProfileIntNumber) … … 1075 1074 1076 1075 llintOpWithReturn(op_unsigned, OpUnsigned, macro (size, get, dispatch, return) 1077 get( operand, t1)1076 get(m_operand, t1) 1078 1077 loadConstantOrVariable(size, t1, t2) 1079 1078 bilt t2, 0, .opUnsignedSlow … … 1087 1086 macro commonBitOp(opKind, name, op, operation) 1088 1087 opKind(op_%name%, op, macro (size, get, dispatch, return) 1089 get( rhs, t0)1090 get( lhs, t2)1088 get(m_rhs, t0) 1089 get(m_lhs, t2) 1091 1090 loadConstantOrVariable(size, t0, t1) 1092 1091 loadConstantOrVariable(size, t2, t0) … … 1132 1131 1133 1132 llintOpWithProfile(op_bitnot, OpBitnot, macro (size, get, dispatch, return) 1134 get( operand, t0)1133 get(m_operand, t0) 1135 1134 loadConstantOrVariableInt32(size, t0, t3, .opBitNotSlow) 1136 1135 noti t3 … … 1144 1143 1145 1144 llintOp(op_overrides_has_instance, OpOverridesHasInstance, macro (size, get, dispatch) 1146 get( dst, t3)1147 1148 get( hasInstanceValue, t1)1145 get(m_dst, t3) 1146 1147 get(m_hasInstanceValue, t1) 1149 1148 loadConstantOrVariable(size, t1, t0) 1150 1149 loadp CodeBlock[cfr], t2 … … 1153 1152 bqneq t0, t2, .opOverridesHasInstanceNotDefaultSymbol 1154 1153 1155 get( constructor, t1)1154 get(m_constructor, t1) 1156 1155 loadConstantOrVariable(size, t1, t0) 1157 1156 tbz JSCell::m_flags[t0], ImplementsDefaultHasInstance, t1 … … 1167 1166 1168 1167 llintOpWithReturn(op_is_empty, OpIsEmpty, macro (size, get, dispatch, return) 1169 get( operand, t1)1168 get(m_operand, t1) 1170 1169 loadConstantOrVariable(size, t1, t0) 1171 1170 cqeq t0, ValueEmpty, t3 … … 1176 1175 1177 1176 llintOpWithReturn(op_is_undefined, OpIsUndefined, macro (size, get, dispatch, return) 1178 get( operand, t1)1177 get(m_operand, t1) 1179 1178 loadConstantOrVariable(size, t1, t0) 1180 1179 btqz t0, tagMask, .opIsUndefinedCell … … 1197 1196 1198 1197 llintOpWithReturn(op_is_boolean, OpIsBoolean, macro (size, get, dispatch, return) 1199 get( operand, t1)1198 get(m_operand, t1) 1200 1199 loadConstantOrVariable(size, t1, t0) 1201 1200 xorq ValueFalse, t0 … … 1207 1206 1208 1207 llintOpWithReturn(op_is_number, OpIsNumber, macro (size, get, dispatch, return) 1209 get( operand, t1)1208 get(m_operand, t1) 1210 1209 loadConstantOrVariable(size, t1, t0) 1211 1210 tqnz t0, tagTypeNumber, t1 … … 1216 1215 1217 1216 llintOpWithReturn(op_is_cell_with_type, OpIsCellWithType, macro (size, get, dispatch, return) 1218 getu(size, OpIsCellWithType, type, t0)1219 get( operand, t1)1217 getu(size, OpIsCellWithType, m_type, t0) 1218 get(m_operand, t1) 1220 1219 loadConstantOrVariable(size, t1, t3) 1221 1220 btqnz t3, tagMask, .notCellCase … … 1229 1228 1230 1229 llintOpWithReturn(op_is_object, OpIsObject, macro (size, get, dispatch, return) 1231 get( operand, t1)1230 get(m_operand, t1) 1232 1231 loadConstantOrVariable(size, t1, t0) 1233 1232 btqnz t0, tagMask, .opIsObjectNotCell … … 1268 1267 llintOpWithMetadata(op_get_by_id_direct, OpGetByIdDirect, macro (size, get, dispatch, metadata, return) 1269 1268 metadata(t2, t0) 1270 get( base, t0)1269 get(m_base, t0) 1271 1270 loadConstantOrVariableCell(size, t0, t3, .opGetByIdDirectSlow) 1272 1271 loadi JSCell::m_structureID[t3], t1 1273 loadi OpGetByIdDirect::Metadata:: structure[t2], t01272 loadi OpGetByIdDirect::Metadata::m_structure[t2], t0 1274 1273 bineq t0, t1, .opGetByIdDirectSlow 1275 loadi OpGetByIdDirect::Metadata:: offset[t2], t11274 loadi OpGetByIdDirect::Metadata::m_offset[t2], t1 1276 1275 loadPropertyAtVariableOffset(t1, t3, t0) 1277 1276 valueProfile(OpGetByIdDirect, t2, t0) … … 1286 1285 llintOpWithMetadata(op_get_by_id, OpGetById, macro (size, get, dispatch, metadata, return) 1287 1286 metadata(t2, t1) 1288 loadb OpGetById::Metadata::m ode[t2], t11289 get( base, t0)1287 loadb OpGetById::Metadata::m_mode[t2], t1 1288 get(m_base, t0) 1290 1289 loadConstantOrVariableCell(size, t0, t3, .opGetByIdSlow) 1291 1290 … … 1293 1292 bbneq t1, constexpr GetByIdMode::Default, .opGetByIdProtoLoad 1294 1293 loadi JSCell::m_structureID[t3], t1 1295 loadi OpGetById::Metadata::m odeMetadata.defaultMode.structure[t2], t01294 loadi OpGetById::Metadata::m_modeMetadata.defaultMode.structure[t2], t0 1296 1295 bineq t0, t1, .opGetByIdSlow 1297 loadis OpGetById::Metadata::m odeMetadata.defaultMode.cachedOffset[t2], t11296 loadis OpGetById::Metadata::m_modeMetadata.defaultMode.cachedOffset[t2], t1 1298 1297 loadPropertyAtVariableOffset(t1, t3, t0) 1299 1298 valueProfile(OpGetById, t2, t0) … … 1303 1302 bbneq t1, constexpr GetByIdMode::ProtoLoad, .opGetByIdArrayLength 1304 1303 loadi JSCell::m_structureID[t3], t1 1305 loadi OpGetById::Metadata::m odeMetadata.protoLoadMode.structure[t2], t31304 loadi OpGetById::Metadata::m_modeMetadata.protoLoadMode.structure[t2], t3 1306 1305 bineq t3, t1, .opGetByIdSlow 1307 loadis OpGetById::Metadata::m odeMetadata.protoLoadMode.cachedOffset[t2], t11308 loadp OpGetById::Metadata::m odeMetadata.protoLoadMode.cachedSlot[t2], t31306 loadis OpGetById::Metadata::m_modeMetadata.protoLoadMode.cachedOffset[t2], t1 1307 loadp OpGetById::Metadata::m_modeMetadata.protoLoadMode.cachedSlot[t2], t3 1309 1308 loadPropertyAtVariableOffset(t1, t3, t0) 1310 1309 valueProfile(OpGetById, t2, t0) … … 1314 1313 bbneq t1, constexpr GetByIdMode::ArrayLength, .opGetByIdUnset 1315 1314 move t3, t0 1316 arrayProfile(OpGetById::Metadata::m odeMetadata.arrayLengthMode.arrayProfile, t0, t2, t5)1315 arrayProfile(OpGetById::Metadata::m_modeMetadata.arrayLengthMode.arrayProfile, t0, t2, t5) 1317 1316 btiz t0, IsArray, .opGetByIdSlow 1318 1317 btiz t0, IndexingShapeMask, .opGetByIdSlow … … 1326 1325 .opGetByIdUnset: 1327 1326 loadi JSCell::m_structureID[t3], t1 1328 loadi OpGetById::Metadata::m odeMetadata.unsetMode.structure[t2], t01327 loadi OpGetById::Metadata::m_modeMetadata.unsetMode.structure[t2], t0 1329 1328 bineq t0, t1, .opGetByIdSlow 1330 1329 valueProfile(OpGetById, t2, ValueUndefined) … … 1338 1337 1339 1338 llintOpWithMetadata(op_put_by_id, OpPutById, macro (size, get, dispatch, metadata, return) 1340 get( base, t3)1339 get(m_base, t3) 1341 1340 loadConstantOrVariableCell(size, t3, t0, .opPutByIdSlow) 1342 1341 metadata(t5, t2) 1343 loadis OpPutById::Metadata:: oldStructure[t5], t21342 loadis OpPutById::Metadata::m_oldStructure[t5], t2 1344 1343 bineq t2, JSCell::m_structureID[t0], .opPutByIdSlow 1345 1344 … … 1349 1348 # t5 -> metadata 1350 1349 1351 loadi OpPutById::Metadata:: newStructure[t5], t11350 loadi OpPutById::Metadata::m_newStructure[t5], t1 1352 1351 btiz t1, .opPutByIdNotTransition 1353 1352 … … 1355 1354 # If we have a chain, we need to check it. t0 is the base. We may clobber t1 to use it as 1356 1355 # scratch. 1357 loadp OpPutById::Metadata:: structureChain[t5], t31356 loadp OpPutById::Metadata::m_structureChain[t5], t3 1358 1357 btpz t3, .opPutByIdTransitionDirect 1359 1358 … … 1361 1360 1362 1361 # reload the StructureChain since we used t3 as a scratch above 1363 loadp OpPutById::Metadata:: structureChain[t5], t31362 loadp OpPutById::Metadata::m_structureChain[t5], t3 1364 1363 1365 1364 loadp StructureChain::m_vector[t3], t3 … … 1382 1381 .opPutByIdTransitionChainDone: 1383 1382 # Reload the new structure, since we clobbered it above. 1384 loadi OpPutById::Metadata:: newStructure[t5], t11383 loadi OpPutById::Metadata::m_newStructure[t5], t1 1385 1384 1386 1385 .opPutByIdTransitionDirect: 1387 1386 storei t1, JSCell::m_structureID[t0] 1388 writeBarrierOnOperandWithReload(size, get, base, macro ()1387 writeBarrierOnOperandWithReload(size, get, m_base, macro () 1389 1388 # Reload metadata into t5 1390 1389 metadata(t5, t1) 1391 1390 # Reload base into t0 1392 get( base, t1)1391 get(m_base, t1) 1393 1392 loadConstantOrVariable(size, t1, t0) 1394 1393 end) … … 1396 1395 .opPutByIdNotTransition: 1397 1396 # The only thing live right now is t0, which holds the base. 1398 get( value, t1)1397 get(m_value, t1) 1399 1398 loadConstantOrVariable(size, t1, t2) 1400 loadi OpPutById::Metadata:: offset[t5], t11399 loadi OpPutById::Metadata::m_offset[t5], t1 1401 1400 storePropertyAtVariableOffset(t1, t0, t2) 1402 writeBarrierOnOperands(size, get, base,value)1401 writeBarrierOnOperands(size, get, m_base, m_value) 1403 1402 dispatch() 1404 1403 … … 1411 1410 llintOpWithMetadata(op_get_by_val, OpGetByVal, macro (size, get, dispatch, metadata, return) 1412 1411 macro finishGetByVal(result, scratch) 1413 get( dst, scratch)1412 get(m_dst, scratch) 1414 1413 storeq result, [cfr, scratch, 8] 1415 1414 valueProfile(OpGetByVal, t5, result) … … 1430 1429 metadata(t5, t2) 1431 1430 1432 get( base, t2)1431 get(m_base, t2) 1433 1432 loadConstantOrVariableCell(size, t2, t0, .opGetByValSlow) 1434 1433 1435 1434 move t0, t2 1436 arrayProfile(OpGetByVal::Metadata:: arrayProfile, t2, t5, t1)1437 1438 get( property, t3)1435 arrayProfile(OpGetByVal::Metadata::m_arrayProfile, t2, t5, t1) 1436 1437 get(m_property, t3) 1439 1438 loadConstantOrVariableInt32(size, t3, t1, .opGetByValSlow) 1440 1439 sxi2q t1, t1 … … 1449 1448 .opGetByValIsContiguous: 1450 1449 biaeq t1, -sizeof IndexingHeader + IndexingHeader::u.lengths.publicLength[t3], .opGetByValSlow 1451 get( dst, t0)1450 get(m_dst, t0) 1452 1451 loadq [t3, t1, 8], t2 1453 1452 btqz t2, .opGetByValSlow … … 1457 1456 bineq t2, DoubleShape, .opGetByValNotDouble 1458 1457 biaeq t1, -sizeof IndexingHeader + IndexingHeader::u.lengths.publicLength[t3], .opGetByValSlow 1459 get( dst, t0)1458 get(m_dst, t0) 1460 1459 loadd [t3, t1, 8], ft0 1461 1460 bdnequn ft0, ft0, .opGetByValSlow … … 1468 1467 bia t2, SlowPutArrayStorageShape - ArrayStorageShape, .opGetByValNotIndexedStorage 1469 1468 biaeq t1, -sizeof IndexingHeader + IndexingHeader::u.lengths.vectorLength[t3], .opGetByValSlow 1470 get( dst, t0)1469 get(m_dst, t0) 1471 1470 loadq ArrayStorage::m_vector[t3, t1, 8], t2 1472 1471 btqz t2, .opGetByValSlow … … 1581 1580 biaeq t3, -sizeof IndexingHeader + IndexingHeader::u.lengths.publicLength[t0], .outOfBounds 1582 1581 .storeResult: 1583 get( value, t2)1582 get(m_value, t2) 1584 1583 storeCallback(t2, t1, [t0, t3, 8]) 1585 1584 dispatch() … … 1587 1586 .outOfBounds: 1588 1587 biaeq t3, -sizeof IndexingHeader + IndexingHeader::u.lengths.vectorLength[t0], .opPutByValOutOfBounds 1589 storeb 1, %op%::Metadata:: arrayProfile.m_mayStoreToHole[t5]1588 storeb 1, %op%::Metadata::m_arrayProfile.m_mayStoreToHole[t5] 1590 1589 addi 1, t3, t2 1591 1590 storei t2, -sizeof IndexingHeader + IndexingHeader::u.lengths.publicLength[t0] … … 1593 1592 end 1594 1593 1595 get( base, t0)1594 get(m_base, t0) 1596 1595 loadConstantOrVariableCell(size, t0, t1, .opPutByValSlow) 1597 1596 move t1, t2 1598 1597 metadata(t5, t0) 1599 arrayProfile(%op%::Metadata:: arrayProfile, t2, t5, t0)1600 get( property, t0)1598 arrayProfile(%op%::Metadata::m_arrayProfile, t2, t5, t0) 1599 get(m_property, t0) 1601 1600 loadConstantOrVariableInt32(size, t0, t3, .opPutByValSlow) 1602 1601 sxi2q t3, t3 … … 1611 1610 bqb scratch, tagTypeNumber, .opPutByValSlow 1612 1611 storeq scratch, address 1613 writeBarrierOnOperands(size, get, base,value)1612 writeBarrierOnOperands(size, get, m_base, m_value) 1614 1613 end) 1615 1614 … … 1628 1627 .ready: 1629 1628 stored ft0, address 1630 writeBarrierOnOperands(size, get, base,value)1629 writeBarrierOnOperands(size, get, m_base, m_value) 1631 1630 end) 1632 1631 … … 1637 1636 loadConstantOrVariable(size, operand, scratch) 1638 1637 storeq scratch, address 1639 writeBarrierOnOperands(size, get, base,value)1638 writeBarrierOnOperands(size, get, m_base, m_value) 1640 1639 end) 1641 1640 … … 1645 1644 btqz ArrayStorage::m_vector[t0, t3, 8], .opPutByValArrayStorageEmpty 1646 1645 .opPutByValArrayStorageStoreResult: 1647 get( value, t2)1646 get(m_value, t2) 1648 1647 loadConstantOrVariable(size, t2, t1) 1649 1648 storeq t1, ArrayStorage::m_vector[t0, t3, 8] 1650 writeBarrierOnOperands(size, get, base,value)1649 writeBarrierOnOperands(size, get, m_base, m_value) 1651 1650 dispatch() 1652 1651 1653 1652 .opPutByValArrayStorageEmpty: 1654 storeb 1, %op%::Metadata:: arrayProfile.m_mayStoreToHole[t5]1653 storeb 1, %op%::Metadata::m_arrayProfile.m_mayStoreToHole[t5] 1655 1654 addi 1, ArrayStorage::m_numValuesInVector[t0] 1656 1655 bib t3, -sizeof IndexingHeader + IndexingHeader::u.lengths.publicLength[t0], .opPutByValArrayStorageStoreResult … … 1660 1659 1661 1660 .opPutByValOutOfBounds: 1662 storeb 1, %op%::Metadata:: arrayProfile.m_outOfBounds[t5]1661 storeb 1, %op%::Metadata::m_arrayProfile.m_outOfBounds[t5] 1663 1662 .opPutByValSlow: 1664 1663 callSlowPath(_llint_slow_path_%name%) … … 1674 1673 macro llintJumpTrueOrFalseOp(name, op, conditionOp) 1675 1674 llintOpWithJump(op_%name%, op, macro (size, get, jump, dispatch) 1676 get( condition, t1)1675 get(m_condition, t1) 1677 1676 loadConstantOrVariable(size, t1, t0) 1678 1677 btqnz t0, ~0xf, .slow … … 1681 1680 1682 1681 .target: 1683 jump( target)1682 jump(m_target) 1684 1683 1685 1684 .slow: … … 1692 1691 macro equalNullJumpOp(name, op, cellHandler, immediateHandler) 1693 1692 llintOpWithJump(op_%name%, op, macro (size, get, jump, dispatch) 1694 get( value, t0)1693 get(m_value, t0) 1695 1694 assertNotConstant(size, t0) 1696 1695 loadq [cfr, t0, 8], t0 … … 1701 1700 1702 1701 .target: 1703 jump( target)1702 jump(m_target) 1704 1703 1705 1704 .immediate: … … 1732 1731 1733 1732 llintOpWithMetadata(op_jneq_ptr, OpJneqPtr, macro (size, get, dispatch, metadata, return) 1734 get( value, t0)1735 get( specialPointer, t1)1733 get(m_value, t0) 1734 get(m_specialPointer, t1) 1736 1735 loadp CodeBlock[cfr], t2 1737 1736 loadp CodeBlock::m_globalObject[t2], t2 … … 1742 1741 .opJneqPtrTarget: 1743 1742 metadata(t5, t0) 1744 storeb 1, OpJneqPtr::Metadata:: hasJumped[t5]1745 get( target, t0)1743 storeb 1, OpJneqPtr::Metadata::m_hasJumped[t5] 1744 get(m_target, t0) 1746 1745 jumpImpl(t0) 1747 1746 end) … … 1750 1749 macro compareJumpOp(name, op, integerCompare, doubleCompare) 1751 1750 llintOpWithJump(op_%name%, op, macro (size, get, jump, dispatch) 1752 get( lhs, t2)1753 get( rhs, t3)1751 get(m_lhs, t2) 1752 get(m_rhs, t3) 1754 1753 loadConstantOrVariable(size, t2, t0) 1755 1754 loadConstantOrVariable(size, t3, t1) … … 1783 1782 1784 1783 .jumpTarget: 1785 jump( target)1784 jump(m_target) 1786 1785 1787 1786 .slow: … … 1794 1793 macro equalityJumpOp(name, op, integerComparison) 1795 1794 llintOpWithJump(op_%name%, op, macro (size, get, jump, dispatch) 1796 get( lhs, t2)1797 get( rhs, t3)1795 get(m_lhs, t2) 1796 get(m_rhs, t3) 1798 1797 loadConstantOrVariableInt32(size, t2, t0, .slow) 1799 1798 loadConstantOrVariableInt32(size, t3, t1, .slow) … … 1802 1801 1803 1802 .jumpTarget: 1804 jump( target)1803 jump(m_target) 1805 1804 1806 1805 .slow: … … 1811 1810 1812 1811 1813 macro compareUnsignedJumpOp(name, op, integerCompare )1812 macro compareUnsignedJumpOp(name, op, integerCompareMacro) 1814 1813 llintOpWithJump(op_%name%, op, macro (size, get, jump, dispatch) 1815 get( lhs, t2)1816 get( rhs, t3)1814 get(m_lhs, t2) 1815 get(m_rhs, t3) 1817 1816 loadConstantOrVariable(size, t2, t0) 1818 1817 loadConstantOrVariable(size, t3, t1) 1819 integerCompare (t0, t1, .jumpTarget)1818 integerCompareMacro(t0, t1, .jumpTarget) 1820 1819 dispatch() 1821 1820 1822 1821 .jumpTarget: 1823 jump( target)1822 jump(m_target) 1824 1823 end) 1825 1824 end … … 1828 1827 macro compareUnsignedOp(name, op, integerCompareAndSet) 1829 1828 llintOpWithReturn(op_%name%, op, macro (size, get, dispatch, return) 1830 get( lhs, t2)1831 get( rhs, t0)1829 get(m_lhs, t2) 1830 get(m_rhs, t0) 1832 1831 loadConstantOrVariable(size, t0, t1) 1833 1832 loadConstantOrVariable(size, t2, t0) … … 1840 1839 1841 1840 llintOpWithJump(op_switch_imm, OpSwitchImm, macro (size, get, jump, dispatch) 1842 get( scrutinee, t2)1843 get( tableIndex, t3)1841 get(m_scrutinee, t2) 1842 get(m_tableIndex, t3) 1844 1843 loadConstantOrVariable(size, t2, t1) 1845 1844 loadp CodeBlock[cfr], t2 … … 1859 1858 btqnz t1, tagTypeNumber, .opSwitchImmSlow # Go slow if it's a double. 1860 1859 .opSwitchImmFallThrough: 1861 jump( defaultOffset)1860 jump(m_defaultOffset) 1862 1861 1863 1862 .opSwitchImmSlow: … … 1868 1867 1869 1868 llintOpWithJump(op_switch_char, OpSwitchChar, macro (size, get, jump, dispatch) 1870 get( scrutinee, t2)1871 get( tableIndex, t3)1869 get(m_scrutinee, t2) 1870 get(m_tableIndex, t3) 1872 1871 loadConstantOrVariable(size, t2, t1) 1873 1872 loadp CodeBlock[cfr], t2 … … 1896 1895 1897 1896 .opSwitchCharFallThrough: 1898 jump( defaultOffset)1897 jump(m_defaultOffset) 1899 1898 1900 1899 .opSwitchOnRope: … … 1906 1905 # we assume t5 contains the metadata, and we should not scratch that 1907 1906 macro arrayProfileForCall(op, getu) 1908 getu( argv, t3)1907 getu(m_argv, t3) 1909 1908 negp t3 1910 1909 loadq ThisArgumentOffset[cfr, t3, 8], t0 1911 1910 btqnz t0, tagMask, .done 1912 1911 loadi JSCell::m_structureID[t0], t3 1913 storei t3, %op%::Metadata:: arrayProfile.m_lastSeenStructureID[t5]1912 storei t3, %op%::Metadata::m_arrayProfile.m_lastSeenStructureID[t5] 1914 1913 .done: 1915 1914 end … … 1919 1918 metadata(t5, t0) 1920 1919 1921 prologue(macro (field , dst)1922 getu(size, op, field , dst)1920 prologue(macro (fieldName, dst) 1921 getu(size, op, fieldName, dst) 1923 1922 end, metadata) 1924 1923 1925 get( callee, t0)1926 loadp %op%::Metadata:: callLinkInfo.callee[t5], t21924 get(m_callee, t0) 1925 loadp %op%::Metadata::m_callLinkInfo.callee[t5], t2 1927 1926 loadConstantOrVariable(size, t0, t3) 1928 1927 bqneq t3, t2, .opCallSlow 1929 getu(size, op, argv, t3)1928 getu(size, op, m_argv, t3) 1930 1929 lshifti 3, t3 1931 1930 negp t3 1932 1931 addp cfr, t3 1933 1932 storeq t2, Callee[t3] 1934 getu(size, op, argc, t2)1933 getu(size, op, m_argc, t2) 1935 1934 storei PC, ArgumentCount + TagOffset[cfr] 1936 1935 storei t2, ArgumentCount + PayloadOffset[t3] … … 1938 1937 if POISON 1939 1938 loadp _g_JITCodePoison, t2 1940 xorp %op%::Metadata:: callLinkInfo.machineCodeTarget[t5], t21939 xorp %op%::Metadata::m_callLinkInfo.machineCodeTarget[t5], t2 1941 1940 prepareCall(t2, t1, t3, t4, JSEntryPtrTag) 1942 1941 callTargetFunction(size, op, dispatch, t2, JSEntryPtrTag) 1943 1942 else 1944 prepareCall(%op%::Metadata:: callLinkInfo.machineCodeTarget[t5], t2, t3, t4, JSEntryPtrTag)1945 callTargetFunction(size, op, dispatch, %op%::Metadata:: callLinkInfo.machineCodeTarget[t5], JSEntryPtrTag)1943 prepareCall(%op%::Metadata::m_callLinkInfo.machineCodeTarget[t5], t2, t3, t4, JSEntryPtrTag) 1944 callTargetFunction(size, op, dispatch, %op%::Metadata::m_callLinkInfo.machineCodeTarget[t5], JSEntryPtrTag) 1946 1945 end 1947 1946 … … 1953 1952 llintOp(op_ret, OpRet, macro (size, get, dispatch) 1954 1953 checkSwitchToJITForEpilogue() 1955 get( value, t2)1954 get(m_value, t2) 1956 1955 loadConstantOrVariable(size, t2, r0) 1957 1956 doReturn() … … 1960 1959 1961 1960 llintOpWithReturn(op_to_primitive, OpToPrimitive, macro (size, get, dispatch, return) 1962 get( src, t2)1961 get(m_src, t2) 1963 1962 loadConstantOrVariable(size, t2, t0) 1964 1963 btqnz t0, tagMask, .opToPrimitiveIsImm … … 2005 2004 loadp VM::m_exception[t3], t0 2006 2005 storep 0, VM::m_exception[t3] 2007 get(size, OpCatch, exception, t2)2006 get(size, OpCatch, m_exception, t2) 2008 2007 storeq t0, [cfr, t2, 8] 2009 2008 2010 2009 loadq Exception::m_value[t0], t3 2011 get(size, OpCatch, thrownValue, t2)2010 get(size, OpCatch, m_thrownValue, t2) 2012 2011 storeq t3, [cfr, t2, 8] 2013 2012 … … 2022 2021 llintOp(op_end, OpEnd, macro (size, get, dispatch) 2023 2022 checkSwitchToJITForEpilogue() 2024 get( value, t0)2023 get(m_value, t0) 2025 2024 assertNotConstant(size, t0) 2026 2025 loadq [cfr, t0, 8], r0 … … 2153 2152 2154 2153 macro getConstantScope() 2155 loadp OpResolveScope::Metadata:: constantScope[t5], t02154 loadp OpResolveScope::Metadata::m_constantScope[t5], t0 2156 2155 return(t0) 2157 2156 end 2158 2157 2159 2158 macro resolveScope() 2160 loadi OpResolveScope::Metadata:: localScopeDepth[t5], t22161 get( scope, t0)2159 loadi OpResolveScope::Metadata::m_localScopeDepth[t5], t2 2160 get(m_scope, t0) 2162 2161 loadq [cfr, t0, 8], t0 2163 2162 btiz t2, .resolveScopeLoopEnd … … 2172 2171 end 2173 2172 2174 loadp OpResolveScope::Metadata:: resolveType[t5], t02173 loadp OpResolveScope::Metadata::m_resolveType[t5], t0 2175 2174 2176 2175 #rGlobalProperty: … … 2221 2220 2222 2221 macro loadWithStructureCheck(op, get, slowPath) 2223 get( scope, t0)2222 get(m_scope, t0) 2224 2223 loadq [cfr, t0, 8], t0 2225 2224 loadStructureWithScratch(t0, t2, t1, t3) 2226 loadp %op%::Metadata:: structure[t5], t12225 loadp %op%::Metadata::m_structure[t5], t1 2227 2226 bpneq t2, t1, slowPath 2228 2227 end … … 2232 2231 2233 2232 macro getProperty() 2234 loadp OpGetFromScope::Metadata:: operand[t5], t12233 loadp OpGetFromScope::Metadata::m_operand[t5], t1 2235 2234 loadPropertyAtVariableOffset(t1, t0, t2) 2236 2235 valueProfile(OpGetFromScope, t5, t2) … … 2239 2238 2240 2239 macro getGlobalVar(tdzCheckIfNecessary) 2241 loadp OpGetFromScope::Metadata:: operand[t5], t02240 loadp OpGetFromScope::Metadata::m_operand[t5], t0 2242 2241 loadq [t0], t0 2243 2242 tdzCheckIfNecessary(t0) … … 2247 2246 2248 2247 macro getClosureVar() 2249 loadp OpGetFromScope::Metadata:: operand[t5], t12248 loadp OpGetFromScope::Metadata::m_operand[t5], t1 2250 2249 loadq JSLexicalEnvironment_variables[t0, t1, 8], t0 2251 2250 valueProfile(OpGetFromScope, t5, t0) … … 2253 2252 end 2254 2253 2255 loadi OpGetFromScope::Metadata:: getPutInfo[t5], t02254 loadi OpGetFromScope::Metadata::m_getPutInfo[t5], t0 2256 2255 andi ResolveTypeMask, t0 2257 2256 … … 2274 2273 .gClosureVar: 2275 2274 bineq t0, ClosureVar, .gGlobalPropertyWithVarInjectionChecks 2276 loadVariable(get, scope, t0)2275 loadVariable(get, m_scope, t0) 2277 2276 getClosureVar() 2278 2277 … … 2298 2297 bineq t0, ClosureVarWithVarInjectionChecks, .gDynamic 2299 2298 varInjectionCheck(.gDynamic, t2) 2300 loadVariable(get, scope, t0)2299 loadVariable(get, m_scope, t0) 2301 2300 getClosureVar() 2302 2301 … … 2309 2308 llintOpWithMetadata(op_put_to_scope, OpPutToScope, macro (size, get, dispatch, metadata, return) 2310 2309 macro putProperty() 2311 get( value, t1)2310 get(m_value, t1) 2312 2311 loadConstantOrVariable(size, t1, t2) 2313 loadis OpPutToScope::Metadata:: operand[t5], t12312 loadis OpPutToScope::Metadata::m_operand[t5], t1 2314 2313 storePropertyAtVariableOffset(t1, t0, t2) 2315 2314 end 2316 2315 2317 2316 macro putGlobalVariable() 2318 get( value, t0)2317 get(m_value, t0) 2319 2318 loadConstantOrVariable(size, t0, t1) 2320 loadp OpPutToScope::Metadata:: watchpointSet[t5], t22321 loadp OpPutToScope::Metadata:: operand[t5], t02319 loadp OpPutToScope::Metadata::m_watchpointSet[t5], t2 2320 loadp OpPutToScope::Metadata::m_operand[t5], t0 2322 2321 notifyWrite(t2, .pDynamic) 2323 2322 storeq t1, [t0] … … 2325 2324 2326 2325 macro putClosureVar() 2327 get( value, t1)2326 get(m_value, t1) 2328 2327 loadConstantOrVariable(size, t1, t2) 2329 loadis OpPutToScope::Metadata:: operand[t5], t12328 loadis OpPutToScope::Metadata::m_operand[t5], t1 2330 2329 storeq t2, JSLexicalEnvironment_variables[t0, t1, 8] 2331 2330 end 2332 2331 2333 2332 macro putLocalClosureVar() 2334 get( value, t1)2333 get(m_value, t1) 2335 2334 loadConstantOrVariable(size, t1, t2) 2336 loadp OpPutToScope::Metadata:: watchpointSet[t5], t32335 loadp OpPutToScope::Metadata::m_watchpointSet[t5], t3 2337 2336 btpz t3, .noVariableWatchpointSet 2338 2337 notifyWrite(t3, .pDynamic) 2339 2338 .noVariableWatchpointSet: 2340 loadis OpPutToScope::Metadata:: operand[t5], t12339 loadis OpPutToScope::Metadata::m_operand[t5], t1 2341 2340 storeq t2, JSLexicalEnvironment_variables[t0, t1, 8] 2342 2341 end 2343 2342 2344 2343 macro checkTDZInGlobalPutToScopeIfNecessary() 2345 loadis OpPutToScope::Metadata:: getPutInfo[t5], t02344 loadis OpPutToScope::Metadata::m_getPutInfo[t5], t0 2346 2345 andi InitializationModeMask, t0 2347 2346 rshifti InitializationModeShift, t0 2348 2347 bineq t0, NotInitialization, .noNeedForTDZCheck 2349 loadp OpPutToScope::Metadata:: operand[t5], t02348 loadp OpPutToScope::Metadata::m_operand[t5], t0 2350 2349 loadq [t0], t0 2351 2350 bqeq t0, ValueEmpty, .pDynamic … … 2354 2353 2355 2354 metadata(t5, t0) 2356 loadi OpPutToScope::Metadata:: getPutInfo[t5], t02355 loadi OpPutToScope::Metadata::m_getPutInfo[t5], t0 2357 2356 andi ResolveTypeMask, t0 2358 2357 2359 2358 #pLocalClosureVar: 2360 2359 bineq t0, LocalClosureVar, .pGlobalProperty 2361 loadVariable(get, scope, t0)2360 loadVariable(get, m_scope, t0) 2362 2361 putLocalClosureVar() 2363 writeBarrierOnOperands(size, get, scope,value)2362 writeBarrierOnOperands(size, get, m_scope, m_value) 2364 2363 dispatch() 2365 2364 … … 2368 2367 loadWithStructureCheck(OpPutToScope, get, .pDynamic) 2369 2368 putProperty() 2370 writeBarrierOnOperands(size, get, scope,value)2369 writeBarrierOnOperands(size, get, m_scope, m_value) 2371 2370 dispatch() 2372 2371 … … 2374 2373 bineq t0, GlobalVar, .pGlobalLexicalVar 2375 2374 putGlobalVariable() 2376 writeBarrierOnGlobalObject(size, get, value)2375 writeBarrierOnGlobalObject(size, get, m_value) 2377 2376 dispatch() 2378 2377 … … 2381 2380 checkTDZInGlobalPutToScopeIfNecessary() 2382 2381 putGlobalVariable() 2383 writeBarrierOnGlobalLexicalEnvironment(size, get, value)2382 writeBarrierOnGlobalLexicalEnvironment(size, get, m_value) 2384 2383 dispatch() 2385 2384 2386 2385 .pClosureVar: 2387 2386 bineq t0, ClosureVar, .pGlobalPropertyWithVarInjectionChecks 2388 loadVariable(get, scope, t0)2387 loadVariable(get, m_scope, t0) 2389 2388 putClosureVar() 2390 writeBarrierOnOperands(size, get, scope,value)2389 writeBarrierOnOperands(size, get, m_scope, m_value) 2391 2390 dispatch() 2392 2391 … … 2395 2394 loadWithStructureCheck(OpPutToScope, get, .pDynamic) 2396 2395 putProperty() 2397 writeBarrierOnOperands(size, get, scope,value)2396 writeBarrierOnOperands(size, get, m_scope, m_value) 2398 2397 dispatch() 2399 2398 … … 2402 2401 varInjectionCheck(.pDynamic, t2) 2403 2402 putGlobalVariable() 2404 writeBarrierOnGlobalObject(size, get, value)2403 writeBarrierOnGlobalObject(size, get, m_value) 2405 2404 dispatch() 2406 2405 … … 2410 2409 checkTDZInGlobalPutToScopeIfNecessary() 2411 2410 putGlobalVariable() 2412 writeBarrierOnGlobalLexicalEnvironment(size, get, value)2411 writeBarrierOnGlobalLexicalEnvironment(size, get, m_value) 2413 2412 dispatch() 2414 2413 … … 2416 2415 bineq t0, ClosureVarWithVarInjectionChecks, .pModuleVar 2417 2416 varInjectionCheck(.pDynamic, t2) 2418 loadVariable(get, scope, t0)2417 loadVariable(get, m_scope, t0) 2419 2418 putClosureVar() 2420 writeBarrierOnOperands(size, get, scope,value)2419 writeBarrierOnOperands(size, get, m_scope, m_value) 2421 2420 dispatch() 2422 2421 … … 2433 2432 2434 2433 llintOpWithProfile(op_get_from_arguments, OpGetFromArguments, macro (size, get, dispatch, return) 2435 loadVariable(get, arguments, t0)2436 getu(size, OpGetFromArguments, index, t1)2434 loadVariable(get, m_arguments, t0) 2435 getu(size, OpGetFromArguments, m_index, t1) 2437 2436 loadq DirectArguments_storage[t0, t1, 8], t0 2438 2437 return(t0) … … 2441 2440 2442 2441 llintOp(op_put_to_arguments, OpPutToArguments, macro (size, get, dispatch) 2443 loadVariable(get, arguments, t0)2444 getu(size, OpPutToArguments, index, t1)2445 get( value, t3)2442 loadVariable(get, m_arguments, t0) 2443 getu(size, OpPutToArguments, m_index, t1) 2444 get(m_value, t3) 2446 2445 loadConstantOrVariable(size, t3, t2) 2447 2446 storeq t2, DirectArguments_storage[t0, t1, 8] 2448 writeBarrierOnOperands(size, get, arguments,value)2447 writeBarrierOnOperands(size, get, m_arguments, m_value) 2449 2448 dispatch() 2450 2449 end) … … 2452 2451 2453 2452 llintOpWithReturn(op_get_parent_scope, OpGetParentScope, macro (size, get, dispatch, return) 2454 loadVariable(get, scope, t0)2453 loadVariable(get, m_scope, t0) 2455 2454 loadp JSScope::m_next[t0], t0 2456 2455 return(t0) … … 2468 2467 2469 2468 # t0 is holding the JSValue argument. 2470 get( target, t3)2469 get(m_target, t3) 2471 2470 loadConstantOrVariable(size, t3, t0) 2472 2471 … … 2477 2476 # Store the TypeLocation onto the log entry. 2478 2477 metadata(t5, t3) 2479 loadp OpProfileType::Metadata:: typeLocation[t5], t32478 loadp OpProfileType::Metadata::m_typeLocation[t5], t3 2480 2479 storep t3, TypeProfilerLog::LogEntry::location[t2] 2481 2480 … … 2503 2502 llintOpWithMetadata(op_profile_control_flow, OpProfileControlFlow, macro (size, get, dispatch, metadata, return) 2504 2503 metadata(t5, t0) 2505 loadp OpProfileControlFlow::Metadata:: basicBlockLocation[t5], t02504 loadp OpProfileControlFlow::Metadata::m_basicBlockLocation[t5], t0 2506 2505 addq 1, BasicBlockLocation::m_executionCount[t0] 2507 2506 dispatch() … … 2512 2511 loadi PayloadOffset + ArgumentCount[cfr], t0 2513 2512 subi 1, t0 2514 getu(size, OpGetRestLength, numParametersToSkip, t1)2513 getu(size, OpGetRestLength, m_numParametersToSkip, t1) 2515 2514 bilteq t0, t1, .storeZero 2516 2515 subi t1, t0 … … 2531 2530 loadp Callee[cfr], t1 2532 2531 storep t1, ShadowChicken::Packet::callee[t0] 2533 loadVariable(get, scope, t1)2532 loadVariable(get, m_scope, t1) 2534 2533 storep t1, ShadowChicken::Packet::scope[t0] 2535 2534 dispatch() … … 2544 2543 storep cfr, ShadowChicken::Packet::frame[t0] 2545 2544 storep ShadowChickenTailMarker, ShadowChicken::Packet::callee[t0] 2546 loadVariable(get, thisValue, t1)2545 loadVariable(get, m_thisValue, t1) 2547 2546 storep t1, ShadowChicken::Packet::thisValue[t0] 2548 loadVariable(get, scope, t1)2547 loadVariable(get, m_scope, t1) 2549 2548 storep t1, ShadowChicken::Packet::scope[t0] 2550 2549 loadp CodeBlock[cfr], t1 -
trunk/Source/JavaScriptCore/runtime/CommonSlowPaths.cpp
r240040 r240041 1 1 /* 2 * Copyright (C) 2011-201 8Apple Inc. All rights reserved.2 * Copyright (C) 2011-2019 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 126 126 CHECK_EXCEPTION(); \ 127 127 if (bCondition) \ 128 pc = bytecode. target \129 ? reinterpret_cast<const Instruction*>(reinterpret_cast<const uint8_t*>(pc) + bytecode. target) \128 pc = bytecode.m_target \ 129 ? reinterpret_cast<const Instruction*>(reinterpret_cast<const uint8_t*>(pc) + bytecode.m_target) \ 130 130 : exec->codeBlock()->outOfLineJumpTarget(pc); \ 131 131 else \ … … 142 142 } while (false) 143 143 144 #define RETURN_WITH_PROFILING(value__, profilingAction__) RETURN_WITH_PROFILING_CUSTOM(bytecode. dst, value__, profilingAction__)144 #define RETURN_WITH_PROFILING(value__, profilingAction__) RETURN_WITH_PROFILING_CUSTOM(bytecode.m_dst, value__, profilingAction__) 145 145 146 146 #define RETURN(value) \ … … 151 151 152 152 #define PROFILE_VALUE(value) do { \ 153 bytecode.metadata(exec). profile.m_buckets[0] = JSValue::encode(value); \153 bytecode.metadata(exec).m_profile.m_buckets[0] = JSValue::encode(value); \ 154 154 } while (false) 155 155 … … 216 216 BEGIN(); 217 217 auto bytecode = pc->as<OpCreateScopedArguments>(); 218 JSLexicalEnvironment* scope = jsCast<JSLexicalEnvironment*>(GET(bytecode. scope).jsValue());218 JSLexicalEnvironment* scope = jsCast<JSLexicalEnvironment*>(GET(bytecode.m_scope).jsValue()); 219 219 ScopedArgumentsTable* table = scope->symbolTable()->arguments(); 220 220 RETURN(ScopedArguments::createByCopying(exec, table, scope)); … … 233 233 auto bytecode = pc->as<OpCreateThis>(); 234 234 JSObject* result; 235 JSObject* constructorAsObject = asObject(GET(bytecode. callee).jsValue());235 JSObject* constructorAsObject = asObject(GET(bytecode.m_callee).jsValue()); 236 236 if (constructorAsObject->type() == JSFunctionType && jsCast<JSFunction*>(constructorAsObject)->canUseAllocationProfile()) { 237 237 JSFunction* constructor = jsCast<JSFunction*>(constructorAsObject); 238 WriteBarrier<JSCell>& cachedCallee = bytecode.metadata(exec). cachedCallee;238 WriteBarrier<JSCell>& cachedCallee = bytecode.metadata(exec).m_cachedCallee; 239 239 if (!cachedCallee) 240 240 cachedCallee.set(vm, exec->codeBlock(), constructor); … … 242 242 cachedCallee.setWithoutWriteBarrier(JSCell::seenMultipleCalleeObjects()); 243 243 244 size_t inlineCapacity = bytecode. inlineCapacity;244 size_t inlineCapacity = bytecode.m_inlineCapacity; 245 245 ObjectAllocationProfile* allocationProfile = constructor->ensureRareDataAndAllocationProfile(exec, inlineCapacity)->objectAllocationProfile(); 246 246 throwScope.releaseAssertNoException(); … … 271 271 auto bytecode = pc->as<OpToThis>(); 272 272 auto& metadata = bytecode.metadata(exec); 273 JSValue v1 = GET(bytecode. srcDst).jsValue();273 JSValue v1 = GET(bytecode.m_srcDst).jsValue(); 274 274 if (v1.isCell()) { 275 275 Structure* myStructure = v1.asCell()->structure(vm); 276 Structure* otherStructure = metadata. cachedStructure.get();276 Structure* otherStructure = metadata.m_cachedStructure.get(); 277 277 if (myStructure != otherStructure) { 278 278 if (otherStructure) 279 metadata. toThisStatus = ToThisConflicted;280 metadata. cachedStructure.set(vm, exec->codeBlock(), myStructure);279 metadata.m_toThisStatus = ToThisConflicted; 280 metadata.m_cachedStructure.set(vm, exec->codeBlock(), myStructure); 281 281 } 282 282 } else { 283 metadata. toThisStatus = ToThisConflicted;284 metadata. cachedStructure.clear();283 metadata.m_toThisStatus = ToThisConflicted; 284 metadata.m_cachedStructure.clear(); 285 285 } 286 286 // Note: We only need to do this value profiling here on the slow path. The fast path … … 291 291 // fast path. 292 292 auto value = v1.toThis(exec, exec->codeBlock()->isStrictMode() ? StrictMode : NotStrictMode); 293 RETURN_WITH_PROFILING_CUSTOM(bytecode. srcDst, value, PROFILE_VALUE(value));293 RETURN_WITH_PROFILING_CUSTOM(bytecode.m_srcDst, value, PROFILE_VALUE(value)); 294 294 } 295 295 … … 316 316 BEGIN(); 317 317 auto bytecode = pc->as<OpNot>(); 318 RETURN(jsBoolean(!GET_C(bytecode. operand).jsValue().toBoolean(exec)));318 RETURN(jsBoolean(!GET_C(bytecode.m_operand).jsValue().toBoolean(exec))); 319 319 } 320 320 … … 323 323 BEGIN(); 324 324 auto bytecode = pc->as<OpEq>(); 325 RETURN(jsBoolean(JSValue::equal(exec, GET_C(bytecode. lhs).jsValue(), GET_C(bytecode.rhs).jsValue())));325 RETURN(jsBoolean(JSValue::equal(exec, GET_C(bytecode.m_lhs).jsValue(), GET_C(bytecode.m_rhs).jsValue()))); 326 326 } 327 327 … … 330 330 BEGIN(); 331 331 auto bytecode = pc->as<OpNeq>(); 332 RETURN(jsBoolean(!JSValue::equal(exec, GET_C(bytecode. lhs).jsValue(), GET_C(bytecode.rhs).jsValue())));332 RETURN(jsBoolean(!JSValue::equal(exec, GET_C(bytecode.m_lhs).jsValue(), GET_C(bytecode.m_rhs).jsValue()))); 333 333 } 334 334 … … 337 337 BEGIN(); 338 338 auto bytecode = pc->as<OpStricteq>(); 339 RETURN(jsBoolean(JSValue::strictEqual(exec, GET_C(bytecode. lhs).jsValue(), GET_C(bytecode.rhs).jsValue())));339 RETURN(jsBoolean(JSValue::strictEqual(exec, GET_C(bytecode.m_lhs).jsValue(), GET_C(bytecode.m_rhs).jsValue()))); 340 340 } 341 341 … … 344 344 BEGIN(); 345 345 auto bytecode = pc->as<OpNstricteq>(); 346 RETURN(jsBoolean(!JSValue::strictEqual(exec, GET_C(bytecode. lhs).jsValue(), GET_C(bytecode.rhs).jsValue())));346 RETURN(jsBoolean(!JSValue::strictEqual(exec, GET_C(bytecode.m_lhs).jsValue(), GET_C(bytecode.m_rhs).jsValue()))); 347 347 } 348 348 … … 351 351 BEGIN(); 352 352 auto bytecode = pc->as<OpLess>(); 353 RETURN(jsBoolean(jsLess<true>(exec, GET_C(bytecode. lhs).jsValue(), GET_C(bytecode.rhs).jsValue())));353 RETURN(jsBoolean(jsLess<true>(exec, GET_C(bytecode.m_lhs).jsValue(), GET_C(bytecode.m_rhs).jsValue()))); 354 354 } 355 355 … … 358 358 BEGIN(); 359 359 auto bytecode = pc->as<OpLesseq>(); 360 RETURN(jsBoolean(jsLessEq<true>(exec, GET_C(bytecode. lhs).jsValue(), GET_C(bytecode.rhs).jsValue())));360 RETURN(jsBoolean(jsLessEq<true>(exec, GET_C(bytecode.m_lhs).jsValue(), GET_C(bytecode.m_rhs).jsValue()))); 361 361 } 362 362 … … 365 365 BEGIN(); 366 366 auto bytecode = pc->as<OpGreater>(); 367 RETURN(jsBoolean(jsLess<false>(exec, GET_C(bytecode. rhs).jsValue(), GET_C(bytecode.lhs).jsValue())));367 RETURN(jsBoolean(jsLess<false>(exec, GET_C(bytecode.m_rhs).jsValue(), GET_C(bytecode.m_lhs).jsValue()))); 368 368 } 369 369 … … 372 372 BEGIN(); 373 373 auto bytecode = pc->as<OpGreatereq>(); 374 RETURN(jsBoolean(jsLessEq<false>(exec, GET_C(bytecode. rhs).jsValue(), GET_C(bytecode.lhs).jsValue())));374 RETURN(jsBoolean(jsLessEq<false>(exec, GET_C(bytecode.m_rhs).jsValue(), GET_C(bytecode.m_lhs).jsValue()))); 375 375 } 376 376 … … 379 379 BEGIN(); 380 380 auto bytecode = pc->as<OpInc>(); 381 RETURN_WITH_PROFILING_CUSTOM(bytecode. srcDst, jsNumber(GET(bytecode.srcDst).jsValue().toNumber(exec) + 1), { });381 RETURN_WITH_PROFILING_CUSTOM(bytecode.m_srcDst, jsNumber(GET(bytecode.m_srcDst).jsValue().toNumber(exec) + 1), { }); 382 382 } 383 383 … … 386 386 BEGIN(); 387 387 auto bytecode = pc->as<OpDec>(); 388 RETURN_WITH_PROFILING_CUSTOM(bytecode. srcDst, jsNumber(GET(bytecode.srcDst).jsValue().toNumber(exec) - 1), { });388 RETURN_WITH_PROFILING_CUSTOM(bytecode.m_srcDst, jsNumber(GET(bytecode.m_srcDst).jsValue().toNumber(exec) - 1), { }); 389 389 } 390 390 … … 393 393 BEGIN(); 394 394 auto bytecode = pc->as<OpToString>(); 395 RETURN(GET_C(bytecode. operand).jsValue().toString(exec));395 RETURN(GET_C(bytecode.m_operand).jsValue().toString(exec)); 396 396 } 397 397 … … 399 399 static void updateArithProfileForUnaryArithOp(OpNegate::Metadata& metadata, JSValue result, JSValue operand) 400 400 { 401 ArithProfile& profile = metadata. arithProfile;401 ArithProfile& profile = metadata.m_arithProfile; 402 402 profile.observeLHS(operand); 403 403 ASSERT(result.isNumber() || result.isBigInt()); … … 436 436 auto bytecode = pc->as<OpNegate>(); 437 437 auto& metadata = bytecode.metadata(exec); 438 JSValue operand = GET_C(bytecode. operand).jsValue();438 JSValue operand = GET_C(bytecode.m_operand).jsValue(); 439 439 JSValue primValue = operand.toPrimitive(exec, PreferNumber); 440 440 CHECK_EXCEPTION(); … … 493 493 BEGIN(); 494 494 auto bytecode = pc->as<OpToNumber>(); 495 JSValue argument = GET_C(bytecode. operand).jsValue();495 JSValue argument = GET_C(bytecode.m_operand).jsValue(); 496 496 JSValue result = jsNumber(argument.toNumber(exec)); 497 497 RETURN_PROFILED(result); … … 502 502 BEGIN(); 503 503 auto bytecode = pc->as<OpToObject>(); 504 JSValue argument = GET_C(bytecode. operand).jsValue();504 JSValue argument = GET_C(bytecode.m_operand).jsValue(); 505 505 if (UNLIKELY(argument.isUndefinedOrNull())) { 506 const Identifier& ident = exec->codeBlock()->identifier(bytecode.m essage);506 const Identifier& ident = exec->codeBlock()->identifier(bytecode.m_message); 507 507 if (!ident.isEmpty()) 508 508 THROW(createTypeError(exec, ident.impl())); … … 516 516 BEGIN(); 517 517 auto bytecode = pc->as<OpAdd>(); 518 JSValue v1 = GET_C(bytecode. lhs).jsValue();519 JSValue v2 = GET_C(bytecode. rhs).jsValue();518 JSValue v1 = GET_C(bytecode.m_lhs).jsValue(); 519 JSValue v2 = GET_C(bytecode.m_rhs).jsValue(); 520 520 JSValue result; 521 521 … … 545 545 BEGIN(); 546 546 auto bytecode = pc->as<OpMul>(); 547 JSValue left = GET_C(bytecode. lhs).jsValue();548 JSValue right = GET_C(bytecode. rhs).jsValue();547 JSValue left = GET_C(bytecode.m_lhs).jsValue(); 548 JSValue right = GET_C(bytecode.m_rhs).jsValue(); 549 549 JSValue result = jsMul(exec, left, right); 550 550 CHECK_EXCEPTION(); … … 558 558 BEGIN(); 559 559 auto bytecode = pc->as<OpSub>(); 560 JSValue left = GET_C(bytecode. lhs).jsValue();561 JSValue right = GET_C(bytecode. rhs).jsValue();560 JSValue left = GET_C(bytecode.m_lhs).jsValue(); 561 JSValue right = GET_C(bytecode.m_rhs).jsValue(); 562 562 auto leftNumeric = left.toNumeric(exec); 563 563 CHECK_EXCEPTION(); … … 587 587 BEGIN(); 588 588 auto bytecode = pc->as<OpDiv>(); 589 JSValue left = GET_C(bytecode. lhs).jsValue();590 JSValue right = GET_C(bytecode. rhs).jsValue();589 JSValue left = GET_C(bytecode.m_lhs).jsValue(); 590 JSValue right = GET_C(bytecode.m_rhs).jsValue(); 591 591 auto leftNumeric = left.toNumeric(exec); 592 592 CHECK_EXCEPTION(); … … 618 618 BEGIN(); 619 619 auto bytecode = pc->as<OpMod>(); 620 JSValue left = GET_C(bytecode. lhs).jsValue();621 JSValue right = GET_C(bytecode. rhs).jsValue();620 JSValue left = GET_C(bytecode.m_lhs).jsValue(); 621 JSValue right = GET_C(bytecode.m_rhs).jsValue(); 622 622 auto leftNumeric = left.toNumeric(exec); 623 623 CHECK_EXCEPTION(); … … 644 644 BEGIN(); 645 645 auto bytecode = pc->as<OpPow>(); 646 double a = GET_C(bytecode. lhs).jsValue().toNumber(exec);646 double a = GET_C(bytecode.m_lhs).jsValue().toNumber(exec); 647 647 if (UNLIKELY(throwScope.exception())) 648 648 RETURN(JSValue()); 649 double b = GET_C(bytecode. rhs).jsValue().toNumber(exec);649 double b = GET_C(bytecode.m_rhs).jsValue().toNumber(exec); 650 650 if (UNLIKELY(throwScope.exception())) 651 651 RETURN(JSValue()); … … 657 657 BEGIN(); 658 658 auto bytecode = pc->as<OpLshift>(); 659 JSValue left = GET_C(bytecode. lhs).jsValue();660 JSValue right = GET_C(bytecode. rhs).jsValue();659 JSValue left = GET_C(bytecode.m_lhs).jsValue(); 660 JSValue right = GET_C(bytecode.m_rhs).jsValue(); 661 661 auto leftNumeric = left.toBigIntOrInt32(exec); 662 662 CHECK_EXCEPTION(); … … 681 681 BEGIN(); 682 682 auto bytecode = pc->as<OpRshift>(); 683 JSValue left = GET_C(bytecode. lhs).jsValue();684 JSValue right = GET_C(bytecode. rhs).jsValue();683 JSValue left = GET_C(bytecode.m_lhs).jsValue(); 684 JSValue right = GET_C(bytecode.m_rhs).jsValue(); 685 685 auto leftNumeric = left.toBigIntOrInt32(exec); 686 686 CHECK_EXCEPTION(); … … 705 705 BEGIN(); 706 706 auto bytecode = pc->as<OpUrshift>(); 707 uint32_t a = GET_C(bytecode. lhs).jsValue().toUInt32(exec);707 uint32_t a = GET_C(bytecode.m_lhs).jsValue().toUInt32(exec); 708 708 if (UNLIKELY(throwScope.exception())) 709 709 RETURN(JSValue()); 710 uint32_t b = GET_C(bytecode. rhs).jsValue().toUInt32(exec);710 uint32_t b = GET_C(bytecode.m_rhs).jsValue().toUInt32(exec); 711 711 RETURN(jsNumber(static_cast<int32_t>(a >> (b & 31)))); 712 712 } … … 716 716 BEGIN(); 717 717 auto bytecode = pc->as<OpUnsigned>(); 718 uint32_t a = GET_C(bytecode. operand).jsValue().toUInt32(exec);718 uint32_t a = GET_C(bytecode.m_operand).jsValue().toUInt32(exec); 719 719 RETURN(jsNumber(a)); 720 720 } … … 724 724 BEGIN(); 725 725 auto bytecode = pc->as<OpBitnot>(); 726 int32_t operand = GET_C(bytecode. operand).jsValue().toInt32(exec);726 int32_t operand = GET_C(bytecode.m_operand).jsValue().toInt32(exec); 727 727 CHECK_EXCEPTION(); 728 728 RETURN_PROFILED(jsNumber(~operand)); … … 733 733 BEGIN(); 734 734 auto bytecode = pc->as<OpBitand>(); 735 auto leftNumeric = GET_C(bytecode. lhs).jsValue().toBigIntOrInt32(exec);736 CHECK_EXCEPTION(); 737 auto rightNumeric = GET_C(bytecode. rhs).jsValue().toBigIntOrInt32(exec);735 auto leftNumeric = GET_C(bytecode.m_lhs).jsValue().toBigIntOrInt32(exec); 736 CHECK_EXCEPTION(); 737 auto rightNumeric = GET_C(bytecode.m_rhs).jsValue().toBigIntOrInt32(exec); 738 738 CHECK_EXCEPTION(); 739 739 if (WTF::holds_alternative<JSBigInt*>(leftNumeric) || WTF::holds_alternative<JSBigInt*>(rightNumeric)) { … … 754 754 BEGIN(); 755 755 auto bytecode = pc->as<OpBitor>(); 756 auto leftNumeric = GET_C(bytecode. lhs).jsValue().toBigIntOrInt32(exec);757 CHECK_EXCEPTION(); 758 auto rightNumeric = GET_C(bytecode. rhs).jsValue().toBigIntOrInt32(exec);756 auto leftNumeric = GET_C(bytecode.m_lhs).jsValue().toBigIntOrInt32(exec); 757 CHECK_EXCEPTION(); 758 auto rightNumeric = GET_C(bytecode.m_rhs).jsValue().toBigIntOrInt32(exec); 759 759 CHECK_EXCEPTION(); 760 760 if (WTF::holds_alternative<JSBigInt*>(leftNumeric) || WTF::holds_alternative<JSBigInt*>(rightNumeric)) { … … 775 775 BEGIN(); 776 776 auto bytecode = pc->as<OpBitxor>(); 777 auto leftNumeric = GET_C(bytecode. lhs).jsValue().toBigIntOrInt32(exec);778 CHECK_EXCEPTION(); 779 auto rightNumeric = GET_C(bytecode. rhs).jsValue().toBigIntOrInt32(exec);777 auto leftNumeric = GET_C(bytecode.m_lhs).jsValue().toBigIntOrInt32(exec); 778 CHECK_EXCEPTION(); 779 auto rightNumeric = GET_C(bytecode.m_rhs).jsValue().toBigIntOrInt32(exec); 780 780 CHECK_EXCEPTION(); 781 781 if (WTF::holds_alternative<JSBigInt*>(leftNumeric) || WTF::holds_alternative<JSBigInt*>(rightNumeric)) { … … 796 796 BEGIN(); 797 797 auto bytecode = pc->as<OpTypeof>(); 798 RETURN(jsTypeStringForValue(exec, GET_C(bytecode. value).jsValue()));798 RETURN(jsTypeStringForValue(exec, GET_C(bytecode.m_value).jsValue())); 799 799 } 800 800 … … 803 803 BEGIN(); 804 804 auto bytecode = pc->as<OpIsObjectOrNull>(); 805 RETURN(jsBoolean(jsIsObjectTypeOrNull(exec, GET_C(bytecode. operand).jsValue())));805 RETURN(jsBoolean(jsIsObjectTypeOrNull(exec, GET_C(bytecode.m_operand).jsValue()))); 806 806 } 807 807 … … 810 810 BEGIN(); 811 811 auto bytecode = pc->as<OpIsFunction>(); 812 RETURN(jsBoolean(GET_C(bytecode. operand).jsValue().isFunction(vm)));812 RETURN(jsBoolean(GET_C(bytecode.m_operand).jsValue().isFunction(vm))); 813 813 } 814 814 … … 818 818 auto bytecode = pc->as<OpInByVal>(); 819 819 auto& metadata = bytecode.metadata(exec); 820 RETURN(jsBoolean(CommonSlowPaths::opInByVal(exec, GET_C(bytecode. base).jsValue(), GET_C(bytecode.property).jsValue(), &metadata.arrayProfile)));820 RETURN(jsBoolean(CommonSlowPaths::opInByVal(exec, GET_C(bytecode.m_base).jsValue(), GET_C(bytecode.m_property).jsValue(), &metadata.m_arrayProfile))); 821 821 } 822 822 … … 826 826 827 827 auto bytecode = pc->as<OpInById>(); 828 JSValue baseValue = GET_C(bytecode. base).jsValue();828 JSValue baseValue = GET_C(bytecode.m_base).jsValue(); 829 829 if (!baseValue.isObject()) 830 830 THROW(createInvalidInParameterError(exec, baseValue)); 831 831 832 RETURN(jsBoolean(asObject(baseValue)->hasProperty(exec, exec->codeBlock()->identifier(bytecode. property))));832 RETURN(jsBoolean(asObject(baseValue)->hasProperty(exec, exec->codeBlock()->identifier(bytecode.m_property)))); 833 833 } 834 834 … … 837 837 BEGIN(); 838 838 auto bytecode = pc->as<OpDelByVal>(); 839 JSValue baseValue = GET_C(bytecode. base).jsValue();839 JSValue baseValue = GET_C(bytecode.m_base).jsValue(); 840 840 JSObject* baseObject = baseValue.toObject(exec); 841 841 CHECK_EXCEPTION(); 842 842 843 JSValue subscript = GET_C(bytecode. property).jsValue();843 JSValue subscript = GET_C(bytecode.m_property).jsValue(); 844 844 845 845 bool couldDelete; … … 865 865 BEGIN(); 866 866 auto bytecode = pc->as<OpStrcat>(); 867 RETURN(jsStringFromRegisterArray(exec, &GET(bytecode. src), bytecode.count));867 RETURN(jsStringFromRegisterArray(exec, &GET(bytecode.m_src), bytecode.m_count)); 868 868 } 869 869 … … 872 872 BEGIN(); 873 873 auto bytecode = pc->as<OpToPrimitive>(); 874 RETURN(GET_C(bytecode. src).jsValue().toPrimitive(exec));874 RETURN(GET_C(bytecode.m_src).jsValue().toPrimitive(exec)); 875 875 } 876 876 … … 887 887 BEGIN(); 888 888 auto bytecode = pc->as<OpGetEnumerableLength>(); 889 JSValue enumeratorValue = GET(bytecode. base).jsValue();889 JSValue enumeratorValue = GET(bytecode.m_base).jsValue(); 890 890 if (enumeratorValue.isUndefinedOrNull()) 891 891 RETURN(jsNumber(0)); … … 901 901 auto bytecode = pc->as<OpHasIndexedProperty>(); 902 902 auto& metadata = bytecode.metadata(exec); 903 JSObject* base = GET(bytecode. base).jsValue().toObject(exec);904 CHECK_EXCEPTION(); 905 JSValue property = GET(bytecode. property).jsValue();906 metadata. arrayProfile.observeStructure(base->structure(vm));903 JSObject* base = GET(bytecode.m_base).jsValue().toObject(exec); 904 CHECK_EXCEPTION(); 905 JSValue property = GET(bytecode.m_property).jsValue(); 906 metadata.m_arrayProfile.observeStructure(base->structure(vm)); 907 907 ASSERT(property.isUInt32()); 908 908 RETURN(jsBoolean(base->hasPropertyGeneric(exec, property.asUInt32(), PropertySlot::InternalMethodType::GetOwnProperty))); … … 913 913 BEGIN(); 914 914 auto bytecode = pc->as<OpHasStructureProperty>(); 915 JSObject* base = GET(bytecode. base).jsValue().toObject(exec);916 CHECK_EXCEPTION(); 917 JSValue property = GET(bytecode. property).jsValue();915 JSObject* base = GET(bytecode.m_base).jsValue().toObject(exec); 916 CHECK_EXCEPTION(); 917 JSValue property = GET(bytecode.m_property).jsValue(); 918 918 ASSERT(property.isString()); 919 JSPropertyNameEnumerator* enumerator = jsCast<JSPropertyNameEnumerator*>(GET(bytecode. enumerator).jsValue().asCell());919 JSPropertyNameEnumerator* enumerator = jsCast<JSPropertyNameEnumerator*>(GET(bytecode.m_enumerator).jsValue().asCell()); 920 920 if (base->structure(vm)->id() == enumerator->cachedStructureID()) 921 921 RETURN(jsBoolean(true)); … … 930 930 BEGIN(); 931 931 auto bytecode = pc->as<OpHasGenericProperty>(); 932 JSObject* base = GET(bytecode. base).jsValue().toObject(exec);933 CHECK_EXCEPTION(); 934 JSValue property = GET(bytecode. property).jsValue();932 JSObject* base = GET(bytecode.m_base).jsValue().toObject(exec); 933 CHECK_EXCEPTION(); 934 JSValue property = GET(bytecode.m_property).jsValue(); 935 935 ASSERT(property.isString()); 936 936 JSString* string = asString(property); … … 944 944 BEGIN(); 945 945 auto bytecode = pc->as<OpGetDirectPname>(); 946 JSValue baseValue = GET_C(bytecode. base).jsValue();947 JSValue property = GET(bytecode. property).jsValue();946 JSValue baseValue = GET_C(bytecode.m_base).jsValue(); 947 JSValue property = GET(bytecode.m_property).jsValue(); 948 948 ASSERT(property.isString()); 949 949 JSString* string = asString(property); … … 957 957 BEGIN(); 958 958 auto bytecode = pc->as<OpGetPropertyEnumerator>(); 959 JSValue baseValue = GET(bytecode. base).jsValue();959 JSValue baseValue = GET(bytecode.m_base).jsValue(); 960 960 if (baseValue.isUndefinedOrNull()) 961 961 RETURN(JSPropertyNameEnumerator::create(vm)); … … 971 971 BEGIN(); 972 972 auto bytecode = pc->as<OpEnumeratorStructurePname>(); 973 JSPropertyNameEnumerator* enumerator = jsCast<JSPropertyNameEnumerator*>(GET(bytecode. enumerator).jsValue().asCell());974 uint32_t index = GET(bytecode. index).jsValue().asUInt32();973 JSPropertyNameEnumerator* enumerator = jsCast<JSPropertyNameEnumerator*>(GET(bytecode.m_enumerator).jsValue().asCell()); 974 uint32_t index = GET(bytecode.m_index).jsValue().asUInt32(); 975 975 976 976 JSString* propertyName = nullptr; … … 984 984 BEGIN(); 985 985 auto bytecode = pc->as<OpEnumeratorGenericPname>(); 986 JSPropertyNameEnumerator* enumerator = jsCast<JSPropertyNameEnumerator*>(GET(bytecode. enumerator).jsValue().asCell());987 uint32_t index = GET(bytecode. index).jsValue().asUInt32();986 JSPropertyNameEnumerator* enumerator = jsCast<JSPropertyNameEnumerator*>(GET(bytecode.m_enumerator).jsValue().asCell()); 987 uint32_t index = GET(bytecode.m_index).jsValue().asUInt32(); 988 988 989 989 JSString* propertyName = nullptr; … … 997 997 BEGIN(); 998 998 auto bytecode = pc->as<OpToIndexString>(); 999 RETURN(jsString(exec, Identifier::from(exec, GET(bytecode. index).jsValue().asUInt32()).string()));999 RETURN(jsString(exec, Identifier::from(exec, GET(bytecode.m_index).jsValue().asUInt32()).string())); 1000 1000 } 1001 1001 … … 1018 1018 BEGIN(); 1019 1019 auto bytecode = pc->as<OpCreateLexicalEnvironment>(); 1020 int scopeReg = bytecode. scope.offset();1020 int scopeReg = bytecode.m_scope.offset(); 1021 1021 JSScope* currentScope = exec->uncheckedR(scopeReg).Register::scope(); 1022 SymbolTable* symbolTable = jsCast<SymbolTable*>(GET_C(bytecode. symbolTable).jsValue());1023 JSValue initialValue = GET_C(bytecode. initialValue).jsValue();1022 SymbolTable* symbolTable = jsCast<SymbolTable*>(GET_C(bytecode.m_symbolTable).jsValue()); 1023 JSValue initialValue = GET_C(bytecode.m_initialValue).jsValue(); 1024 1024 ASSERT(initialValue == jsUndefined() || initialValue == jsTDZValue()); 1025 1025 JSScope* newScope = JSLexicalEnvironment::create(vm, exec->lexicalGlobalObject(), currentScope, symbolTable, initialValue); … … 1031 1031 BEGIN(); 1032 1032 auto bytecode = pc->as<OpPushWithScope>(); 1033 JSObject* newScope = GET_C(bytecode. newScope).jsValue().toObject(exec);1034 CHECK_EXCEPTION(); 1035 1036 int scopeReg = bytecode. currentScope.offset();1033 JSObject* newScope = GET_C(bytecode.m_newScope).jsValue().toObject(exec); 1034 CHECK_EXCEPTION(); 1035 1036 int scopeReg = bytecode.m_currentScope.offset(); 1037 1037 JSScope* currentScope = exec->uncheckedR(scopeReg).Register::scope(); 1038 1038 RETURN(JSWithScope::create(vm, exec->lexicalGlobalObject(), currentScope, newScope)); … … 1043 1043 BEGIN(); 1044 1044 auto bytecode = pc->as<OpResolveScopeForHoistingFuncDeclInEval>(); 1045 const Identifier& ident = exec->codeBlock()->identifier(bytecode. property);1046 JSScope* scope = exec->uncheckedR(bytecode. scope.offset()).Register::scope();1045 const Identifier& ident = exec->codeBlock()->identifier(bytecode.m_property); 1046 JSScope* scope = exec->uncheckedR(bytecode.m_scope.offset()).Register::scope(); 1047 1047 JSValue resolvedScope = JSScope::resolveScopeForHoistingFuncDeclInEval(exec, scope, ident); 1048 1048 … … 1057 1057 auto bytecode = pc->as<OpResolveScope>(); 1058 1058 auto& metadata = bytecode.metadata(exec); 1059 const Identifier& ident = exec->codeBlock()->identifier(bytecode. var);1060 JSScope* scope = exec->uncheckedR(bytecode. scope.offset()).Register::scope();1059 const Identifier& ident = exec->codeBlock()->identifier(bytecode.m_var); 1060 JSScope* scope = exec->uncheckedR(bytecode.m_scope.offset()).Register::scope(); 1061 1061 JSObject* resolvedScope = JSScope::resolve(exec, scope, ident); 1062 1062 // Proxy can throw an error here, e.g. Proxy in with statement's @unscopables. 1063 1063 CHECK_EXCEPTION(); 1064 1064 1065 ResolveType resolveType = metadata. resolveType;1065 ResolveType resolveType = metadata.m_resolveType; 1066 1066 1067 1067 // ModuleVar does not keep the scope register value alive in DFG. … … 1076 1076 ConcurrentJSLocker locker(exec->codeBlock()->m_lock); 1077 1077 if (resolveType == UnresolvedProperty) 1078 metadata. resolveType = GlobalProperty;1078 metadata.m_resolveType = GlobalProperty; 1079 1079 else 1080 metadata. resolveType = GlobalPropertyWithVarInjectionChecks;1081 1082 metadata. globalObject = globalObject;1080 metadata.m_resolveType = GlobalPropertyWithVarInjectionChecks; 1081 1082 metadata.m_globalObject = globalObject; 1083 1083 } 1084 1084 } else if (resolvedScope->isGlobalLexicalEnvironment()) { … … 1086 1086 ConcurrentJSLocker locker(exec->codeBlock()->m_lock); 1087 1087 if (resolveType == UnresolvedProperty) 1088 metadata. resolveType = GlobalLexicalVar;1088 metadata.m_resolveType = GlobalLexicalVar; 1089 1089 else 1090 metadata. resolveType = GlobalLexicalVarWithVarInjectionChecks;1091 metadata. globalLexicalEnvironment = globalLexicalEnvironment;1090 metadata.m_resolveType = GlobalLexicalVarWithVarInjectionChecks; 1091 metadata.m_globalLexicalEnvironment = globalLexicalEnvironment; 1092 1092 } 1093 1093 } … … 1100 1100 BEGIN(); 1101 1101 auto bytecode = pc->as<OpCreateRest>(); 1102 unsigned arraySize = GET_C(bytecode. arraySize).jsValue().asUInt32();1102 unsigned arraySize = GET_C(bytecode.m_arraySize).jsValue().asUInt32(); 1103 1103 JSGlobalObject* globalObject = exec->lexicalGlobalObject(); 1104 1104 Structure* structure = globalObject->restParameterStructure(); 1105 unsigned numParamsToSkip = bytecode. numParametersToSkip;1105 unsigned numParamsToSkip = bytecode.m_numParametersToSkip; 1106 1106 JSValue* argumentsToCopyRegion = exec->addressOfArgumentsStart() + numParamsToSkip; 1107 1107 RETURN(constructArray(exec, structure, argumentsToCopyRegion, arraySize)); … … 1112 1112 BEGIN(); 1113 1113 auto bytecode = pc->as<OpGetByIdWithThis>(); 1114 const Identifier& ident = exec->codeBlock()->identifier(bytecode. property);1115 JSValue baseValue = GET_C(bytecode. base).jsValue();1116 JSValue thisVal = GET_C(bytecode. thisValue).jsValue();1114 const Identifier& ident = exec->codeBlock()->identifier(bytecode.m_property); 1115 JSValue baseValue = GET_C(bytecode.m_base).jsValue(); 1116 JSValue thisVal = GET_C(bytecode.m_thisValue).jsValue(); 1117 1117 PropertySlot slot(thisVal, PropertySlot::PropertySlot::InternalMethodType::Get); 1118 1118 JSValue result = baseValue.get(exec, ident, slot); … … 1125 1125 1126 1126 auto bytecode = pc->as<OpGetByValWithThis>(); 1127 JSValue baseValue = GET_C(bytecode. base).jsValue();1128 JSValue thisValue = GET_C(bytecode. thisValue).jsValue();1129 JSValue subscript = GET_C(bytecode. property).jsValue();1127 JSValue baseValue = GET_C(bytecode.m_base).jsValue(); 1128 JSValue thisValue = GET_C(bytecode.m_thisValue).jsValue(); 1129 JSValue subscript = GET_C(bytecode.m_property).jsValue(); 1130 1130 1131 1131 if (LIKELY(baseValue.isCell() && subscript.isString())) { … … 1160 1160 auto bytecode = pc->as<OpPutByIdWithThis>(); 1161 1161 CodeBlock* codeBlock = exec->codeBlock(); 1162 const Identifier& ident = codeBlock->identifier(bytecode. property);1163 JSValue baseValue = GET_C(bytecode. base).jsValue();1164 JSValue thisVal = GET_C(bytecode. thisValue).jsValue();1165 JSValue putValue = GET_C(bytecode. value).jsValue();1162 const Identifier& ident = codeBlock->identifier(bytecode.m_property); 1163 JSValue baseValue = GET_C(bytecode.m_base).jsValue(); 1164 JSValue thisVal = GET_C(bytecode.m_thisValue).jsValue(); 1165 JSValue putValue = GET_C(bytecode.m_value).jsValue(); 1166 1166 PutPropertySlot slot(thisVal, codeBlock->isStrictMode(), codeBlock->putByIdContext()); 1167 1167 baseValue.putInline(exec, ident, putValue, slot); … … 1173 1173 BEGIN(); 1174 1174 auto bytecode = pc->as<OpPutByValWithThis>(); 1175 JSValue baseValue = GET_C(bytecode. base).jsValue();1176 JSValue thisValue = GET_C(bytecode. thisValue).jsValue();1177 JSValue subscript = GET_C(bytecode. property).jsValue();1178 JSValue value = GET_C(bytecode. value).jsValue();1175 JSValue baseValue = GET_C(bytecode.m_base).jsValue(); 1176 JSValue thisValue = GET_C(bytecode.m_thisValue).jsValue(); 1177 JSValue subscript = GET_C(bytecode.m_property).jsValue(); 1178 JSValue value = GET_C(bytecode.m_value).jsValue(); 1179 1179 1180 1180 auto property = subscript.toPropertyKey(exec); … … 1189 1189 BEGIN(); 1190 1190 auto bytecode = pc->as<OpDefineDataProperty>(); 1191 JSObject* base = asObject(GET_C(bytecode. base).jsValue());1192 JSValue property = GET_C(bytecode. property).jsValue();1193 JSValue value = GET_C(bytecode. value).jsValue();1194 JSValue attributes = GET_C(bytecode. attributes).jsValue();1191 JSObject* base = asObject(GET_C(bytecode.m_base).jsValue()); 1192 JSValue property = GET_C(bytecode.m_property).jsValue(); 1193 JSValue value = GET_C(bytecode.m_value).jsValue(); 1194 JSValue attributes = GET_C(bytecode.m_attributes).jsValue(); 1195 1195 ASSERT(attributes.isInt32()); 1196 1196 … … 1207 1207 BEGIN(); 1208 1208 auto bytecode = pc->as<OpDefineAccessorProperty>(); 1209 JSObject* base = asObject(GET_C(bytecode. base).jsValue());1210 JSValue property = GET_C(bytecode. property).jsValue();1211 JSValue getter = GET_C(bytecode. getter).jsValue();1212 JSValue setter = GET_C(bytecode. setter).jsValue();1213 JSValue attributes = GET_C(bytecode. attributes).jsValue();1209 JSObject* base = asObject(GET_C(bytecode.m_base).jsValue()); 1210 JSValue property = GET_C(bytecode.m_property).jsValue(); 1211 JSValue getter = GET_C(bytecode.m_getter).jsValue(); 1212 JSValue setter = GET_C(bytecode.m_setter).jsValue(); 1213 JSValue attributes = GET_C(bytecode.m_attributes).jsValue(); 1214 1214 ASSERT(attributes.isInt32()); 1215 1215 … … 1226 1226 BEGIN(); 1227 1227 auto bytecode = pc->as<OpThrowStaticError>(); 1228 JSValue errorMessageValue = GET_C(bytecode.m essage).jsValue();1228 JSValue errorMessageValue = GET_C(bytecode.m_message).jsValue(); 1229 1229 RELEASE_ASSERT(errorMessageValue.isString()); 1230 1230 String errorMessage = asString(errorMessageValue)->value(exec); 1231 ErrorType errorType = bytecode. errorType;1231 ErrorType errorType = bytecode.m_errorType; 1232 1232 THROW(createError(exec, errorType, errorMessage)); 1233 1233 } … … 1237 1237 BEGIN(); 1238 1238 auto bytecode = pc->as<OpNewArrayWithSpread>(); 1239 int numItems = bytecode. argc;1239 int numItems = bytecode.m_argc; 1240 1240 ASSERT(numItems >= 0); 1241 const BitVector& bitVector = exec->codeBlock()->unlinkedCodeBlock()->bitVector(bytecode. bitVector);1242 1243 JSValue* values = bitwise_cast<JSValue*>(&GET(bytecode. argv));1241 const BitVector& bitVector = exec->codeBlock()->unlinkedCodeBlock()->bitVector(bytecode.m_bitVector); 1242 1243 JSValue* values = bitwise_cast<JSValue*>(&GET(bytecode.m_argv)); 1244 1244 1245 1245 Checked<unsigned, RecordOverflow> checkedArraySize = 0; … … 1291 1291 BEGIN(); 1292 1292 auto bytecode = pc->as<OpNewArrayBuffer>(); 1293 ASSERT(exec->codeBlock()->isConstantRegisterIndex(bytecode. immutableButterfly.offset()));1294 JSImmutableButterfly* immutableButterfly = bitwise_cast<JSImmutableButterfly*>(GET_C(bytecode. immutableButterfly).jsValue().asCell());1295 auto& profile = bytecode.metadata(exec). arrayAllocationProfile;1293 ASSERT(exec->codeBlock()->isConstantRegisterIndex(bytecode.m_immutableButterfly.offset())); 1294 JSImmutableButterfly* immutableButterfly = bitwise_cast<JSImmutableButterfly*>(GET_C(bytecode.m_immutableButterfly).jsValue().asCell()); 1295 auto& profile = bytecode.metadata(exec).m_arrayAllocationProfile; 1296 1296 1297 1297 IndexingType indexingMode = profile.selectIndexingType(); … … 1311 1311 // a compilation thread. 1312 1312 WTF::storeStoreFence(); 1313 codeBlock->constantRegister(bytecode. immutableButterfly.offset()).set(vm, codeBlock, immutableButterfly);1313 codeBlock->constantRegister(bytecode.m_immutableButterfly.offset()).set(vm, codeBlock, immutableButterfly); 1314 1314 WTF::storeStoreFence(); 1315 1315 } … … 1326 1326 1327 1327 auto bytecode = pc->as<OpSpread>(); 1328 JSValue iterable = GET_C(bytecode. argument).jsValue();1328 JSValue iterable = GET_C(bytecode.m_argument).jsValue(); 1329 1329 1330 1330 if (iterable.isCell() && isJSArray(iterable.asCell())) { -
trunk/Source/JavaScriptCore/runtime/CommonSlowPaths.h
r239244 r240041 1 1 /* 2 * Copyright (C) 2011-201 7Apple Inc. All rights reserved.2 * Copyright (C) 2011-2019 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 124 124 // Covers implicit globals. Since they don't exist until they first execute, we didn't know how to cache them at compile time. 125 125 auto& metadata = bytecode.metadata(exec); 126 ResolveType resolveType = metadata. getPutInfo.resolveType();126 ResolveType resolveType = metadata.m_getPutInfo.resolveType(); 127 127 if (resolveType != GlobalProperty && resolveType != GlobalPropertyWithVarInjectionChecks 128 128 && resolveType != UnresolvedProperty && resolveType != UnresolvedPropertyWithVarInjectionChecks) … … 134 134 resolveType = newResolveType; 135 135 ConcurrentJSLocker locker(codeBlock->m_lock); 136 metadata. getPutInfo = GetPutInfo(metadata.getPutInfo.resolveMode(), newResolveType, metadata.getPutInfo.initializationMode());136 metadata.m_getPutInfo = GetPutInfo(metadata.m_getPutInfo.resolveMode(), newResolveType, metadata.m_getPutInfo.initializationMode()); 137 137 } else if (scope->isGlobalLexicalEnvironment()) { 138 138 JSGlobalLexicalEnvironment* globalLexicalEnvironment = jsCast<JSGlobalLexicalEnvironment*>(scope); 139 139 ResolveType newResolveType = resolveType == UnresolvedProperty ? GlobalLexicalVar : GlobalLexicalVarWithVarInjectionChecks; 140 metadata. getPutInfo = GetPutInfo(metadata.getPutInfo.resolveMode(), newResolveType, metadata.getPutInfo.initializationMode());140 metadata.m_getPutInfo = GetPutInfo(metadata.m_getPutInfo.resolveMode(), newResolveType, metadata.m_getPutInfo.initializationMode()); 141 141 SymbolTableEntry entry = globalLexicalEnvironment->symbolTable()->get(ident.impl()); 142 142 ASSERT(!entry.isNull()); 143 143 ConcurrentJSLocker locker(codeBlock->m_lock); 144 metadata. watchpointSet = entry.watchpointSet();145 metadata. operand = reinterpret_cast<uintptr_t>(globalLexicalEnvironment->variableAt(entry.scopeOffset()).slot());144 metadata.m_watchpointSet = entry.watchpointSet(); 145 metadata.m_operand = reinterpret_cast<uintptr_t>(globalLexicalEnvironment->variableAt(entry.scopeOffset()).slot()); 146 146 } 147 147 } … … 166 166 167 167 ConcurrentJSLocker locker(codeBlock->m_lock); 168 metadata. structure.set(vm, codeBlock, scope->structure(vm));169 metadata. operand = slot.cachedOffset();168 metadata.m_structure.set(vm, codeBlock, scope->structure(vm)); 169 metadata.m_operand = slot.cachedOffset(); 170 170 } 171 171 } … … 175 175 { 176 176 auto& metadata = bytecode.metadata(exec); 177 ResolveType resolveType = metadata. getPutInfo.resolveType();177 ResolveType resolveType = metadata.m_getPutInfo.resolveType(); 178 178 179 179 if (resolveType == UnresolvedProperty || resolveType == UnresolvedPropertyWithVarInjectionChecks) { … … 182 182 resolveType = newResolveType; // Allow below caching mechanism to kick in. 183 183 ConcurrentJSLocker locker(exec->codeBlock()->m_lock); 184 metadata. getPutInfo = GetPutInfo(metadata.getPutInfo.resolveMode(), newResolveType, metadata.getPutInfo.initializationMode());184 metadata.m_getPutInfo = GetPutInfo(metadata.m_getPutInfo.resolveMode(), newResolveType, metadata.m_getPutInfo.initializationMode()); 185 185 } else if (scope->isGlobalLexicalEnvironment()) { 186 186 JSGlobalLexicalEnvironment* globalLexicalEnvironment = jsCast<JSGlobalLexicalEnvironment*>(scope); … … 189 189 ASSERT(!entry.isNull()); 190 190 ConcurrentJSLocker locker(exec->codeBlock()->m_lock); 191 metadata. getPutInfo = GetPutInfo(metadata.getPutInfo.resolveMode(), newResolveType, metadata.getPutInfo.initializationMode());192 metadata. watchpointSet = entry.watchpointSet();193 metadata. operand = reinterpret_cast<uintptr_t>(globalLexicalEnvironment->variableAt(entry.scopeOffset()).slot());191 metadata.m_getPutInfo = GetPutInfo(metadata.m_getPutInfo.resolveMode(), newResolveType, metadata.m_getPutInfo.initializationMode()); 192 metadata.m_watchpointSet = entry.watchpointSet(); 193 metadata.m_operand = reinterpret_cast<uintptr_t>(globalLexicalEnvironment->variableAt(entry.scopeOffset()).slot()); 194 194 } 195 195 } … … 204 204 { 205 205 ConcurrentJSLocker locker(codeBlock->m_lock); 206 metadata. structure.set(vm, codeBlock, structure);207 metadata. operand = slot.cachedOffset();206 metadata.m_structure.set(vm, codeBlock, structure); 207 metadata.m_operand = slot.cachedOffset(); 208 208 } 209 209 structure->startWatchingPropertyForReplacements(vm, slot.cachedOffset());
Note:
See TracChangeset
for help on using the changeset viewer.