• Peter Marshall's avatar
    [asm] Don't read the construct_stub field in PushArgsThenConstruct · b8695906
    Peter Marshall authored
    For mode = kArrayFunction, we know that we need to call the array
    constructor stub, so we don't need to read it out from the construct_stub
    field. We also don't need to set it in the construct_stub field anymore,
    so just use the builtins constructor stub like other builtins.
    
    Also cleans up PushArgsThenCall by adding a dcheck that we are never in
    mode = kArrayFunction, so we don't even try to generate code for this
    case, but fail earlier instead.
    
    We don't need to load the array function in ArrayConstructor because this
    is set up for us by the builtins construct stub. We do have to check if
    new_target is actually set before overwriting it with target, as we are
    handling both call and construct cases in ArrayConstructor now.
    
    Bug: v8:7503
    Change-Id: I3622bf6127eebed8b55c9c199fa938a8e03b8baa
    Reviewed-on: https://chromium-review.googlesource.com/973364
    Commit-Queue: Peter Marshall <petermarshall@chromium.org>
    Reviewed-by: 's avatarBenedikt Meurer <bmeurer@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#52152}
    b8695906
builtins-ia32.cc 98.5 KB