• jgruber's avatar
    [regexp] Use consistent map checks for fast paths · bac992a1
    jgruber authored
    These map checks were implemented for TF code already. This CL makes
    sure that parts implemented in C++ follow the same logic, which is:
    
    An object is an unmodified regexp if:
    1) it's a receiver,
    2) its map is the initial regexp map,
    3) its prototype is a receiver,
    4) and its prototype's map is the initial prototype's initial map.
    
    We can now be smarter in @@replace and @@split since checking maps
    (unlike the previous check of RegExp.prototype.exec) is not observable,
    so we can perform fast-path checks at a time of our choosing.
    
    BUG=v8:5339,v8:5434,v8:5123
    
    Review-Url: https://chromiumcodereview.appspot.com/2434983002
    Cr-Commit-Position: refs/heads/master@{#40495}
    bac992a1
test262.status 38.1 KB