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

Unified Diff: src/ic/handler-configuration.h

Issue 2446983002: [ic] Support negative lookup on receiver in data handlers. (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/code-stub-assembler.cc ('k') | src/ic/handler-configuration-inl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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,
« no previous file with comments | « src/code-stub-assembler.cc ('k') | src/ic/handler-configuration-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698