Ignore:
Timestamp:
Mar 22, 2018, 8:58:59 AM (7 years ago)
Author:
Yusuke Suzuki
Message:

[JSC] List up all candidates in DFGCapabilities and FTLCapabilities
https://bugs.webkit.org/show_bug.cgi?id=183897

Reviewed by Mark Lam.

We should not use default: clause here since it accidentally catches
the opcode and DFG nodes which should be optimized. For example,
op_super_sampler_begin and op_super_sampler_end are not listed while
they have DFG and FTL backend.

This patch lists up all candiates in DFGCapabilities and FTLCapabilities.
And we also clean up unnecessary checks in FTLCapabilities. Since we
already handles all the possible array types for these nodes (which can
be checked in DFG's code), we do not need to check array types.

We also fix FTLLowerDFGToB3' PutByVal code to use modeForPut.

  • dfg/DFGCapabilities.cpp:

(JSC::DFG::capabilityLevel):

  • ftl/FTLCapabilities.cpp:

(JSC::FTL::canCompile):

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::compilePutByVal):

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/dfg/DFGCapabilities.cpp

    r224280 r229854  
    266266    case op_new_regexp:
    267267    case op_unreachable:
     268    case op_super_sampler_begin:
     269    case op_super_sampler_end:
    268270        return CanCompileAndInline;
    269271
     
    272274        return CanCompile;
    273275
    274     default:
     276    case op_yield:
     277    case llint_program_prologue:
     278    case llint_eval_prologue:
     279    case llint_module_program_prologue:
     280    case llint_function_for_call_prologue:
     281    case llint_function_for_construct_prologue:
     282    case llint_function_for_call_arity_check:
     283    case llint_function_for_construct_arity_check:
     284    case llint_generic_return_point:
     285    case llint_throw_from_slow_path_trampoline:
     286    case llint_throw_during_call_trampoline:
     287    case llint_native_call_trampoline:
     288    case llint_native_construct_trampoline:
     289    case llint_internal_function_call_trampoline:
     290    case llint_internal_function_construct_trampoline:
     291    case handleUncaughtException:
    275292        return CannotCompile;
    276293    }
     294    return CannotCompile;
    277295}
    278296
Note: See TracChangeset for help on using the changeset viewer.