unsigned CallFrame::bytecodeOffset() { if (!codeBlock()) return 0; #if ENABLE(DFG_JIT) if (hasLocationAsCodeOriginIndex()) return bytecodeOffsetFromCodeOriginIndex(); #endif return locationAsBytecodeOffset(); }
CodeOrigin CallFrame::codeOrigin() { if (!codeBlock()) return CodeOrigin(0); #if ENABLE(DFG_JIT) if (hasLocationAsCodeOriginIndex()) { unsigned index = locationAsCodeOriginIndex(); ASSERT(codeBlock()->canGetCodeOrigin(index)); return codeBlock()->codeOrigin(index); } #endif return CodeOrigin(locationAsBytecodeOffset()); }
Instruction* CallFrame::currentVPC() const { return codeBlock()->instructions().begin() + locationAsBytecodeOffset(); }