Remove LegacyProfiler
https://bugs.webkit.org/show_bug.cgi?id=153565
Reviewed by Mark Lam.
Source/JavaScriptCore:
JavaScriptCore now provides a sampling profiler and it is enabled
by all ports. Web Inspector switched months ago to using the
sampling profiler and displaying its data. Remove the legacy
profiler, as it is no longer being used by anything other then
console.profile and tests. We will update console.profile's
behavior soon to have new behavior and use the sampling data.
* API/JSProfilerPrivate.cpp: Removed.
* API/JSProfilerPrivate.h: Removed.
* CMakeLists.txt:
* JavaScriptCore.xcodeproj/project.pbxproj:
* bytecode/BytecodeList.json:
* bytecode/BytecodeUseDef.h:
(JSC::computeUsesForBytecodeOffset): Deleted.
(JSC::computeDefsForBytecodeOffset): Deleted.
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::dumpBytecode): Deleted.
* bytecode/UnlinkedFunctionExecutable.cpp:
(JSC::generateUnlinkedFunctionCodeBlock):
(JSC::UnlinkedFunctionExecutable::unlinkedCodeBlockFor):
* bytecode/UnlinkedFunctionExecutable.h:
* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::BytecodeGenerator):
(JSC::BytecodeGenerator::emitCall):
(JSC::BytecodeGenerator::emitCallVarargs):
(JSC::BytecodeGenerator::emitCallVarargsInTailPosition):
(JSC::BytecodeGenerator::emitConstructVarargs):
(JSC::BytecodeGenerator::emitConstruct):
* bytecompiler/BytecodeGenerator.h:
(JSC::CallArguments::profileHookRegister): Deleted.
(JSC::BytecodeGenerator::shouldEmitProfileHooks): Deleted.
* bytecompiler/NodesCodegen.cpp:
(JSC::CallFunctionCallDotNode::emitBytecode):
(JSC::ApplyFunctionCallDotNode::emitBytecode):
(JSC::CallArguments::CallArguments): Deleted.
* dfg/DFGAbstractInterpreterInlines.h:
(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects): Deleted.
* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::parseBlock): Deleted.
* dfg/DFGCapabilities.cpp:
(JSC::DFG::capabilityLevel): Deleted.
* dfg/DFGClobberize.h:
(JSC::DFG::clobberize): Deleted.
* dfg/DFGDoesGC.cpp:
(JSC::DFG::doesGC): Deleted.
* dfg/DFGFixupPhase.cpp:
(JSC::DFG::FixupPhase::fixupNode): Deleted.
* dfg/DFGNodeType.h:
* dfg/DFGPredictionPropagationPhase.cpp:
* dfg/DFGSafeToExecute.h:
(JSC::DFG::safeToExecute): Deleted.
* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::compile): Deleted.
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::compile): Deleted.
* inspector/InjectedScriptBase.cpp:
(Inspector::InjectedScriptBase::callFunctionWithEvalEnabled):
* interpreter/Interpreter.cpp:
(JSC::UnwindFunctor::operator()): Deleted.
(JSC::Interpreter::execute): Deleted.
(JSC::Interpreter::executeCall): Deleted.
(JSC::Interpreter::executeConstruct): Deleted.
* jit/JIT.cpp:
(JSC::JIT::privateCompileMainPass): Deleted.
* jit/JIT.h:
* jit/JITOpcodes.cpp:
(JSC::JIT::emit_op_profile_will_call): Deleted.
(JSC::JIT::emit_op_profile_did_call): Deleted.
* jit/JITOpcodes32_64.cpp:
(JSC::JIT::emit_op_profile_will_call): Deleted.
(JSC::JIT::emit_op_profile_did_call): Deleted.
* jit/JITOperations.cpp:
* jit/JITOperations.h:
* llint/LLIntSlowPaths.cpp:
(JSC::LLInt::LLINT_SLOW_PATH_DECL): Deleted.
* llint/LLIntSlowPaths.h:
* llint/LowLevelInterpreter.asm:
* parser/ParserModes.h:
* profiler/CallIdentifier.h: Removed.
* profiler/LegacyProfiler.cpp: Removed.
* profiler/LegacyProfiler.h: Removed.
* profiler/Profile.cpp: Removed.
* profiler/Profile.h: Removed.
* profiler/ProfileGenerator.cpp: Removed.
* profiler/ProfileGenerator.h: Removed.
* profiler/ProfileNode.cpp: Removed.
* profiler/ProfileNode.h: Removed.
* profiler/ProfilerJettisonReason.cpp:
(WTF::printInternal): Deleted.
* profiler/ProfilerJettisonReason.h:
* runtime/CodeCache.cpp:
(JSC::CodeCache::getGlobalCodeBlock):
(JSC::CodeCache::getProgramCodeBlock):
(JSC::CodeCache::getEvalCodeBlock):
(JSC::CodeCache::getModuleProgramCodeBlock):
* runtime/CodeCache.h:
* runtime/Executable.cpp:
(JSC::ScriptExecutable::newCodeBlockFor):
* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::createProgramCodeBlock):
(JSC::JSGlobalObject::createEvalCodeBlock):
(JSC::JSGlobalObject::createModuleProgramCodeBlock):
(JSC::JSGlobalObject::~JSGlobalObject): Deleted.
(JSC::JSGlobalObject::hasLegacyProfiler): Deleted.
* runtime/JSGlobalObject.h:
* runtime/Options.h:
* runtime/VM.cpp:
(JSC::VM::VM): Deleted.
(JSC::SetEnabledProfilerFunctor::operator()): Deleted.
(JSC::VM::setEnabledProfiler): Deleted.
* runtime/VM.h:
(JSC::VM::enabledProfiler): Deleted.
(JSC::VM::enabledProfilerAddress): Deleted.
Source/WebCore:
* ForwardingHeaders/profiler/Profile.h: Removed.
* ForwardingHeaders/profiler/ProfileNode.h: Removed.
* testing/js/WebCoreTestSupport.cpp:
* xml/XSLStyleSheetLibxslt.cpp:
* xml/XSLTProcessorLibxslt.cpp:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@201239 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp b/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp
index 0c24952..b50151d 100644
--- a/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp
+++ b/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp
@@ -149,9 +149,8 @@
return ParserError(ParserError::ErrorNone);
}
-BytecodeGenerator::BytecodeGenerator(VM& vm, ProgramNode* programNode, UnlinkedProgramCodeBlock* codeBlock, DebuggerMode debuggerMode, ProfilerMode profilerMode, const VariableEnvironment* parentScopeTDZVariables)
+BytecodeGenerator::BytecodeGenerator(VM& vm, ProgramNode* programNode, UnlinkedProgramCodeBlock* codeBlock, DebuggerMode debuggerMode, const VariableEnvironment* parentScopeTDZVariables)
: m_shouldEmitDebugHooks(Options::forceDebuggerBytecodeGeneration() || debuggerMode == DebuggerOn)
- , m_shouldEmitProfileHooks(Options::forceProfilerBytecodeGeneration() || profilerMode == ProfilerOn)
, m_scopeNode(programNode)
, m_codeBlock(vm, codeBlock)
, m_thisRegister(CallFrame::thisArgumentOffset())
@@ -195,9 +194,8 @@
}
}
-BytecodeGenerator::BytecodeGenerator(VM& vm, FunctionNode* functionNode, UnlinkedFunctionCodeBlock* codeBlock, DebuggerMode debuggerMode, ProfilerMode profilerMode, const VariableEnvironment* parentScopeTDZVariables)
+BytecodeGenerator::BytecodeGenerator(VM& vm, FunctionNode* functionNode, UnlinkedFunctionCodeBlock* codeBlock, DebuggerMode debuggerMode, const VariableEnvironment* parentScopeTDZVariables)
: m_shouldEmitDebugHooks(Options::forceDebuggerBytecodeGeneration() || debuggerMode == DebuggerOn)
- , m_shouldEmitProfileHooks(Options::forceProfilerBytecodeGeneration() || profilerMode == ProfilerOn)
, m_scopeNode(functionNode)
, m_codeBlock(vm, codeBlock)
, m_codeType(FunctionCode)
@@ -209,7 +207,7 @@
// op_will_call / op_did_call pairs before and after a call, which are not
// compatible with tail calls (we have no way of emitting op_did_call).
// https://bugs.webkit.org/show_bug.cgi?id=148819
- , m_inTailPosition(Options::useTailCalls() && !isConstructor() && constructorKind() == ConstructorKind::None && isStrictMode() && !m_shouldEmitProfileHooks)
+ , m_inTailPosition(Options::useTailCalls() && !isConstructor() && constructorKind() == ConstructorKind::None && isStrictMode())
, m_needsToUpdateArrowFunctionContext(functionNode->usesArrowFunction() || functionNode->usesEval())
, m_derivedContextType(codeBlock->derivedContextType())
{
@@ -605,9 +603,8 @@
pushLexicalScope(m_scopeNode, TDZCheckOptimization::Optimize, NestedScopeType::IsNotNested, nullptr, shouldInitializeBlockScopedFunctions);
}
-BytecodeGenerator::BytecodeGenerator(VM& vm, EvalNode* evalNode, UnlinkedEvalCodeBlock* codeBlock, DebuggerMode debuggerMode, ProfilerMode profilerMode, const VariableEnvironment* parentScopeTDZVariables)
+BytecodeGenerator::BytecodeGenerator(VM& vm, EvalNode* evalNode, UnlinkedEvalCodeBlock* codeBlock, DebuggerMode debuggerMode, const VariableEnvironment* parentScopeTDZVariables)
: m_shouldEmitDebugHooks(Options::forceDebuggerBytecodeGeneration() || debuggerMode == DebuggerOn)
- , m_shouldEmitProfileHooks(Options::forceProfilerBytecodeGeneration() || profilerMode == ProfilerOn)
, m_scopeNode(evalNode)
, m_codeBlock(vm, codeBlock)
, m_thisRegister(CallFrame::thisArgumentOffset())
@@ -663,9 +660,8 @@
pushLexicalScope(m_scopeNode, TDZCheckOptimization::Optimize, NestedScopeType::IsNotNested, nullptr, shouldInitializeBlockScopedFunctions);
}
-BytecodeGenerator::BytecodeGenerator(VM& vm, ModuleProgramNode* moduleProgramNode, UnlinkedModuleProgramCodeBlock* codeBlock, DebuggerMode debuggerMode, ProfilerMode profilerMode, const VariableEnvironment* parentScopeTDZVariables)
+BytecodeGenerator::BytecodeGenerator(VM& vm, ModuleProgramNode* moduleProgramNode, UnlinkedModuleProgramCodeBlock* codeBlock, DebuggerMode debuggerMode, const VariableEnvironment* parentScopeTDZVariables)
: m_shouldEmitDebugHooks(Options::forceDebuggerBytecodeGeneration() || debuggerMode == DebuggerOn)
- , m_shouldEmitProfileHooks(Options::forceProfilerBytecodeGeneration() || profilerMode == ProfilerOn)
, m_scopeNode(moduleProgramNode)
, m_codeBlock(vm, codeBlock)
, m_thisRegister(CallFrame::thisArgumentOffset())
@@ -3073,9 +3069,6 @@
ASSERT(opcodeID == op_call || opcodeID == op_call_eval || opcodeID == op_tail_call);
ASSERT(func->refCount());
- if (m_shouldEmitProfileHooks)
- emitMove(callArguments.profileHookRegister(), func);
-
// Generate code for arguments.
unsigned argument = 0;
if (callArguments.argumentsNode()) {
@@ -3086,7 +3079,7 @@
RefPtr<RegisterID> argumentRegister;
argumentRegister = expression->emitBytecode(*this, callArguments.argumentRegister(0));
RefPtr<RegisterID> thisRegister = emitMove(newTemporary(), callArguments.thisRegister());
- return emitCallVarargs(opcodeID == op_tail_call ? op_tail_call_varargs : op_call_varargs, dst, func, callArguments.thisRegister(), argumentRegister.get(), newTemporary(), 0, callArguments.profileHookRegister(), divot, divotStart, divotEnd);
+ return emitCallVarargs(opcodeID == op_tail_call ? op_tail_call_varargs : op_call_varargs, dst, func, callArguments.thisRegister(), argumentRegister.get(), newTemporary(), 0, divot, divotStart, divotEnd);
}
for (; n; n = n->m_next)
emitNode(callArguments.argumentRegister(argument++), n);
@@ -3097,11 +3090,6 @@
for (int i = 0; i < JSStack::CallFrameHeaderSize; ++i)
callFrame.append(newTemporary());
- if (m_shouldEmitProfileHooks) {
- emitOpcode(op_profile_will_call);
- instructions().append(callArguments.profileHookRegister()->index());
- }
-
emitExpressionInfo(divot, divotStart, divotEnd);
RefPtr<Label> done = newLabel();
@@ -3127,37 +3115,26 @@
if (expectedFunction != NoExpectedFunction)
emitLabel(done.get());
- if (m_shouldEmitProfileHooks) {
- emitOpcode(op_profile_did_call);
- instructions().append(callArguments.profileHookRegister()->index());
- }
-
return dst;
}
-RegisterID* BytecodeGenerator::emitCallVarargs(RegisterID* dst, RegisterID* func, RegisterID* thisRegister, RegisterID* arguments, RegisterID* firstFreeRegister, int32_t firstVarArgOffset, RegisterID* profileHookRegister, const JSTextPosition& divot, const JSTextPosition& divotStart, const JSTextPosition& divotEnd)
+RegisterID* BytecodeGenerator::emitCallVarargs(RegisterID* dst, RegisterID* func, RegisterID* thisRegister, RegisterID* arguments, RegisterID* firstFreeRegister, int32_t firstVarArgOffset, const JSTextPosition& divot, const JSTextPosition& divotStart, const JSTextPosition& divotEnd)
{
- return emitCallVarargs(op_call_varargs, dst, func, thisRegister, arguments, firstFreeRegister, firstVarArgOffset, profileHookRegister, divot, divotStart, divotEnd);
+ return emitCallVarargs(op_call_varargs, dst, func, thisRegister, arguments, firstFreeRegister, firstVarArgOffset, divot, divotStart, divotEnd);
}
-RegisterID* BytecodeGenerator::emitCallVarargsInTailPosition(RegisterID* dst, RegisterID* func, RegisterID* thisRegister, RegisterID* arguments, RegisterID* firstFreeRegister, int32_t firstVarArgOffset, RegisterID* profileHookRegister, const JSTextPosition& divot, const JSTextPosition& divotStart, const JSTextPosition& divotEnd)
+RegisterID* BytecodeGenerator::emitCallVarargsInTailPosition(RegisterID* dst, RegisterID* func, RegisterID* thisRegister, RegisterID* arguments, RegisterID* firstFreeRegister, int32_t firstVarArgOffset, const JSTextPosition& divot, const JSTextPosition& divotStart, const JSTextPosition& divotEnd)
{
- return emitCallVarargs(m_inTailPosition ? op_tail_call_varargs : op_call_varargs, dst, func, thisRegister, arguments, firstFreeRegister, firstVarArgOffset, profileHookRegister, divot, divotStart, divotEnd);
+ return emitCallVarargs(m_inTailPosition ? op_tail_call_varargs : op_call_varargs, dst, func, thisRegister, arguments, firstFreeRegister, firstVarArgOffset, divot, divotStart, divotEnd);
}
-RegisterID* BytecodeGenerator::emitConstructVarargs(RegisterID* dst, RegisterID* func, RegisterID* thisRegister, RegisterID* arguments, RegisterID* firstFreeRegister, int32_t firstVarArgOffset, RegisterID* profileHookRegister, const JSTextPosition& divot, const JSTextPosition& divotStart, const JSTextPosition& divotEnd)
+RegisterID* BytecodeGenerator::emitConstructVarargs(RegisterID* dst, RegisterID* func, RegisterID* thisRegister, RegisterID* arguments, RegisterID* firstFreeRegister, int32_t firstVarArgOffset, const JSTextPosition& divot, const JSTextPosition& divotStart, const JSTextPosition& divotEnd)
{
- return emitCallVarargs(op_construct_varargs, dst, func, thisRegister, arguments, firstFreeRegister, firstVarArgOffset, profileHookRegister, divot, divotStart, divotEnd);
+ return emitCallVarargs(op_construct_varargs, dst, func, thisRegister, arguments, firstFreeRegister, firstVarArgOffset, divot, divotStart, divotEnd);
}
-RegisterID* BytecodeGenerator::emitCallVarargs(OpcodeID opcode, RegisterID* dst, RegisterID* func, RegisterID* thisRegister, RegisterID* arguments, RegisterID* firstFreeRegister, int32_t firstVarArgOffset, RegisterID* profileHookRegister, const JSTextPosition& divot, const JSTextPosition& divotStart, const JSTextPosition& divotEnd)
+RegisterID* BytecodeGenerator::emitCallVarargs(OpcodeID opcode, RegisterID* dst, RegisterID* func, RegisterID* thisRegister, RegisterID* arguments, RegisterID* firstFreeRegister, int32_t firstVarArgOffset, const JSTextPosition& divot, const JSTextPosition& divotStart, const JSTextPosition& divotEnd)
{
- if (m_shouldEmitProfileHooks) {
- emitMove(profileHookRegister, func);
- emitOpcode(op_profile_will_call);
- instructions().append(profileHookRegister->index());
- }
-
emitExpressionInfo(divot, divotStart, divotEnd);
if (opcode == op_tail_call_varargs)
@@ -3175,10 +3152,6 @@
instructions().append(firstVarArgOffset);
instructions().append(arrayProfile);
instructions().append(profile);
- if (m_shouldEmitProfileHooks) {
- emitOpcode(op_profile_did_call);
- instructions().append(profileHookRegister->index());
- }
return dst;
}
@@ -3274,9 +3247,6 @@
{
ASSERT(func->refCount());
- if (m_shouldEmitProfileHooks)
- emitMove(callArguments.profileHookRegister(), func);
-
// Generate code for arguments.
unsigned argument = 0;
if (ArgumentsNode* argumentsNode = callArguments.argumentsNode()) {
@@ -3287,18 +3257,13 @@
auto expression = static_cast<SpreadExpressionNode*>(n->m_expr)->expression();
RefPtr<RegisterID> argumentRegister;
argumentRegister = expression->emitBytecode(*this, callArguments.argumentRegister(0));
- return emitConstructVarargs(dst, func, callArguments.thisRegister(), argumentRegister.get(), newTemporary(), 0, callArguments.profileHookRegister(), divot, divotStart, divotEnd);
+ return emitConstructVarargs(dst, func, callArguments.thisRegister(), argumentRegister.get(), newTemporary(), 0, divot, divotStart, divotEnd);
}
for (ArgumentListNode* n = argumentsNode->m_listNode; n; n = n->m_next)
emitNode(callArguments.argumentRegister(argument++), n);
}
- if (m_shouldEmitProfileHooks) {
- emitOpcode(op_profile_will_call);
- instructions().append(callArguments.profileHookRegister()->index());
- }
-
// Reserve space for call frame.
Vector<RefPtr<RegisterID>, JSStack::CallFrameHeaderSize, UnsafeVectorOverflow> callFrame;
for (int i = 0; i < JSStack::CallFrameHeaderSize; ++i)
@@ -3323,11 +3288,6 @@
if (expectedFunction != NoExpectedFunction)
emitLabel(done.get());
- if (m_shouldEmitProfileHooks) {
- emitOpcode(op_profile_did_call);
- instructions().append(callArguments.profileHookRegister()->index());
- }
-
return dst;
}
diff --git a/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.h b/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.h
index a204a03..16b1f53 100644
--- a/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.h
+++ b/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.h
@@ -75,11 +75,9 @@
RegisterID* argumentRegister(unsigned i) { return m_argv[i + 1].get(); }
unsigned stackOffset() { return -m_argv[0]->index() + JSStack::CallFrameHeaderSize; }
unsigned argumentCountIncludingThis() { return m_argv.size() - m_padding; }
- RegisterID* profileHookRegister() { return m_profileHookRegister.get(); }
ArgumentsNode* argumentsNode() { return m_argumentsNode; }
private:
- RefPtr<RegisterID> m_profileHookRegister;
ArgumentsNode* m_argumentsNode;
Vector<RefPtr<RegisterID>, 8, UnsafeVectorOverflow> m_argv;
unsigned m_padding;
@@ -269,10 +267,10 @@
public:
typedef DeclarationStacks::FunctionStack FunctionStack;
- BytecodeGenerator(VM&, ProgramNode*, UnlinkedProgramCodeBlock*, DebuggerMode, ProfilerMode, const VariableEnvironment*);
- BytecodeGenerator(VM&, FunctionNode*, UnlinkedFunctionCodeBlock*, DebuggerMode, ProfilerMode, const VariableEnvironment*);
- BytecodeGenerator(VM&, EvalNode*, UnlinkedEvalCodeBlock*, DebuggerMode, ProfilerMode, const VariableEnvironment*);
- BytecodeGenerator(VM&, ModuleProgramNode*, UnlinkedModuleProgramCodeBlock*, DebuggerMode, ProfilerMode, const VariableEnvironment*);
+ BytecodeGenerator(VM&, ProgramNode*, UnlinkedProgramCodeBlock*, DebuggerMode, const VariableEnvironment*);
+ BytecodeGenerator(VM&, FunctionNode*, UnlinkedFunctionCodeBlock*, DebuggerMode, const VariableEnvironment*);
+ BytecodeGenerator(VM&, EvalNode*, UnlinkedEvalCodeBlock*, DebuggerMode, const VariableEnvironment*);
+ BytecodeGenerator(VM&, ModuleProgramNode*, UnlinkedModuleProgramCodeBlock*, DebuggerMode, const VariableEnvironment*);
~BytecodeGenerator();
@@ -577,8 +575,8 @@
RegisterID* emitCall(RegisterID* dst, RegisterID* func, ExpectedFunction, CallArguments&, const JSTextPosition& divot, const JSTextPosition& divotStart, const JSTextPosition& divotEnd);
RegisterID* emitCallInTailPosition(RegisterID* dst, RegisterID* func, ExpectedFunction, CallArguments&, const JSTextPosition& divot, const JSTextPosition& divotStart, const JSTextPosition& divotEnd);
RegisterID* emitCallEval(RegisterID* dst, RegisterID* func, CallArguments&, const JSTextPosition& divot, const JSTextPosition& divotStart, const JSTextPosition& divotEnd);
- RegisterID* emitCallVarargs(RegisterID* dst, RegisterID* func, RegisterID* thisRegister, RegisterID* arguments, RegisterID* firstFreeRegister, int32_t firstVarArgOffset, RegisterID* profileHookRegister, const JSTextPosition& divot, const JSTextPosition& divotStart, const JSTextPosition& divotEnd);
- RegisterID* emitCallVarargsInTailPosition(RegisterID* dst, RegisterID* func, RegisterID* thisRegister, RegisterID* arguments, RegisterID* firstFreeRegister, int32_t firstVarArgOffset, RegisterID* profileHookRegister, const JSTextPosition& divot, const JSTextPosition& divotStart, const JSTextPosition& divotEnd);
+ RegisterID* emitCallVarargs(RegisterID* dst, RegisterID* func, RegisterID* thisRegister, RegisterID* arguments, RegisterID* firstFreeRegister, int32_t firstVarArgOffset, const JSTextPosition& divot, const JSTextPosition& divotStart, const JSTextPosition& divotEnd);
+ RegisterID* emitCallVarargsInTailPosition(RegisterID* dst, RegisterID* func, RegisterID* thisRegister, RegisterID* arguments, RegisterID* firstFreeRegister, int32_t firstVarArgOffset, const JSTextPosition& divot, const JSTextPosition& divotStart, const JSTextPosition& divotEnd);
enum PropertyDescriptorOption {
PropertyConfigurable = 1,
@@ -704,7 +702,6 @@
CodeType codeType() const { return m_codeType; }
- bool shouldEmitProfileHooks() { return m_shouldEmitProfileHooks; }
bool shouldEmitDebugHooks() { return m_shouldEmitDebugHooks; }
bool isStrictMode() const { return m_codeBlock->isStrictMode(); }
@@ -849,8 +846,8 @@
void getVariablesUnderTDZ(VariableEnvironment&);
- RegisterID* emitConstructVarargs(RegisterID* dst, RegisterID* func, RegisterID* thisRegister, RegisterID* arguments, RegisterID* firstFreeRegister, int32_t firstVarArgOffset, RegisterID* profileHookRegister, const JSTextPosition& divot, const JSTextPosition& divotStart, const JSTextPosition& divotEnd);
- RegisterID* emitCallVarargs(OpcodeID, RegisterID* dst, RegisterID* func, RegisterID* thisRegister, RegisterID* arguments, RegisterID* firstFreeRegister, int32_t firstVarArgOffset, RegisterID* profileHookRegister, const JSTextPosition& divot, const JSTextPosition& divotStart, const JSTextPosition& divotEnd);
+ RegisterID* emitConstructVarargs(RegisterID* dst, RegisterID* func, RegisterID* thisRegister, RegisterID* arguments, RegisterID* firstFreeRegister, int32_t firstVarArgOffset, const JSTextPosition& divot, const JSTextPosition& divotStart, const JSTextPosition& divotEnd);
+ RegisterID* emitCallVarargs(OpcodeID, RegisterID* dst, RegisterID* func, RegisterID* thisRegister, RegisterID* arguments, RegisterID* firstFreeRegister, int32_t firstVarArgOffset, const JSTextPosition& divot, const JSTextPosition& divotStart, const JSTextPosition& divotEnd);
void emitLogShadowChickenPrologueIfNecessary();
void emitLogShadowChickenTailIfNecessary();
@@ -872,7 +869,6 @@
Vector<UnlinkedInstruction, 0, UnsafeVectorOverflow> m_instructions;
bool m_shouldEmitDebugHooks;
- bool m_shouldEmitProfileHooks;
struct SymbolTableStackEntry {
SymbolTable* m_symbolTable;
diff --git a/Source/JavaScriptCore/bytecompiler/NodesCodegen.cpp b/Source/JavaScriptCore/bytecompiler/NodesCodegen.cpp
index f2530ee..3bbd2f1 100644
--- a/Source/JavaScriptCore/bytecompiler/NodesCodegen.cpp
+++ b/Source/JavaScriptCore/bytecompiler/NodesCodegen.cpp
@@ -707,9 +707,6 @@
: m_argumentsNode(argumentsNode)
, m_padding(0)
{
- if (generator.shouldEmitProfileHooks())
- m_profileHookRegister = generator.newTemporary();
-
size_t argumentCountIncludingThis = 1 + additionalArguments; // 'this' register.
if (argumentsNode) {
for (ArgumentListNode* node = argumentsNode->m_listNode; node; node = node->m_next)
@@ -1021,16 +1018,13 @@
RefPtr<RegisterID> returnValue = generator.finalDestination(dst);
{
if (m_args->m_listNode && m_args->m_listNode->m_expr && m_args->m_listNode->m_expr->isSpreadExpression()) {
- RefPtr<RegisterID> profileHookRegister;
- if (generator.shouldEmitProfileHooks())
- profileHookRegister = generator.newTemporary();
SpreadExpressionNode* spread = static_cast<SpreadExpressionNode*>(m_args->m_listNode->m_expr);
ExpressionNode* subject = spread->expression();
RefPtr<RegisterID> argumentsRegister;
argumentsRegister = generator.emitNode(subject);
generator.emitExpressionInfo(spread->divot(), spread->divotStart(), spread->divotEnd());
RefPtr<RegisterID> thisRegister = generator.emitGetByVal(generator.newTemporary(), argumentsRegister.get(), generator.emitLoad(0, jsNumber(0)));
- generator.emitCallVarargsInTailPosition(returnValue.get(), base.get(), thisRegister.get(), argumentsRegister.get(), generator.newTemporary(), 1, profileHookRegister.get(), divot(), divotStart(), divotEnd());
+ generator.emitCallVarargsInTailPosition(returnValue.get(), base.get(), thisRegister.get(), argumentsRegister.get(), generator.newTemporary(), 1, divot(), divotStart(), divotEnd());
} else if (m_args->m_listNode && m_args->m_listNode->m_expr) {
ArgumentListNode* oldList = m_args->m_listNode;
m_args->m_listNode = m_args->m_listNode->m_next;
@@ -1094,9 +1088,6 @@
ArgumentListNode* oldList = m_args->m_listNode;
if (m_args->m_listNode->m_expr->isSpreadExpression()) {
SpreadExpressionNode* spread = static_cast<SpreadExpressionNode*>(m_args->m_listNode->m_expr);
- RefPtr<RegisterID> profileHookRegister;
- if (generator.shouldEmitProfileHooks())
- profileHookRegister = generator.newTemporary();
RefPtr<RegisterID> realFunction = generator.emitMove(generator.newTemporary(), base.get());
RefPtr<RegisterID> index = generator.emitLoad(generator.newTemporary(), jsNumber(0));
RefPtr<RegisterID> thisRegister = generator.emitLoad(generator.newTemporary(), jsUndefined());
@@ -1120,7 +1111,7 @@
generator.emitLabel(end.get());
};
generator.emitEnumeration(this, spread->expression(), extractor);
- generator.emitCallVarargsInTailPosition(returnValue.get(), realFunction.get(), thisRegister.get(), argumentsRegister.get(), generator.newTemporary(), 0, profileHookRegister.get(), divot(), divotStart(), divotEnd());
+ generator.emitCallVarargsInTailPosition(returnValue.get(), realFunction.get(), thisRegister.get(), argumentsRegister.get(), generator.newTemporary(), 0, divot(), divotStart(), divotEnd());
} else if (m_args->m_listNode->m_next) {
ASSERT(m_args->m_listNode->m_next->m_expr->isSimpleArray());
ASSERT(!m_args->m_listNode->m_next->m_next);
@@ -1145,9 +1136,6 @@
}
} else {
ASSERT(m_args->m_listNode && m_args->m_listNode->m_next);
- RefPtr<RegisterID> profileHookRegister;
- if (generator.shouldEmitProfileHooks())
- profileHookRegister = generator.newTemporary();
RefPtr<RegisterID> realFunction = generator.emitMove(generator.tempDestination(dst), base.get());
RefPtr<RegisterID> thisRegister = generator.emitNode(m_args->m_listNode->m_expr);
RefPtr<RegisterID> argsRegister;
@@ -1159,7 +1147,7 @@
while ((args = args->m_next))
generator.emitNode(args->m_expr);
- generator.emitCallVarargsInTailPosition(returnValue.get(), realFunction.get(), thisRegister.get(), argsRegister.get(), generator.newTemporary(), 0, profileHookRegister.get(), divot(), divotStart(), divotEnd());
+ generator.emitCallVarargsInTailPosition(returnValue.get(), realFunction.get(), thisRegister.get(), argsRegister.get(), generator.newTemporary(), 0, divot(), divotStart(), divotEnd());
}
if (emitCallCheck) {
generator.emitJump(end.get());