Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(246)

Unified Diff: src/hydrogen.cc

Issue 939623004: Merge LookupResult into PropertyAccessInfo (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/hydrogen.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/hydrogen.cc
diff --git a/src/hydrogen.cc b/src/hydrogen.cc
index 50e3b2124df60ddc29331f0d9d4feb8f753c6a54..f666b8a984594ad5de0796428c65a1f45eaf7a7a 100644
--- a/src/hydrogen.cc
+++ b/src/hydrogen.cc
@@ -5970,7 +5970,7 @@ bool HOptimizedGraphBuilder::PropertyAccessInfo::IsCompatible(
bool HOptimizedGraphBuilder::PropertyAccessInfo::LookupDescriptor() {
if (!map_->IsJSObjectMap()) return true;
- lookup_.LookupDescriptor(*map_, *name_);
+ LookupDescriptor(*map_, *name_);
return LoadResult(map_);
}
@@ -6059,13 +6059,13 @@ bool HOptimizedGraphBuilder::PropertyAccessInfo::LookupInPrototypes() {
}
map = Handle<Map>(holder_->map());
if (!CanInlinePropertyAccess(map)) {
- lookup_.NotFound();
+ NotFound();
return false;
}
- lookup_.LookupDescriptor(*map, *name_);
+ LookupDescriptor(*map, *name_);
if (IsFound()) return LoadResult(map);
}
- lookup_.NotFound();
+ NotFound();
return true;
}
@@ -6083,8 +6083,8 @@ bool HOptimizedGraphBuilder::PropertyAccessInfo::CanAccessMonomorphic() {
if (IsLoad()) return true;
if (IsAccessorConstant()) return true;
- lookup_.LookupTransition(*map_, *name_, NONE);
- if (lookup_.IsTransitionToData() && map_->unused_property_fields() > 0) {
+ LookupTransition(*map_, *name_, NONE);
+ if (IsTransitionToData() && map_->unused_property_fields() > 0) {
// Construct the object field access.
int descriptor = transition()->LastAdded();
int index =
@@ -8174,11 +8174,12 @@ bool HOptimizedGraphBuilder::TryInlineBuiltinFunctionCall(Call* expr) {
bool HOptimizedGraphBuilder::IsReadOnlyLengthDescriptor(
Handle<Map> jsarray_map) {
DCHECK(!jsarray_map->is_dictionary_map());
- LookupResult lookup;
Isolate* isolate = jsarray_map->GetIsolate();
Handle<Name> length_string = isolate->factory()->length_string();
- lookup.LookupDescriptor(*jsarray_map, *length_string);
- return lookup.IsReadOnly();
+ DescriptorArray* descriptors = jsarray_map->instance_descriptors();
+ int number = descriptors->SearchWithCache(*length_string, *jsarray_map);
+ DCHECK_NE(DescriptorArray::kNotFound, number);
+ return descriptors->GetDetails(number).IsReadOnly();
}
« no previous file with comments | « src/hydrogen.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698