Bug 148152 - OSR exit should have a direct reference to its target CodeBlock
Summary: OSR exit should have a direct reference to its target CodeBlock
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: Other
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-08-18 16:42 PDT by Geoffrey Garen
Modified: 2015-08-18 16:42 PDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Geoffrey Garen 2015-08-18 16:42:15 PDT
From InlineCallFrame.h:

// FIXME: It's dangerous that OSR exit asks the Executable for a CodeBlock
// instead of having a pointer to a CodeBlock. If the GC discards a
// CodeBlock that we inline, then we will see a different CodeBlock
// at OSR time than we saw at compilation time. This works if compilation
// is mostly pure and the two CodeBlocks are equivalent, but that is a
// fragile thing to rely on.

inline CodeBlock* baselineCodeBlockForInlineCallFrame(InlineCallFrame* inlineCallFrame)
{
    RELEASE_ASSERT(inlineCallFrame);
    ScriptExecutable* executable = inlineCallFrame->executable.get();
    RELEASE_ASSERT(executable->structure()->classInfo() == FunctionExecutable::info());
    return static_cast<FunctionExecutable*>(executable)->baselineCodeBlockFor(inlineCallFrame->specializationKind());
}