Index: src/ic/handler-configuration.h |
diff --git a/src/ic/handler-configuration.h b/src/ic/handler-configuration.h |
index 1cb9219f7fb6d0de7cdceef7441cc2d7546f484b..37ed62302775dc539999d440a1a8466063a40fce 100644 |
--- a/src/ic/handler-configuration.h |
+++ b/src/ic/handler-configuration.h |
@@ -19,13 +19,19 @@ class LoadHandler { |
enum Kind { kForElements, kForFields, kForConstants }; |
class KindBits : public BitField<Kind, 0, 2> {}; |
+ // Defines whether negative lookup check should be done on receiver object. |
+ // Applicable to kForFields and kForConstants kinds only when loading value |
+ // from prototype chain. Ignored when loading from holder. |
+ class DoNegativeLookupOnReceiverBits |
+ : public BitField<bool, KindBits::kNext, 1> {}; |
+ |
// |
// Encoding when KindBits contains kForConstants. |
// |
// +2 here is because each descriptor entry occupies 3 slots in array. |
class DescriptorValueIndexBits |
- : public BitField<unsigned, KindBits::kNext, |
+ : public BitField<unsigned, DoNegativeLookupOnReceiverBits::kNext, |
kDescriptorIndexBitCount + 2> {}; |
// Make sure we don't overflow the smi. |
STATIC_ASSERT(DescriptorValueIndexBits::kNext <= kSmiValueSize); |
@@ -33,7 +39,8 @@ class LoadHandler { |
// |
// Encoding when KindBits contains kForFields. |
// |
- class IsInobjectBits : public BitField<bool, KindBits::kNext, 1> {}; |
+ class IsInobjectBits |
+ : public BitField<bool, DoNegativeLookupOnReceiverBits::kNext, 1> {}; |
class IsDoubleBits : public BitField<bool, IsInobjectBits::kNext, 1> {}; |
// +1 here is to cover all possible JSObject header sizes. |
class FieldOffsetBits |
@@ -59,6 +66,11 @@ class LoadHandler { |
// Creates a Smi-handler for loading a constant from fast object. |
static inline Handle<Object> LoadConstant(Isolate* isolate, int descriptor); |
+ // Sets DoNegativeLookupOnReceiverBits in given Smi-handler. The receiver |
+ // check is a part of a prototype chain check. |
+ static inline Handle<Object> EnableNegativeLookupOnReceiver( |
+ Isolate* isolate, Handle<Object> smi_handler); |
+ |
// Creates a Smi-handler for loading an element. |
static inline Handle<Object> LoadElement(Isolate* isolate, |
ElementsKind elements_kind, |