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

Unified Diff: src/accessors.cc

Issue 1034393002: Fix speedup of typedarray-length loading in the ICs as well as Crankshaft (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 9 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 | « no previous file | src/ic/ic.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/accessors.cc
diff --git a/src/accessors.cc b/src/accessors.cc
index f774c6db467e900e3c382094ecacf1b6a8ca0ed8..fd770ea16be5bc1befe01daab72b26d041c0010b 100644
--- a/src/accessors.cc
+++ b/src/accessors.cc
@@ -79,6 +79,14 @@ bool Accessors::IsJSObjectFieldAccessor(Handle<Map> map, Handle<Name> name,
CheckForName(name, isolate->factory()->length_string(),
JSArray::kLengthOffset, object_offset);
case JS_TYPED_ARRAY_TYPE:
+ // %TypedArray%.prototype is non-configurable, and so are the following
+ // named properties on %TypedArray%.prototype, so we can directly inline
+ // the field-load for typed array maps that still use their
+ // %TypedArray%.prototype.
+ if (JSFunction::cast(map->GetConstructor())->prototype() !=
+ map->prototype()) {
+ return false;
+ }
return
CheckForName(name, isolate->factory()->length_string(),
JSTypedArray::kLengthOffset, object_offset) ||
« no previous file with comments | « no previous file | src/ic/ic.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698