• 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
..
base Loading commit data...
compiler Loading commit data...
heap Loading commit data...
interpreter Loading commit data...
libplatform Loading commit data...
runtime Loading commit data...
DEPS Loading commit data...
atomic-utils-unittest.cc Loading commit data...
char-predicates-unittest.cc Loading commit data...
counters-unittest.cc Loading commit data...
run-all-unittests.cc Loading commit data...
test-utils.cc Loading commit data...
test-utils.h Loading commit data...
unittests.gyp Loading commit data...
unittests.isolate Loading commit data...
unittests.status Loading commit data...