Changeset 220770 in webkit
- Timestamp:
- Aug 15, 2017 3:54:50 PM (7 years ago)
- Location:
- trunk/Source/JavaScriptCore
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r220753 r220770 1 2017-08-15 Keith Miller <keith_miller@apple.com> 2 3 JSC named bytecode offsets should use references rather than pointers 4 https://bugs.webkit.org/show_bug.cgi?id=175601 5 6 Reviewed by Saam Barati. 7 8 * dfg/DFGByteCodeParser.cpp: 9 (JSC::DFG::ByteCodeParser::parseBlock): 10 * jit/JITOpcodes.cpp: 11 (JSC::JIT::emit_op_overrides_has_instance): 12 (JSC::JIT::emit_op_instanceof): 13 (JSC::JIT::emitSlow_op_instanceof): 14 (JSC::JIT::emitSlow_op_instanceof_custom): 15 * jit/JITOpcodes32_64.cpp: 16 (JSC::JIT::emit_op_overrides_has_instance): 17 (JSC::JIT::emit_op_instanceof): 18 (JSC::JIT::emitSlow_op_instanceof): 19 (JSC::JIT::emitSlow_op_instanceof_custom): 20 1 21 2017-08-15 Keith Miller <keith_miller@apple.com> 2 22 -
trunk/Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp
r220753 r220770 4452 4452 4453 4453 case op_overrides_has_instance: { 4454 auto bytecode =reinterpret_cast<OpOverridesHasInstance*>(currentInstruction);4454 auto& bytecode = *reinterpret_cast<OpOverridesHasInstance*>(currentInstruction); 4455 4455 JSFunction* defaultHasInstanceSymbolFunction = m_inlineStackTop->m_codeBlock->globalObjectFor(currentCodeOrigin())->functionProtoHasInstanceSymbolFunction(); 4456 4456 4457 Node* constructor = get(VirtualRegister(bytecode ->constructor()));4458 Node* hasInstanceValue = get(VirtualRegister(bytecode ->hasInstanceValue()));4459 4460 set(VirtualRegister(bytecode ->dst()), addToGraph(OverridesHasInstance, OpInfo(m_graph.freeze(defaultHasInstanceSymbolFunction)), constructor, hasInstanceValue));4457 Node* constructor = get(VirtualRegister(bytecode.constructor())); 4458 Node* hasInstanceValue = get(VirtualRegister(bytecode.hasInstanceValue())); 4459 4460 set(VirtualRegister(bytecode.dst()), addToGraph(OverridesHasInstance, OpInfo(m_graph.freeze(defaultHasInstanceSymbolFunction)), constructor, hasInstanceValue)); 4461 4461 NEXT_OPCODE(op_overrides_has_instance); 4462 4462 } … … 4470 4470 4471 4471 case op_instanceof: { 4472 auto bytecode =reinterpret_cast<OpInstanceof*>(currentInstruction);4473 Node* value = get(VirtualRegister(bytecode ->value()));4474 Node* prototype = get(VirtualRegister(bytecode ->prototype()));4475 set(VirtualRegister(bytecode ->dst()), addToGraph(InstanceOf, value, prototype));4472 auto& bytecode = *reinterpret_cast<OpInstanceof*>(currentInstruction); 4473 Node* value = get(VirtualRegister(bytecode.value())); 4474 Node* prototype = get(VirtualRegister(bytecode.prototype())); 4475 set(VirtualRegister(bytecode.dst()), addToGraph(InstanceOf, value, prototype)); 4476 4476 NEXT_OPCODE(op_instanceof); 4477 4477 } 4478 4478 4479 4479 case op_instanceof_custom: { 4480 auto bytecode =reinterpret_cast<OpInstanceofCustom*>(currentInstruction);4481 Node* value = get(VirtualRegister(bytecode ->value()));4482 Node* constructor = get(VirtualRegister(bytecode ->constructor()));4483 Node* hasInstanceValue = get(VirtualRegister(bytecode ->hasInstanceValue()));4484 set(VirtualRegister(bytecode ->dst()), addToGraph(InstanceOfCustom, value, constructor, hasInstanceValue));4480 auto& bytecode = *reinterpret_cast<OpInstanceofCustom*>(currentInstruction); 4481 Node* value = get(VirtualRegister(bytecode.value())); 4482 Node* constructor = get(VirtualRegister(bytecode.constructor())); 4483 Node* hasInstanceValue = get(VirtualRegister(bytecode.hasInstanceValue())); 4484 set(VirtualRegister(bytecode.dst()), addToGraph(InstanceOfCustom, value, constructor, hasInstanceValue)); 4485 4485 NEXT_OPCODE(op_instanceof_custom); 4486 4486 } -
trunk/Source/JavaScriptCore/jit/JITOpcodes.cpp
r220753 r220770 114 114 void JIT::emit_op_overrides_has_instance(Instruction* currentInstruction) 115 115 { 116 auto bytecode =reinterpret_cast<OpOverridesHasInstance*>(currentInstruction);117 int dst = bytecode ->dst();118 int constructor = bytecode ->constructor();119 int hasInstanceValue = bytecode ->hasInstanceValue();116 auto& bytecode = *reinterpret_cast<OpOverridesHasInstance*>(currentInstruction); 117 int dst = bytecode.dst(); 118 int constructor = bytecode.constructor(); 119 int hasInstanceValue = bytecode.hasInstanceValue(); 120 120 121 121 emitGetVirtualRegister(hasInstanceValue, regT0); … … 140 140 void JIT::emit_op_instanceof(Instruction* currentInstruction) 141 141 { 142 auto bytecode =reinterpret_cast<OpInstanceof*>(currentInstruction);143 int dst = bytecode ->dst();144 int value = bytecode ->value();145 int proto = bytecode ->prototype();142 auto& bytecode = *reinterpret_cast<OpInstanceof*>(currentInstruction); 143 int dst = bytecode.dst(); 144 int value = bytecode.value(); 145 int proto = bytecode.prototype(); 146 146 147 147 // Load the operands (baseVal, proto, and value respectively) into registers. … … 864 864 void JIT::emitSlow_op_instanceof(Instruction* currentInstruction, Vector<SlowCaseEntry>::iterator& iter) 865 865 { 866 auto bytecode =reinterpret_cast<OpInstanceof*>(currentInstruction);867 int dst = bytecode ->dst();868 int value = bytecode ->value();869 int proto = bytecode ->prototype();866 auto& bytecode = *reinterpret_cast<OpInstanceof*>(currentInstruction); 867 int dst = bytecode.dst(); 868 int value = bytecode.value(); 869 int proto = bytecode.prototype(); 870 870 871 871 linkSlowCaseIfNotJSCell(iter, value); … … 880 880 void JIT::emitSlow_op_instanceof_custom(Instruction* currentInstruction, Vector<SlowCaseEntry>::iterator& iter) 881 881 { 882 auto bytecode =reinterpret_cast<OpInstanceofCustom*>(currentInstruction);883 int dst = bytecode ->dst();884 int value = bytecode ->value();885 int constructor = bytecode ->constructor();886 int hasInstanceValue = bytecode ->hasInstanceValue();882 auto& bytecode = *reinterpret_cast<OpInstanceofCustom*>(currentInstruction); 883 int dst = bytecode.dst(); 884 int value = bytecode.value(); 885 int constructor = bytecode.constructor(); 886 int hasInstanceValue = bytecode.hasInstanceValue(); 887 887 888 888 linkSlowCase(iter); -
trunk/Source/JavaScriptCore/jit/JITOpcodes32_64.cpp
r220753 r220770 194 194 void JIT::emit_op_overrides_has_instance(Instruction* currentInstruction) 195 195 { 196 auto bytecode =reinterpret_cast<OpOverridesHasInstance*>(currentInstruction);197 int dst = bytecode ->dst();198 int constructor = bytecode ->constructor();199 int hasInstanceValue = bytecode ->hasInstanceValue();196 auto& bytecode = *reinterpret_cast<OpOverridesHasInstance*>(currentInstruction); 197 int dst = bytecode.dst(); 198 int constructor = bytecode.constructor(); 199 int hasInstanceValue = bytecode.hasInstanceValue(); 200 200 201 201 emitLoadPayload(hasInstanceValue, regT0); … … 222 222 void JIT::emit_op_instanceof(Instruction* currentInstruction) 223 223 { 224 auto bytecode =reinterpret_cast<OpInstanceof*>(currentInstruction);225 int dst = bytecode ->dst();226 int value = bytecode ->value();227 int proto = bytecode ->prototype();224 auto& bytecode = *reinterpret_cast<OpInstanceof*>(currentInstruction); 225 int dst = bytecode.dst(); 226 int value = bytecode.value(); 227 int proto = bytecode.prototype(); 228 228 229 229 // Load the operands into registers. … … 270 270 void JIT::emitSlow_op_instanceof(Instruction* currentInstruction, Vector<SlowCaseEntry>::iterator& iter) 271 271 { 272 auto bytecode =reinterpret_cast<OpInstanceof*>(currentInstruction);273 int dst = bytecode ->dst();274 int value = bytecode ->value();275 int proto = bytecode ->prototype();272 auto& bytecode = *reinterpret_cast<OpInstanceof*>(currentInstruction); 273 int dst = bytecode.dst(); 274 int value = bytecode.value(); 275 int proto = bytecode.prototype(); 276 276 277 277 linkSlowCaseIfNotJSCell(iter, value); … … 287 287 void JIT::emitSlow_op_instanceof_custom(Instruction* currentInstruction, Vector<SlowCaseEntry>::iterator& iter) 288 288 { 289 auto bytecode =reinterpret_cast<OpInstanceofCustom*>(currentInstruction);290 int dst = bytecode ->dst();291 int value = bytecode ->value();292 int constructor = bytecode ->constructor();293 int hasInstanceValue = bytecode ->hasInstanceValue();289 auto& bytecode = *reinterpret_cast<OpInstanceofCustom*>(currentInstruction); 290 int dst = bytecode.dst(); 291 int value = bytecode.value(); 292 int constructor = bytecode.constructor(); 293 int hasInstanceValue = bytecode.hasInstanceValue(); 294 294 295 295 linkSlowCase(iter);
Note: See TracChangeset
for help on using the changeset viewer.