• Benedikt Meurer's avatar
    [objects] Free one bit in the SharedFunctionInfo::flags. · 591408cb
    Benedikt Meurer authored
    We'll need one bit in the SharedFunctionInfo::flags to record whether
    it's safe to skip arguments adaptor frames (for v8:8895), so this
    just removes the SharedFunctionInfo::IsDerivedConstructorBit which is
    redundant, since the same information is already available in the
    SharedFunctionInfo::FunctionKindBits, and most places in the code
    use that already, with the exception of the JSConstructStubGeneric
    builtin.
    
    This changes the JSConstructStubGeneric builtin to just check the
    function kind instead of testing the explicit bit, which also makes
    this more consistent. It seems like there's not much overhead to
    that, doing an additional bitmasking plus two comparisons instead
    of one. This shouldn't really matter since invocation and execution
    of the constructors is going to dominate and optimized code inlines
    all of this anyways. If this turns out to affect performance, we
    can still look into encoding the FunctionKindBits more cleverly.
    
    Drive-by-fix: Move the FunctionKindBits first in the flags to avoid
    the shift when accessing the function kind. This seems logic, since
    for the actual boolean bit fields it doesn't matter where they are
    in the flags, whereas for the function kind this saves one shift.
    
    Bug: v8:8834, v8:8895
    Change-Id: I184a8f5cc5c140bdc272cf9a5ad546093c457306
    Reviewed-on: https://chromium-review.googlesource.com/c/1482915Reviewed-by: 's avatarToon Verwaest <verwaest@chromium.org>
    Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#59821}
    591408cb
macro-assembler-ia32.cc 65.5 KB