Commit 3dbc1a8e authored by Georg Neis's avatar Georg Neis Committed by Commit Bot

[runtime] Avoid a gcmole warning in AddToDictionaryTemplate

... by making explicit that the value is a Smi.

Bug: v8:9989
Change-Id: I9f65030cf665e16c2fb22f5f77e25daf3cfb1cf1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1924260Reviewed-by: 's avatarMaya Lekova <mslekova@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#65081}
parent 960badd1
......@@ -124,7 +124,7 @@ template <typename Dictionary, typename Key>
void AddToDictionaryTemplate(Isolate* isolate, Handle<Dictionary> dictionary,
Key key, int key_index,
ClassBoilerplate::ValueKind value_kind,
Object value) {
Smi value) {
InternalIndex entry = dictionary->FindEntry(isolate, key);
if (entry.is_not_found()) {
......@@ -392,14 +392,14 @@ class ObjectDescriptor {
void ClassBoilerplate::AddToPropertiesTemplate(
Isolate* isolate, Handle<NameDictionary> dictionary, Handle<Name> name,
int key_index, ClassBoilerplate::ValueKind value_kind, Object value) {
int key_index, ClassBoilerplate::ValueKind value_kind, Smi value) {
AddToDictionaryTemplate(isolate, dictionary, name, key_index, value_kind,
value);
}
void ClassBoilerplate::AddToElementsTemplate(
Isolate* isolate, Handle<NumberDictionary> dictionary, uint32_t key,
int key_index, ClassBoilerplate::ValueKind value_kind, Object value) {
int key_index, ClassBoilerplate::ValueKind value_kind, Smi value) {
AddToDictionaryTemplate(isolate, dictionary, key, key_index, value_kind,
value);
}
......
......@@ -120,12 +120,12 @@ class ClassBoilerplate : public FixedArray {
static void AddToPropertiesTemplate(Isolate* isolate,
Handle<NameDictionary> dictionary,
Handle<Name> name, int key_index,
ValueKind value_kind, Object value);
ValueKind value_kind, Smi value);
static void AddToElementsTemplate(Isolate* isolate,
Handle<NumberDictionary> dictionary,
uint32_t key, int key_index,
ValueKind value_kind, Object value);
ValueKind value_kind, Smi value);
static Handle<ClassBoilerplate> BuildClassBoilerplate(Isolate* isolate,
ClassLiteral* expr);
......
......@@ -438,7 +438,7 @@ bool AddDescriptorsByTemplate(
ValueKind value_kind = ComputedEntryFlags::ValueKindBits::decode(flags);
int key_index = ComputedEntryFlags::KeyIndexBits::decode(flags);
Object value = Smi::FromInt(key_index + 1); // Value follows name.
Smi value = Smi::FromInt(key_index + 1); // Value follows name.
Handle<Object> key = args.at<Object>(key_index);
DCHECK(key->IsName());
......
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