• oth's avatar
    [Interpreter] Reduce temporary register usage in generated bytecode. · 339e0c80
    oth authored
    This change adds new flavors of Visit() methods for obtaining
    expression results:
    
    - VisitForAccumulatorValue() which places result in the accumulator.
    - VisitForRegisterValue() which places the result in a register.
    - VisitForEffect() which evaluates the expression and discards the result.
    
    The targets of these calls place the expression result with
    result_scope()->SetResultInRegister() or
    result_scope()->SetResultInAccumulator().
    
    By being smarter about result locations, there's less temporary
    register usage. However, we now have a hazard with assignments
    in binary expressions that didn't exist before. This change detects and
    DCHECK's when a hazard is detected. A follow on CL will address this.
    
    There are consequential changes to test-bytecode-generator.cc and
    this change also adds new bytecode macros A(x, n) and THIS(n) for
    register file entries for arguments and this.
    
    BUG=v8:4280
    LOG=NO
    
    Review URL: https://codereview.chromium.org/1392933002
    
    Cr-Commit-Position: refs/heads/master@{#31445}
    339e0c80
Name
Last commit
Last update
..
benchmarks Loading commit data...
cctest Loading commit data...
intl Loading commit data...
js-perf-test Loading commit data...
memory Loading commit data...
message Loading commit data...
mjsunit Loading commit data...
mozilla Loading commit data...
preparser Loading commit data...
promises-aplus Loading commit data...
simdjs Loading commit data...
test262 Loading commit data...
unittests Loading commit data...
webkit Loading commit data...
bot_default.gyp Loading commit data...
bot_default.isolate Loading commit data...
default.gyp Loading commit data...
default.isolate Loading commit data...
optimize_for_size.gyp Loading commit data...
optimize_for_size.isolate Loading commit data...