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

Unified Diff: src/field-index-inl.h

Issue 2412043003: [ic] Support non-code handlers in megamorphic stub cache. (Closed)
Patch Set: Addressing comments Created 4 years, 2 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/field-index.h ('k') | src/ic/ic.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/field-index-inl.h
diff --git a/src/field-index-inl.h b/src/field-index-inl.h
index c2f25bb7f047f0edf236424c7d34a8d06214a337..15e458cbf1e0ab0e9e9a47174966e619792a862f 100644
--- a/src/field-index-inl.h
+++ b/src/field-index-inl.h
@@ -85,29 +85,6 @@ inline int FieldIndex::GetLoadByFieldIndex() const {
return is_double() ? (result | 1) : result;
}
-// Takes an offset as computed by GetLoadByFieldOffset and reconstructs a
-// FieldIndex object from it.
-// static
-inline FieldIndex FieldIndex::ForLoadByFieldOffset(Map* map, int offset) {
- DCHECK(LoadHandlerTypeBit::decode(offset) == kLoadICHandlerForProperties);
- bool is_inobject = FieldOffsetIsInobject::decode(offset);
- bool is_double = FieldOffsetIsDouble::decode(offset);
- int field_index = FieldOffsetOffset::decode(offset) >> kPointerSizeLog2;
- int first_inobject_offset = 0;
- if (is_inobject) {
- first_inobject_offset =
- map->IsJSObjectMap() ? map->GetInObjectPropertyOffset(0) : 0;
- } else {
- first_inobject_offset = FixedArray::kHeaderSize;
- }
- int inobject_properties =
- map->IsJSObjectMap() ? map->GetInObjectProperties() : 0;
- FieldIndex result(is_inobject, field_index, is_double, inobject_properties,
- first_inobject_offset);
- DCHECK(result.GetLoadByFieldOffset() == offset);
- return result;
-}
-
// Returns the offset format consumed by TurboFan stubs:
// (offset << 3) | (is_double << 2) | (is_inobject << 1) | is_property
// Where |offset| is relative to object start or FixedArray start, respectively.
« no previous file with comments | « src/field-index.h ('k') | src/ic/ic.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698