Commit b946521f authored by Ross McIlroy's avatar Ross McIlroy Committed by Commit Bot

[CSA][cleanup] Use Name instead of String type for var_name in KeyedLoadICGeneric.

BUG=v8:6949,v8:9396,chromium:1004912

Change-Id: Ifa8207283aadad258281bffda6d49da574402a24
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1809370
Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
Auto-Submit: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: 's avatarSathya Gunasekaran  <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#63865}
parent 761a2e71
......@@ -3007,7 +3007,7 @@ void AccessorAssembler::KeyedLoadICGeneric(const LoadICParameters* p) {
}
{
TVARIABLE(String, var_name);
TVARIABLE(Name, var_name);
BIND(&if_other);
{
......@@ -3019,6 +3019,7 @@ void AccessorAssembler::KeyedLoadICGeneric(const LoadICParameters* p) {
BIND(&if_notunique);
{
// Try to make it unique by internalizing.
var_name = CAST(p->name());
Goto(&maybe_internalize_on_the_fly);
}
......@@ -3031,7 +3032,7 @@ void AccessorAssembler::KeyedLoadICGeneric(const LoadICParameters* p) {
// invariant doesn't hold with named property interceptors (at this
// point), so we take the {if_runtime} path instead.
Label if_in_string_table(this);
TryInternalizeString(var_name.value(), &if_index, &var_index,
TryInternalizeString(CAST(var_name.value()), &if_index, &var_index,
&if_in_string_table, &var_unique, &if_runtime,
&if_runtime);
......
// Copyright 2019 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
var key = {
toString() {
return Symbol();
}
};
var obj = {};
obj[key];
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment