Object* value = name_or_scope_info();
if (value->IsScopeInfo()) {
return ScopeInfo::cast(value)->HasSharedFunctionName();
}
return value != kNoSharedNameSentinel;
}
String* SharedFunctionInfo::Name() const {
if (!HasSharedName()) return GetReadOnlyRoots().empty_string();
Object* value = name_or_scope_info();
if (value->IsScopeInfo()) {
if (ScopeInfo::cast(value)->HasFunctionName()) {
return String::cast(ScopeInfo::cast(value)->FunctionName());
}
return GetReadOnlyRoots().empty_string();
}
return String::cast(value);
}
bool SharedFunctionInfo::HasSharedName() const {
SharedFunctionInfo::Name() method calls the
SharedFunctionInfo::HasSharedName().
But because the same logic already exists in Name() methods,
"if (!HasSharedName()) return GetReadOnlyRoots().empty_string();" line
seems unnecessary.
how do you think?
best regards.
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups
"v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.