OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef V8_IC_HANDLER_CONFIGURATION_H_ |
| 6 #define V8_IC_HANDLER_CONFIGURATION_H_ |
| 7 |
| 8 #include "src/elements-kind.h" |
| 9 #include "src/globals.h" |
| 10 #include "src/utils.h" |
| 11 |
| 12 namespace v8 { |
| 13 namespace internal { |
| 14 |
| 15 enum LoadHandlerType { |
| 16 kLoadICHandlerForElements = 0, |
| 17 kLoadICHandlerForProperties = 1 |
| 18 }; |
| 19 |
| 20 class LoadHandlerTypeBit : public BitField<bool, 0, 1> {}; |
| 21 |
| 22 // Encoding for configuration Smis for property loads: |
| 23 class FieldOffsetIsInobject |
| 24 : public BitField<bool, LoadHandlerTypeBit::kNext, 1> {}; |
| 25 class FieldOffsetIsDouble |
| 26 : public BitField<bool, FieldOffsetIsInobject::kNext, 1> {}; |
| 27 class FieldOffsetOffset : public BitField<int, FieldOffsetIsDouble::kNext, 27> { |
| 28 }; |
| 29 // Make sure we don't overflow into the sign bit. |
| 30 STATIC_ASSERT(FieldOffsetOffset::kNext <= kSmiValueSize - 1); |
| 31 |
| 32 // Encoding for configuration Smis for elements loads: |
| 33 class KeyedLoadIsJsArray : public BitField<bool, LoadHandlerTypeBit::kNext, 1> { |
| 34 }; |
| 35 class KeyedLoadConvertHole |
| 36 : public BitField<bool, KeyedLoadIsJsArray::kNext, 1> {}; |
| 37 class KeyedLoadElementsKind |
| 38 : public BitField<ElementsKind, KeyedLoadConvertHole::kNext, 8> {}; |
| 39 // Make sure we don't overflow into the sign bit. |
| 40 STATIC_ASSERT(KeyedLoadElementsKind::kNext <= kSmiValueSize - 1); |
| 41 |
| 42 } // namespace internal |
| 43 } // namespace v8 |
| 44 |
| 45 #endif // V8_IC_HANDLER_CONFIGURATION_H_ |
OLD | NEW |