Bug 134077 - [ftlopt] StructureSet::onlyStructure() should return nullptr if it's not a singleton (instead of asserting)
Summary: [ftlopt] StructureSet::onlyStructure() should return nullptr if it's not a si...
Status: RESOLVED CONFIGURATION CHANGED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Filip Pizlo
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-06-19 14:43 PDT by Filip Pizlo
Modified: 2024-02-25 04:59 PST (History)
10 users (show)

See Also:


Attachments
the patch (1.64 KB, patch)
2014-06-19 14:44 PDT, Filip Pizlo
sam: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Filip Pizlo 2014-06-19 14:43:17 PDT
Patch forthcoming.
Comment 1 Filip Pizlo 2014-06-19 14:44:29 PDT
Created attachment 233385 [details]
the patch
Comment 2 Ahmad Saleem 2024-02-25 04:59:34 PST
This function is following:

https://searchfox.org/wubkat/rev/dc6a01c9fd207e1b1394a1cb8261b410a1909cf6/Source/JavaScriptCore/bytecode/StructureSet.h#52

    Structure* onlyStructure() const
    {
        return onlyEntry();
    }

While onlyEntry is:

    // Returns the only entry if the array has exactly one entry.
    T onlyEntry() const
    {
        if (isThin())
            return singleEntry();
        OutOfLineList* list = this->list();
        if (list->m_length != 1)
            return T();
        return list->list()[0];
    }

__

Which is similar to proposed patch, so I think it is fixed.

Marking this as 'RESOLVED CONFIGURATION CHANGED' and CCing - Alexey and Yusuke.