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

Unified Diff: src/ic/ic.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 | « src/accessors.cc ('k') | src/typedarray.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ic/ic.cc
diff --git a/src/ic/ic.cc b/src/ic/ic.cc
index 0ba80d35907c536934ba37beec838afaaf2ba0ca..e250a7f367a8fcbdf58ed0300f3be20451d1611b 100644
--- a/src/ic/ic.cc
+++ b/src/ic/ic.cc
@@ -1219,16 +1219,13 @@ Handle<Code> LoadIC::CompileHandler(LookupIterator* lookup,
case LookupIterator::ACCESSOR: {
// Use simple field loads for some well-known callback properties.
- if (receiver_is_holder) {
- DCHECK(receiver->IsJSObject());
- Handle<JSObject> js_receiver = Handle<JSObject>::cast(receiver);
- int object_offset;
- if (Accessors::IsJSObjectFieldAccessor(map, lookup->name(),
- &object_offset)) {
- FieldIndex index =
- FieldIndex::ForInObjectOffset(object_offset, js_receiver->map());
- return SimpleFieldLoad(index);
- }
+ // The method will only return true for absolute truths based on the
+ // receiver maps.
+ int object_offset;
+ if (Accessors::IsJSObjectFieldAccessor(map, lookup->name(),
+ &object_offset)) {
+ FieldIndex index = FieldIndex::ForInObjectOffset(object_offset, *map);
+ return SimpleFieldLoad(index);
}
Handle<Object> accessors = lookup->GetAccessors();
« no previous file with comments | « src/accessors.cc ('k') | src/typedarray.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698