Commit 024414d4 authored by Leszek Swirski's avatar Leszek Swirski Committed by Commit Bot

[cleanup] Make SFI::instance_class_name a String

Make the accessors of SharedFunctionInfo instance_class_name take and
return String rather than Object, since it's always a String anyway.

Change-Id: Ic5dacccf3835550e3533356fe7ded37ea107d720
Reviewed-on: https://chromium-review.googlesource.com/774882Reviewed-by: 's avatarRoss McIlroy <rmcilroy@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49421}
parent 4a509b3d
......@@ -1337,7 +1337,9 @@ Handle<SharedFunctionInfo> FunctionTemplateInfo::GetOrCreateSharedFunctionInfo(
}
result->set_length(info->length());
if (class_name->IsString()) result->set_instance_class_name(*class_name);
if (class_name->IsString()) {
result->set_instance_class_name(String::cast(*class_name));
}
result->set_api_func_data(*info);
result->DontAdaptArguments();
DCHECK(result->IsApiFunction());
......
......@@ -27,7 +27,7 @@ ACCESSORS(SharedFunctionInfo, raw_name, Object, kNameOffset)
ACCESSORS(SharedFunctionInfo, construct_stub, Code, kConstructStubOffset)
ACCESSORS(SharedFunctionInfo, feedback_metadata, FeedbackMetadata,
kFeedbackMetadataOffset)
ACCESSORS(SharedFunctionInfo, instance_class_name, Object,
ACCESSORS(SharedFunctionInfo, instance_class_name, String,
kInstanceClassNameOffset)
ACCESSORS(SharedFunctionInfo, function_data, Object, kFunctionDataOffset)
ACCESSORS(SharedFunctionInfo, script, Object, kScriptOffset)
......
......@@ -137,7 +137,7 @@ class SharedFunctionInfo : public HeapObject {
#endif
// [instance class name]: class name for instances.
DECL_ACCESSORS(instance_class_name, Object)
DECL_ACCESSORS(instance_class_name, String)
// [function data]: This field holds some additional data for function.
// Currently it has one of:
......
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