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...
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Filip Pizlo
Depends on:
Reported: 2014-06-19 14:43 PDT by Filip Pizlo
Modified: 2024-02-25 04:59 PST (History)
10 users (show)

See Also:

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:


    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.