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

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

Issue 2482913002: [ic] Resurrect access checks for primitive and global proxy receivers. (Closed)
Patch Set: Addressing comments Created 4 years, 1 month 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/ic/handler-compiler.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 756cb312acef97ac506586550890778d25fdcc11..7ffe192c1af673486da517324f7f888eb19d3a03 100644
--- a/src/ic/handler-configuration.h
+++ b/src/ic/handler-configuration.h
@@ -19,11 +19,17 @@ class LoadHandler {
enum Kind { kForElements, kForFields, kForConstants, kForNonExistent };
class KindBits : public BitField<Kind, 0, 2> {};
+ // Defines whether access rights check should be done on receiver object.
+ // Applicable to kForFields, kForConstants and kForNonExistent kinds only when
+ // loading value from prototype chain. Ignored when loading from holder.
+ class DoAccessCheckOnReceiverBits
+ : public BitField<bool, KindBits::kNext, 1> {};
+
// Defines whether negative lookup check should be done on receiver object.
// Applicable to kForFields, kForConstants and kForNonExistent kinds only when
// loading value from prototype chain. Ignored when loading from holder.
class DoNegativeLookupOnReceiverBits
- : public BitField<bool, KindBits::kNext, 1> {};
+ : public BitField<bool, DoAccessCheckOnReceiverBits::kNext, 1> {};
//
// Encoding when KindBits contains kForConstants.
@@ -81,6 +87,11 @@ class LoadHandler {
// Creates a Smi-handler for loading a constant from fast object.
static inline Handle<Object> LoadConstant(Isolate* isolate, int descriptor);
+ // Sets DoAccessCheckOnReceiverBits in given Smi-handler. The receiver
+ // check is a part of a prototype chain check.
+ static inline Handle<Object> EnableAccessCheckOnReceiver(
+ Isolate* isolate, Handle<Object> smi_handler);
+
// Sets DoNegativeLookupOnReceiverBits in given Smi-handler. The receiver
// check is a part of a prototype chain check.
static inline Handle<Object> EnableNegativeLookupOnReceiver(
« no previous file with comments | « src/ic/handler-compiler.cc ('k') | src/ic/handler-configuration-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698