• mbrandy's avatar
    PPC: [es6] Introduce spec compliant IsConstructor. · 623e8021
    mbrandy authored
    Port 8fe3ac07
    
    Original commit message:
        There was already a bit on the Map named "function with prototype",
        which basically meant that the Map was a map for a JSFunction that could
        be used as a constructor. Now this CL generalizes that bit to
        IsConstructor, which says that whatever (Heap)Object you are looking at
        can be used as a constructor (i.e. the bit is also set for bound
        functions that can be used as constructors and proxies that have a
        [[Construct]] internal method).
    
        This way we have a single chokepoint for IsConstructor checking, which
        allows us to get rid of the various ways in which we tried to guess
        whether something could be used as a constructor or not.
    
        Drive-by-fix: Renamed IsConstructor on FunctionKind to
        IsClassConstructor to resolve the weird name clash, and the
        IsClassConstructor name also matches the spec.
    
    R=bmeurer@chromium.org, joransiu@ca.ibm.com, jyan@ca.ibm.com, michael_dawson@ca.ibm.com, dstence@us.ibm.com
    BUG=v8:4413, v8:4430
    LOG=n
    
    Review URL: https://codereview.chromium.org/1382673002
    
    Cr-Commit-Position: refs/heads/master@{#31027}
    623e8021
builtins-ppc.cc 64.7 KB