[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: Sathya Gunasekaran <gsathya@chromium.org> Cr-Commit-Position: refs/heads/master@{#63865}
This commit is contained in:
parent
761a2e7111
commit
b946521f18
@ -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);
|
||||
|
||||
|
12
test/mjsunit/regress/regress-1004912.js
Normal file
12
test/mjsunit/regress/regress-1004912.js
Normal file
@ -0,0 +1,12 @@
|
||||
// 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];
|
Loading…
Reference in New Issue
Block a user