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

Unified Diff: src/hydrogen.cc

Issue 24360019: Speed up ArrayBuffer/typed array/DataView properties. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: After self-review Created 7 years, 3 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') | src/hydrogen-instructions.h » ('j') | src/ic.cc » ('J')
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 9e7c237c000966a9cff147a224d34f1456368317..6327cd41cc7650fcfe2f7de44337b56d9200c10a 100644
--- a/src/hydrogen.cc
+++ b/src/hydrogen.cc
@@ -4631,7 +4631,7 @@ bool HOptimizedGraphBuilder::PropertyAccessInfo::LookupInPrototypes() {
bool HOptimizedGraphBuilder::PropertyAccessInfo::CanLoadMonomorphic() {
if (!CanInlinePropertyAccess(*map_)) return IsStringLength();
- if (IsArrayLength()) return true;
+ if (IsJSObjectFieldAccessor()) return true;
if (!LookupDescriptor()) return false;
if (lookup_.IsFound()) return true;
return LookupInPrototypes();
@@ -4663,9 +4663,10 @@ bool HOptimizedGraphBuilder::PropertyAccessInfo::CanLoadAsMonomorphic(
return true;
}
- if (IsTypedArrayLength()) {
+ if (IsJSObjectFieldAccessor()) {
+ InstanceType instance_type = map_->instance_type();
for (int i = 1; i < types->length(); ++i) {
- if (types->at(i)->instance_type() != JS_TYPED_ARRAY_TYPE) return false;
+ if (types->at(i)->instance_type() != instance_type) return false;
}
return true;
}
@@ -4686,20 +4687,10 @@ HInstruction* HOptimizedGraphBuilder::BuildLoadMonomorphic(
BailoutId ast_id,
BailoutId return_id,
bool can_inline_accessor) {
- if (info->IsStringLength()) {
- return New<HLoadNamedField>(
- checked_object, HObjectAccess::ForStringLength());
- }
-
- if (info->IsArrayLength()) {
- return New<HLoadNamedField>(
- checked_object, HObjectAccess::ForArrayLength(
- info->map()->elements_kind()));
- }
- if (info->IsTypedArrayLength()) {
- return New<HLoadNamedField>(
- checked_object, HObjectAccess::ForTypedArrayLength());
+ HObjectAccess access = HObjectAccess::ForMap(); // bogus default
+ if (info->GetJSObjectFieldAccess(&access)) {
+ return New<HLoadNamedField>(checked_object, access);
}
HValue* checked_holder = checked_object;
@@ -5402,16 +5393,6 @@ HInstruction* HOptimizedGraphBuilder::BuildLoadNamedGeneric(
}
-HInstruction* HOptimizedGraphBuilder::BuildCallGetter(
- HValue* object,
- Handle<Map> map,
- Handle<JSFunction> getter,
- Handle<JSObject> holder) {
- AddCheckConstantFunction(holder, object, map);
- Add<HPushArgument>(object);
- return new(zone()) HCallConstantFunction(getter, 1);
-}
-
HInstruction* HOptimizedGraphBuilder::BuildLoadKeyedGeneric(HValue* object,
HValue* key) {
« no previous file with comments | « src/hydrogen.h ('k') | src/hydrogen-instructions.h » ('j') | src/ic.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698