Commit 514033ab authored by Georg Neis's avatar Georg Neis Committed by Commit Bot

[turbofan] Drop unnecessary InternalizeName call.

Bug: v8:7790
Change-Id: Iad9a3087ea7915bade6c70c56f6d8f6f640f26cb
Reviewed-on: https://chromium-review.googlesource.com/c/1408889Reviewed-by: 's avatarJaroslav Sevcik <jarin@chromium.org>
Reviewed-by: 's avatarMaya Lekova <mslekova@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58773}
parent 5e87da67
...@@ -341,15 +341,14 @@ bool AccessInfoFactory::ComputeElementAccessInfos( ...@@ -341,15 +341,14 @@ bool AccessInfoFactory::ComputeElementAccessInfos(
bool AccessInfoFactory::ComputePropertyAccessInfo( bool AccessInfoFactory::ComputePropertyAccessInfo(
Handle<Map> map, Handle<Name> name, AccessMode access_mode, Handle<Map> map, Handle<Name> name, AccessMode access_mode,
PropertyAccessInfo* access_info) { PropertyAccessInfo* access_info) {
CHECK(name->IsUniqueName());
// Check if it is safe to inline property access for the {map}. // Check if it is safe to inline property access for the {map}.
if (!CanInlinePropertyAccess(map)) return false; if (!CanInlinePropertyAccess(map)) return false;
// Compute the receiver type. // Compute the receiver type.
Handle<Map> receiver_map = map; Handle<Map> receiver_map = map;
// Property lookups require the name to be internalized.
name = isolate()->factory()->InternalizeName(name);
// We support fast inline cases for certain JSObject getters. // We support fast inline cases for certain JSObject getters.
if (access_mode == AccessMode::kLoad && if (access_mode == AccessMode::kLoad &&
LookupSpecialFieldAccessor(map, name, access_info)) { LookupSpecialFieldAccessor(map, name, access_info)) {
......
...@@ -1814,7 +1814,7 @@ Reduction JSNativeContextSpecialization::ReduceKeyedAccess( ...@@ -1814,7 +1814,7 @@ Reduction JSNativeContextSpecialization::ReduceKeyedAccess(
// Use the constant array index. // Use the constant array index.
index = jsgraph()->Constant(static_cast<double>(array_index)); index = jsgraph()->Constant(static_cast<double>(array_index));
} else { } else {
name = factory()->InternalizeName(name); name = factory()->InternalizeName(name); // TODO(neis): Do up-front.
return ReduceNamedAccess(node, value, receiver_maps, name, access_mode); return ReduceNamedAccess(node, value, receiver_maps, name, access_mode);
} }
} }
...@@ -2407,8 +2407,8 @@ Reduction JSNativeContextSpecialization::ReduceJSStoreDataPropertyInLiteral( ...@@ -2407,8 +2407,8 @@ Reduction JSNativeContextSpecialization::ReduceJSStoreDataPropertyInLiteral(
if (!Map::TryUpdate(isolate(), receiver_map).ToHandle(&receiver_map)) if (!Map::TryUpdate(isolate(), receiver_map).ToHandle(&receiver_map))
return NoChange(); return NoChange();
Handle<Name> cached_name = Handle<Name> cached_name(
handle(Name::cast(nexus.GetFeedbackExtra()->GetHeapObjectAssumeStrong()), Name::cast(nexus.GetFeedbackExtra()->GetHeapObjectAssumeStrong()),
isolate()); isolate());
PropertyAccessInfo access_info; PropertyAccessInfo access_info;
...@@ -3158,7 +3158,7 @@ Node* JSNativeContextSpecialization::BuildCheckEqualsName(Handle<Name> name, ...@@ -3158,7 +3158,7 @@ Node* JSNativeContextSpecialization::BuildCheckEqualsName(Handle<Name> name,
bool JSNativeContextSpecialization::CanTreatHoleAsUndefined( bool JSNativeContextSpecialization::CanTreatHoleAsUndefined(
MapHandles const& receiver_maps) { MapHandles const& receiver_maps) {
// Check if all {receiver_maps} either have one of the initial Array.prototype // Check if all {receiver_maps} have one of the initial Array.prototype
// or Object.prototype objects as their prototype (in any of the current // or Object.prototype objects as their prototype (in any of the current
// native contexts, as the global Array protector works isolate-wide). // native contexts, as the global Array protector works isolate-wide).
for (Handle<Map> map : receiver_maps) { for (Handle<Map> map : receiver_maps) {
......
...@@ -43,7 +43,10 @@ bool FeedbackVectorSpec::HasTypeProfileSlot() const { ...@@ -43,7 +43,10 @@ bool FeedbackVectorSpec::HasTypeProfileSlot() const {
static bool IsPropertyNameFeedback(MaybeObject feedback) { static bool IsPropertyNameFeedback(MaybeObject feedback) {
HeapObject heap_object; HeapObject heap_object;
if (!feedback->GetHeapObjectIfStrong(&heap_object)) return false; if (!feedback->GetHeapObjectIfStrong(&heap_object)) return false;
if (heap_object->IsString()) return true; if (heap_object->IsString()) {
DCHECK(heap_object->IsInternalizedString());
return true;
}
if (!heap_object->IsSymbol()) return false; if (!heap_object->IsSymbol()) return false;
Symbol symbol = Symbol::cast(heap_object); Symbol symbol = Symbol::cast(heap_object);
ReadOnlyRoots roots = symbol->GetReadOnlyRoots(); ReadOnlyRoots roots = symbol->GetReadOnlyRoots();
......
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