| OLD | NEW |
| 1 // Copyright 2016 the V8 project authors. All rights reserved. | 1 // Copyright 2016 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef V8_IC_HANDLER_CONFIGURATION_H_ | 5 #ifndef V8_IC_HANDLER_CONFIGURATION_H_ |
| 6 #define V8_IC_HANDLER_CONFIGURATION_H_ | 6 #define V8_IC_HANDLER_CONFIGURATION_H_ |
| 7 | 7 |
| 8 #include "src/elements-kind.h" | 8 #include "src/elements-kind.h" |
| 9 #include "src/field-index.h" | 9 #include "src/field-index.h" |
| 10 #include "src/globals.h" | 10 #include "src/globals.h" |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 // Defines whether negative lookup check should be done on receiver object. | 28 // Defines whether negative lookup check should be done on receiver object. |
| 29 // Applicable to kForFields, kForConstants and kForNonExistent kinds only when | 29 // Applicable to kForFields, kForConstants and kForNonExistent kinds only when |
| 30 // loading value from prototype chain. Ignored when loading from holder. | 30 // loading value from prototype chain. Ignored when loading from holder. |
| 31 class DoNegativeLookupOnReceiverBits | 31 class DoNegativeLookupOnReceiverBits |
| 32 : public BitField<bool, DoAccessCheckOnReceiverBits::kNext, 1> {}; | 32 : public BitField<bool, DoAccessCheckOnReceiverBits::kNext, 1> {}; |
| 33 | 33 |
| 34 // | 34 // |
| 35 // Encoding when KindBits contains kForConstants. | 35 // Encoding when KindBits contains kForConstants. |
| 36 // | 36 // |
| 37 | 37 |
| 38 class IsAccessorInfoBits |
| 39 : public BitField<bool, DoNegativeLookupOnReceiverBits::kNext, 1> {}; |
| 38 // +2 here is because each descriptor entry occupies 3 slots in array. | 40 // +2 here is because each descriptor entry occupies 3 slots in array. |
| 39 class DescriptorValueIndexBits | 41 class DescriptorValueIndexBits |
| 40 : public BitField<unsigned, DoNegativeLookupOnReceiverBits::kNext, | 42 : public BitField<unsigned, IsAccessorInfoBits::kNext, |
| 41 kDescriptorIndexBitCount + 2> {}; | 43 kDescriptorIndexBitCount + 2> {}; |
| 42 // Make sure we don't overflow the smi. | 44 // Make sure we don't overflow the smi. |
| 43 STATIC_ASSERT(DescriptorValueIndexBits::kNext <= kSmiValueSize); | 45 STATIC_ASSERT(DescriptorValueIndexBits::kNext <= kSmiValueSize); |
| 44 | 46 |
| 45 // | 47 // |
| 46 // Encoding when KindBits contains kForFields. | 48 // Encoding when KindBits contains kForFields. |
| 47 // | 49 // |
| 48 class IsInobjectBits | 50 class IsInobjectBits |
| 49 : public BitField<bool, DoNegativeLookupOnReceiverBits::kNext, 1> {}; | 51 : public BitField<bool, DoNegativeLookupOnReceiverBits::kNext, 1> {}; |
| 50 class IsDoubleBits : public BitField<bool, IsInobjectBits::kNext, 1> {}; | 52 class IsDoubleBits : public BitField<bool, IsInobjectBits::kNext, 1> {}; |
| (...skipping 29 matching lines...) Expand all Loading... |
| 80 static const int kHolderCellIndex = 2; | 82 static const int kHolderCellIndex = 2; |
| 81 static const int kFirstPrototypeIndex = 3; | 83 static const int kFirstPrototypeIndex = 3; |
| 82 | 84 |
| 83 // Creates a Smi-handler for loading a field from fast object. | 85 // Creates a Smi-handler for loading a field from fast object. |
| 84 static inline Handle<Object> LoadField(Isolate* isolate, | 86 static inline Handle<Object> LoadField(Isolate* isolate, |
| 85 FieldIndex field_index); | 87 FieldIndex field_index); |
| 86 | 88 |
| 87 // Creates a Smi-handler for loading a constant from fast object. | 89 // Creates a Smi-handler for loading a constant from fast object. |
| 88 static inline Handle<Object> LoadConstant(Isolate* isolate, int descriptor); | 90 static inline Handle<Object> LoadConstant(Isolate* isolate, int descriptor); |
| 89 | 91 |
| 92 // Creates a Smi-handler for loading an Api getter property from fast object. |
| 93 static inline Handle<Object> LoadApiGetter(Isolate* isolate, int descriptor); |
| 94 |
| 90 // Sets DoAccessCheckOnReceiverBits in given Smi-handler. The receiver | 95 // Sets DoAccessCheckOnReceiverBits in given Smi-handler. The receiver |
| 91 // check is a part of a prototype chain check. | 96 // check is a part of a prototype chain check. |
| 92 static inline Handle<Object> EnableAccessCheckOnReceiver( | 97 static inline Handle<Object> EnableAccessCheckOnReceiver( |
| 93 Isolate* isolate, Handle<Object> smi_handler); | 98 Isolate* isolate, Handle<Object> smi_handler); |
| 94 | 99 |
| 95 // Sets DoNegativeLookupOnReceiverBits in given Smi-handler. The receiver | 100 // Sets DoNegativeLookupOnReceiverBits in given Smi-handler. The receiver |
| 96 // check is a part of a prototype chain check. | 101 // check is a part of a prototype chain check. |
| 97 static inline Handle<Object> EnableNegativeLookupOnReceiver( | 102 static inline Handle<Object> EnableNegativeLookupOnReceiver( |
| 98 Isolate* isolate, Handle<Object> smi_handler); | 103 Isolate* isolate, Handle<Object> smi_handler); |
| 99 | 104 |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 137 // Creates a Smi-handler for storing a field to fast object. | 142 // Creates a Smi-handler for storing a field to fast object. |
| 138 static inline Handle<Object> StoreField(Isolate* isolate, int descriptor, | 143 static inline Handle<Object> StoreField(Isolate* isolate, int descriptor, |
| 139 FieldIndex field_index, | 144 FieldIndex field_index, |
| 140 Representation representation); | 145 Representation representation); |
| 141 }; | 146 }; |
| 142 | 147 |
| 143 } // namespace internal | 148 } // namespace internal |
| 144 } // namespace v8 | 149 } // namespace v8 |
| 145 | 150 |
| 146 #endif // V8_IC_HANDLER_CONFIGURATION_H_ | 151 #endif // V8_IC_HANDLER_CONFIGURATION_H_ |
| OLD | NEW |