Changeset 180917 in webkit
- Timestamp:
- Mar 2, 2015, 8:05:05 PM (10 years ago)
- Location:
- trunk/Source/JavaScriptCore
- Files:
-
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r180913 r180917 1 2015-03-02 Filip Pizlo <fpizlo@apple.com> 2 3 Remove op_get_callee, it's unused 4 https://bugs.webkit.org/show_bug.cgi?id=142206 5 6 Reviewed by Andreas Kling. 7 8 It's a bit of a shame that we stopped using this opcode since it gives us same-callee 9 profiling. But, if we were to add this functionality back in, we would almost certainly do 10 it by adding a JSFunction allocation watchpoint on FunctionExecutable. 11 12 * bytecode/BytecodeList.json: 13 * bytecode/BytecodeUseDef.h: 14 (JSC::computeUsesForBytecodeOffset): 15 (JSC::computeDefsForBytecodeOffset): 16 * bytecode/CodeBlock.cpp: 17 (JSC::CodeBlock::dumpBytecode): 18 (JSC::CodeBlock::finalizeUnconditionally): 19 * dfg/DFGByteCodeParser.cpp: 20 (JSC::DFG::ByteCodeParser::parseBlock): 21 * dfg/DFGCapabilities.cpp: 22 (JSC::DFG::capabilityLevel): 23 * jit/JIT.cpp: 24 (JSC::JIT::privateCompileMainPass): 25 (JSC::JIT::privateCompileSlowCases): 26 * jit/JIT.h: 27 * jit/JITOpcodes.cpp: 28 (JSC::JIT::emit_op_get_callee): Deleted. 29 (JSC::JIT::emitSlow_op_get_callee): Deleted. 30 * jit/JITOpcodes32_64.cpp: 31 (JSC::JIT::emit_op_get_callee): Deleted. 32 (JSC::JIT::emitSlow_op_get_callee): Deleted. 33 * llint/LowLevelInterpreter32_64.asm: 34 * llint/LowLevelInterpreter64.asm: 35 * runtime/CommonSlowPaths.cpp: 36 (JSC::SLOW_PATH_DECL): Deleted. 37 1 38 2015-03-02 Joseph Pecoraro <pecoraro@apple.com> 2 39 -
trunk/Source/JavaScriptCore/bytecode/BytecodeList.json
r180587 r180917 11 11 { "name" : "op_create_arguments", "length" : 3 }, 12 12 { "name" : "op_create_this", "length" : 4 }, 13 { "name" : "op_get_callee", "length" : 3 },14 13 { "name" : "op_to_this", "length" : 4 }, 15 14 { "name" : "op_new_object", "length" : 4 }, -
trunk/Source/JavaScriptCore/bytecode/BytecodeUseDef.h
r180595 r180917 50 50 case op_new_object: 51 51 case op_init_lazy_reg: 52 case op_get_callee:53 52 case op_enter: 54 53 case op_catch: … … 366 365 case op_new_object: 367 366 case op_to_this: 368 case op_get_callee:369 367 case op_init_lazy_reg: 370 368 case op_get_scope: -
trunk/Source/JavaScriptCore/bytecode/CodeBlock.cpp
r180875 r180917 773 773 break; 774 774 } 775 case op_get_callee: {776 int r0 = (++it)->u.operand;777 printLocationOpAndRegisterOperand(out, exec, location, it, "get_callee", r0);778 ++it;779 break;780 }781 775 case op_create_this: { 782 776 int r0 = (++it)->u.operand; … … 2566 2560 curInstruction[3].u.toThisStatus = merge( 2567 2561 curInstruction[3].u.toThisStatus, ToThisClearedByGC); 2568 break;2569 case op_get_callee:2570 if (!curInstruction[2].u.jsCell || Heap::isMarked(curInstruction[2].u.jsCell.get()))2571 break;2572 if (Options::verboseOSR())2573 dataLogF("Clearing LLInt get callee with function %p.\n", curInstruction[2].u.jsCell.get());2574 curInstruction[2].u.jsCell.clear();2575 2562 break; 2576 2563 case op_resolve_scope: { -
trunk/Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp
r180813 r180917 2691 2691 } 2692 2692 2693 case op_get_callee: {2694 JSCell* cachedFunction = currentInstruction[2].u.jsCell.get();2695 if (!cachedFunction2696 || m_inlineStackTop->m_profiledBlock->couldTakeSlowCase(m_currentIndex)2697 || m_inlineStackTop->m_exitProfile.hasExitSite(m_currentIndex, BadCell)) {2698 set(VirtualRegister(currentInstruction[1].u.operand), get(VirtualRegister(JSStack::Callee)));2699 } else {2700 FrozenValue* frozen = m_graph.freeze(cachedFunction);2701 ASSERT(cachedFunction->inherits(JSFunction::info()));2702 Node* actualCallee = get(VirtualRegister(JSStack::Callee));2703 addToGraph(CheckCell, OpInfo(frozen), actualCallee);2704 set(VirtualRegister(currentInstruction[1].u.operand), addToGraph(JSConstant, OpInfo(frozen)));2705 }2706 NEXT_OPCODE(op_get_callee);2707 }2708 2709 2693 // === Bitwise operations === 2710 2694 -
trunk/Source/JavaScriptCore/dfg/DFGCapabilities.cpp
r180587 r180917 104 104 case op_to_this: 105 105 case op_create_this: 106 case op_get_callee:107 106 case op_bitand: 108 107 case op_bitor: -
trunk/Source/JavaScriptCore/jit/JIT.cpp
r180587 r180917 200 200 DEFINE_OP(op_catch) 201 201 DEFINE_OP(op_construct) 202 DEFINE_OP(op_get_callee)203 202 DEFINE_OP(op_create_this) 204 203 DEFINE_OP(op_to_this) … … 380 379 DEFINE_SLOWCASE_OP(op_div) 381 380 DEFINE_SLOWCASE_OP(op_eq) 382 DEFINE_SLOWCASE_OP(op_get_callee)383 381 case op_get_by_id_out_of_line: 384 382 case op_get_array_length: -
trunk/Source/JavaScriptCore/jit/JIT.h
r180587 r180917 467 467 void emit_op_catch(Instruction*); 468 468 void emit_op_construct(Instruction*); 469 void emit_op_get_callee(Instruction*);470 469 void emit_op_create_this(Instruction*); 471 470 void emit_op_to_this(Instruction*); -
trunk/Source/JavaScriptCore/jit/JITOpcodes.cpp
r180897 r180917 730 730 } 731 731 732 void JIT::emit_op_get_callee(Instruction* currentInstruction)733 {734 int result = currentInstruction[1].u.operand;735 WriteBarrierBase<JSCell>* cachedFunction = ¤tInstruction[2].u.jsCell;736 emitGetFromCallFrameHeaderPtr(JSStack::Callee, regT0);737 738 loadPtr(cachedFunction, regT2);739 addSlowCase(branchPtr(NotEqual, regT0, regT2));740 741 emitPutVirtualRegister(result);742 }743 744 void JIT::emitSlow_op_get_callee(Instruction* currentInstruction, Vector<SlowCaseEntry>::iterator& iter)745 {746 linkSlowCase(iter);747 748 JITSlowPathCall slowPathCall(this, currentInstruction, slow_path_get_callee);749 slowPathCall.call();750 }751 752 732 void JIT::emit_op_create_this(Instruction* currentInstruction) 753 733 { -
trunk/Source/JavaScriptCore/jit/JITOpcodes32_64.cpp
r180897 r180917 948 948 } 949 949 950 void JIT::emit_op_get_callee(Instruction* currentInstruction)951 {952 int result = currentInstruction[1].u.operand;953 WriteBarrierBase<JSCell>* cachedFunction = ¤tInstruction[2].u.jsCell;954 emitGetFromCallFrameHeaderPtr(JSStack::Callee, regT0);955 956 loadPtr(cachedFunction, regT2);957 addSlowCase(branchPtr(NotEqual, regT0, regT2));958 959 move(TrustedImm32(JSValue::CellTag), regT1);960 emitStore(result, regT1, regT0);961 }962 963 void JIT::emitSlow_op_get_callee(Instruction* currentInstruction, Vector<SlowCaseEntry>::iterator& iter)964 {965 linkSlowCase(iter);966 967 JITSlowPathCall slowPathCall(this, currentInstruction, slow_path_get_callee);968 slowPathCall.call();969 }970 971 950 void JIT::emit_op_create_this(Instruction* currentInstruction) 972 951 { -
trunk/Source/JavaScriptCore/llint/LowLevelInterpreter32_64.asm
r180587 r180917 772 772 dispatch(4) 773 773 774 775 _llint_op_get_callee:776 traceExecution()777 loadi 4[PC], t0778 loadp PayloadOffset + Callee[cfr], t1779 loadpFromInstruction(2, t2)780 bpneq t1, t2, .opGetCalleeSlow781 storei CellTag, TagOffset[cfr, t0, 8]782 storei t1, PayloadOffset[cfr, t0, 8]783 dispatch(3)784 785 .opGetCalleeSlow:786 callSlowPath(_slow_path_get_callee)787 dispatch(3)788 774 789 775 _llint_op_to_this: -
trunk/Source/JavaScriptCore/llint/LowLevelInterpreter64.asm
r180587 r180917 656 656 dispatch(4) 657 657 658 659 _llint_op_get_callee:660 traceExecution()661 loadisFromInstruction(1, t0)662 loadp Callee[cfr], t1663 loadpFromInstruction(2, t2)664 bpneq t1, t2, .opGetCalleeSlow665 storep t1, [cfr, t0, 8]666 dispatch(3)667 668 .opGetCalleeSlow:669 callSlowPath(_slow_path_get_callee)670 dispatch(3)671 658 672 659 _llint_op_to_this: -
trunk/Source/JavaScriptCore/runtime/CommonSlowPaths.cpp
r180587 r180917 211 211 } 212 212 213 SLOW_PATH_DECL(slow_path_get_callee)214 {215 BEGIN();216 JSFunction* callee = jsCast<JSFunction*>(exec->callee());217 pc[2].u.jsCell.set(exec->vm(), exec->codeBlock()->ownerExecutable(), callee);218 RETURN(callee);219 }220 221 213 SLOW_PATH_DECL(slow_path_create_arguments) 222 214 {
Note:
See TracChangeset
for help on using the changeset viewer.