Skip to content
  • fpizlo@apple.com's avatar
    FunctionExecutable should expose the ability to create unattached FunctionCodeBlocks · 67fa6e4e
    fpizlo@apple.com authored
    https://bugs.webkit.org/show_bug.cgi?id=70157
    
    Reviewed by Geoff Garen.
            
    Added FunctionExecutable::produceCodeBlockFor() and rewired compileForCallInternal()
    and compileForConstructInternal() to use this method. This required more cleanly
    exposing some of CodeBlock's tiering functionality and moving the CompilationKind
    enum to Executable.h, as this was the easiest way to make it available to the
    declarations/definitions of CodeBlock, FunctionExecutable, and BytecodeGenerator.
    
    * bytecode/CodeBlock.cpp:
    (JSC::CodeBlock::copyDataFrom):
    (JSC::CodeBlock::copyDataFromAlternative):
    * bytecode/CodeBlock.h:
    (JSC::CodeBlock::setAlternative):
    * bytecompiler/BytecodeGenerator.h:
    * runtime/Executable.cpp:
    (JSC::EvalExecutable::compileInternal):
    (JSC::ProgramExecutable::compileInternal):
    (JSC::FunctionExecutable::produceCodeBlockFor):
    (JSC::FunctionExecutable::compileForCallInternal):
    (JSC::FunctionExecutable::compileForConstructInternal):
    * runtime/Executable.h:
    (JSC::FunctionExecutable::codeBlockFor):
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@97564 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    67fa6e4e