| 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_INL_H_ | 5 #ifndef V8_IC_HANDLER_CONFIGURATION_INL_H_ |
| 6 #define V8_IC_HANDLER_CONFIGURATION_INL_H_ | 6 #define V8_IC_HANDLER_CONFIGURATION_INL_H_ |
| 7 | 7 |
| 8 #include "src/ic/handler-configuration.h" | 8 #include "src/ic/handler-configuration.h" |
| 9 | 9 |
| 10 #include "src/field-index-inl.h" | 10 #include "src/field-index-inl.h" |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 Isolate* isolate, Handle<Object> smi_handler) { | 33 Isolate* isolate, Handle<Object> smi_handler) { |
| 34 int config = Smi::cast(*smi_handler)->value(); | 34 int config = Smi::cast(*smi_handler)->value(); |
| 35 #ifdef DEBUG | 35 #ifdef DEBUG |
| 36 Kind kind = KindBits::decode(config); | 36 Kind kind = KindBits::decode(config); |
| 37 DCHECK(kind == kForFields || kind == kForConstants); | 37 DCHECK(kind == kForFields || kind == kForConstants); |
| 38 #endif | 38 #endif |
| 39 config = DoNegativeLookupOnReceiverBits::update(config, true); | 39 config = DoNegativeLookupOnReceiverBits::update(config, true); |
| 40 return handle(Smi::FromInt(config), isolate); | 40 return handle(Smi::FromInt(config), isolate); |
| 41 } | 41 } |
| 42 | 42 |
| 43 Handle<Object> LoadHandler::LoadNonExistent( |
| 44 Isolate* isolate, bool do_negative_lookup_on_receiver) { |
| 45 int config = |
| 46 KindBits::encode(kForNonExistent) | |
| 47 DoNegativeLookupOnReceiverBits::encode(do_negative_lookup_on_receiver); |
| 48 return handle(Smi::FromInt(config), isolate); |
| 49 } |
| 50 |
| 43 Handle<Object> LoadHandler::LoadElement(Isolate* isolate, | 51 Handle<Object> LoadHandler::LoadElement(Isolate* isolate, |
| 44 ElementsKind elements_kind, | 52 ElementsKind elements_kind, |
| 45 bool convert_hole_to_undefined, | 53 bool convert_hole_to_undefined, |
| 46 bool is_js_array) { | 54 bool is_js_array) { |
| 47 int config = KindBits::encode(kForElements) | | 55 int config = KindBits::encode(kForElements) | |
| 48 ElementsKindBits::encode(elements_kind) | | 56 ElementsKindBits::encode(elements_kind) | |
| 49 ConvertHoleBits::encode(convert_hole_to_undefined) | | 57 ConvertHoleBits::encode(convert_hole_to_undefined) | |
| 50 IsJsArrayBits::encode(is_js_array); | 58 IsJsArrayBits::encode(is_js_array); |
| 51 return handle(Smi::FromInt(config), isolate); | 59 return handle(Smi::FromInt(config), isolate); |
| 52 } | 60 } |
| (...skipping 26 matching lines...) Expand all Loading... |
| 79 StoreHandler::FieldRepresentationBits::encode(field_rep) | | 87 StoreHandler::FieldRepresentationBits::encode(field_rep) | |
| 80 StoreHandler::DescriptorValueIndexBits::encode(value_index) | | 88 StoreHandler::DescriptorValueIndexBits::encode(value_index) | |
| 81 StoreHandler::FieldOffsetBits::encode(field_index.offset()); | 89 StoreHandler::FieldOffsetBits::encode(field_index.offset()); |
| 82 return handle(Smi::FromInt(config), isolate); | 90 return handle(Smi::FromInt(config), isolate); |
| 83 } | 91 } |
| 84 | 92 |
| 85 } // namespace internal | 93 } // namespace internal |
| 86 } // namespace v8 | 94 } // namespace v8 |
| 87 | 95 |
| 88 #endif // V8_IC_HANDLER_CONFIGURATION_INL_H_ | 96 #endif // V8_IC_HANDLER_CONFIGURATION_INL_H_ |
| OLD | NEW |