• 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...
build Loading commit data...
docs Loading commit data...
include Loading commit data...
infra Loading commit data...
samples Loading commit data...
src Loading commit data...
test Loading commit data...
testing Loading commit data...
third_party/binutils Loading commit data...
tools Loading commit data...
.clang-format Loading commit data...
.gitignore Loading commit data...
.ycm_extra_conf.py Loading commit data...
AUTHORS Loading commit data...
BUILD.gn Loading commit data...
ChangeLog Loading commit data...
DEPS Loading commit data...
LICENSE Loading commit data...
LICENSE.strongtalk Loading commit data...
LICENSE.v8 Loading commit data...
LICENSE.valgrind Loading commit data...
Makefile Loading commit data...
Makefile.android Loading commit data...
Makefile.nacl Loading commit data...
OWNERS Loading commit data...
PRESUBMIT.py Loading commit data...
README.md Loading commit data...
WATCHLISTS Loading commit data...
codereview.settings Loading commit data...
snapshot_toolchain.gni Loading commit data...