• Benedikt Meurer's avatar
    [turbofan] Introduce a dedicated StringLength operator. · 500d7b93
    Benedikt Meurer authored
    Strings are immutable in JavaScript land (contrast with the runtime,
    where we can truncate strings that haven't escaped to JavaScript yet),
    so the length of a String is immutable. Thus loading the length of a
    String is a pure operation and should be expressed as such (i.e. doesn't
    depend on control or effect). The StringLength operator does exactly
    this and is hooked up to the effect chain in the EffectControlLinearizer.
    
    This will eventually allow us to simplify the optimization of string
    concatention and other operations that are a bit cumbersome in TurboFan
    currently, and it will also allow us to optimize string operations
    across effectful operations, for example combining multiple invocations
    to String#slice with the same inputs.
    
    Bug: v8:5269, v8:6936, v8:7109, v8:7137
    Change-Id: Iffcccbb0c7fc4cfe1281c10e7af24b40eba4c987
    Reviewed-on: https://chromium-review.googlesource.com/799690Reviewed-by: 's avatarYang Guo <yangguo@chromium.org>
    Reviewed-by: 's avatarBenedikt Meurer <bmeurer@chromium.org>
    Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#49731}
    500d7b93
Name
Last commit
Last update
benchmarks Loading commit data...
build_overrides Loading commit data...
docs Loading commit data...
gni Loading commit data...
gypfiles 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 Loading commit data...
tools Loading commit data...
.clang-format Loading commit data...
.editorconfig Loading commit data...
.git-blame-ignore-revs Loading commit data...
.gitignore Loading commit data...
.gn Loading commit data...
.vpython Loading commit data...
.ycm_extra_conf.py Loading commit data...
AUTHORS Loading commit data...
BUILD.gn Loading commit data...
CODE_OF_CONDUCT.md Loading commit data...
ChangeLog Loading commit data...
DEPS Loading commit data...
LICENSE Loading commit data...
LICENSE.fdlibm 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...
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...