• 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
..
api Loading commit data...
asmjs Loading commit data...
base Loading commit data...
compiler Loading commit data...
compiler-dispatcher Loading commit data...
heap Loading commit data...
interpreter Loading commit data...
libplatform Loading commit data...
parser Loading commit data...
wasm Loading commit data...
zone Loading commit data...
BUILD.gn Loading commit data...
DEPS Loading commit data...
bigint-unittest.cc Loading commit data...
cancelable-tasks-unittest.cc Loading commit data...
char-predicates-unittest.cc Loading commit data...
code-stub-assembler-unittest.cc Loading commit data...
code-stub-assembler-unittest.h Loading commit data...
counters-unittest.cc Loading commit data...
detachable-vector-unittest.cc Loading commit data...
eh-frame-iterator-unittest.cc Loading commit data...
eh-frame-writer-unittest.cc Loading commit data...
locked-queue-unittest.cc Loading commit data...
object-unittest.cc Loading commit data...
register-configuration-unittest.cc Loading commit data...
run-all-unittests.cc Loading commit data...
source-position-table-unittest.cc Loading commit data...
test-helpers.cc Loading commit data...
test-helpers.h Loading commit data...
test-utils.cc Loading commit data...
test-utils.h Loading commit data...
unicode-unittest.cc Loading commit data...
unittests.gyp Loading commit data...
unittests.isolate Loading commit data...
unittests.status Loading commit data...
utils-unittest.cc Loading commit data...
value-serializer-unittest.cc Loading commit data...