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

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

Issue 2227703003: Reland "[KeyedLoadIC] Support Smi "handlers" for element loads" (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: add DCHECK Created 4 years, 4 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/handler-compiler.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 f79394824fbbc9187ce68d24560b89e83d9ebec3..c2f25bb7f047f0edf236424c7d34a8d06214a337 100644
--- a/src/field-index-inl.h
+++ b/src/field-index-inl.h
@@ -6,6 +6,7 @@
#define V8_FIELD_INDEX_INL_H_
#include "src/field-index.h"
+#include "src/ic/handler-configuration.h"
namespace v8 {
namespace internal {
@@ -88,7 +89,7 @@ inline int FieldIndex::GetLoadByFieldIndex() const {
// FieldIndex object from it.
// static
inline FieldIndex FieldIndex::ForLoadByFieldOffset(Map* map, int offset) {
- DCHECK(offset & 1); // Property marker (as opposed to element).
+ DCHECK(LoadHandlerTypeBit::decode(offset) == kLoadICHandlerForProperties);
bool is_inobject = FieldOffsetIsInobject::decode(offset);
bool is_double = FieldOffsetIsDouble::decode(offset);
int field_index = FieldOffsetOffset::decode(offset) >> kPointerSizeLog2;
@@ -114,7 +115,7 @@ inline int FieldIndex::GetLoadByFieldOffset() const {
return FieldOffsetIsInobject::encode(is_inobject()) |
FieldOffsetIsDouble::encode(is_double()) |
FieldOffsetOffset::encode(index() << kPointerSizeLog2) |
- 1; // Property marker (as opposed to element).
+ LoadHandlerTypeBit::encode(kLoadICHandlerForProperties);
}
inline FieldIndex FieldIndex::ForDescriptor(Map* map, int descriptor_index) {
« no previous file with comments | « src/field-index.h ('k') | src/ic/handler-compiler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698