Remove FunctionCodeBlock.
https://bugs.webkit.org/show_bug.cgi?id=28502
Reviewed by Oliver Hunt.
These only exist to allow JIT code to dereference properties off the
CodeBlock for any callee, regardless of whether it is a host function.
Instead just use the FunctionExecutable. Copy the m_parameters field
from the CodeBlock into the Executable, and use this to distinguish
between host functions, functions that have been bytecompiled, and
functions that have not.
m_parameters is moved to ExecutableBase rather than FunctionExecutable
so that (as a separate change) we can move make a separate class of
executable for host code, which is not devived from FunctionExecutable
(host code does not feature any of the properties that normal executable
do and will provide, such as source, attributes, and a parsed name).
1% win on v8 tests, 0.5% on sunspider.
(JSC::CodeBlock::derefStructures):
(JSC::CodeBlock::refStructures):
(JSC::CodeBlock::reparseForExceptionInfoIfNecessary):
(JSC::CodeBlock::handlerForBytecodeOffset):
(JSC::CodeBlock::lineNumberForBytecodeOffset):
(JSC::CodeBlock::expressionRangeForBytecodeOffset):
(JSC::CodeBlock::getByIdExceptionInfoForBytecodeOffset):
(JSC::CodeBlock::functionRegisterForBytecodeOffset):
(JSC::CodeBlock::hasGlobalResolveInstructionAtBytecodeOffset):
(JSC::CodeBlock::hasGlobalResolveInfoAtBytecodeOffset):
(JSC::):
(JSC::CodeBlock::source):
(JSC::CodeBlock::sourceOffset):
(JSC::CodeBlock::evalCodeCache):
(JSC::CodeBlock::createRareDataIfNecessary):
remove NativeCodeBlocks and the NativeCode code type.
(JSC::JIT::linkCall):
Revert to previous behaviour (as currently still commented!) that Hhost functions have a null codeblock.
(JSC::JIT::compileOpCallInitializeCallFrame):
(JSC::JIT::compileOpCallSetupArgs):
(JSC::JIT::compileOpCallVarargsSetupArgs):
(JSC::JIT::compileOpConstructSetupArgs):
(JSC::JIT::compileOpCallVarargs):
(JSC::JIT::compileOpCall):
(JSC::JIT::compileOpCallSlowCase):
Bring the 32_64 & non-32_64 JITs into line with each other, callee in regT0.
(JSC::JIT::privateCompileCTIMachineTrampolines):
Rewrite call trampolines to not use the CodeBlock.
(JSC::DEFINE_STUB_FUNCTION):
Make call_JSFunction & call_arityCheck return the callee, don't expect to be passed the CodeBlock.
(JSC::FunctionExecutable::generateBytecode):
(JSC::FunctionExecutable::recompile):
(JSC::FunctionExecutable::FunctionExecutable):
(JSC::ExecutableBase::):
(JSC::ExecutableBase::ExecutableBase):
(JSC::FunctionExecutable::isHostFunction):
Add m_numParameters.
(JSC::JSFunction::~JSFunction):
Only call generatedBytecode() on JSFunctions non-host FunctionExecutables.