OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 // Review notes: | 5 // Review notes: |
6 // | 6 // |
7 // - The use of macros in these inline functions may seem superfluous | 7 // - The use of macros in these inline functions may seem superfluous |
8 // but it is absolutely needed to make sure gcc generates optimal | 8 // but it is absolutely needed to make sure gcc generates optimal |
9 // code. gcc is not happy when attempting to inline too deep. | 9 // code. gcc is not happy when attempting to inline too deep. |
10 // | 10 // |
(...skipping 3392 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3403 | 3403 |
3404 int HandlerTable::GetRangeHandler(int index) const { | 3404 int HandlerTable::GetRangeHandler(int index) const { |
3405 return HandlerOffsetField::decode( | 3405 return HandlerOffsetField::decode( |
3406 Smi::cast(get(index * kRangeEntrySize + kRangeHandlerIndex))->value()); | 3406 Smi::cast(get(index * kRangeEntrySize + kRangeHandlerIndex))->value()); |
3407 } | 3407 } |
3408 | 3408 |
3409 int HandlerTable::GetRangeData(int index) const { | 3409 int HandlerTable::GetRangeData(int index) const { |
3410 return Smi::cast(get(index * kRangeEntrySize + kRangeDataIndex))->value(); | 3410 return Smi::cast(get(index * kRangeEntrySize + kRangeDataIndex))->value(); |
3411 } | 3411 } |
3412 | 3412 |
| 3413 HandlerTable::CatchPrediction HandlerTable::GetRangePrediction( |
| 3414 int index) const { |
| 3415 return HandlerPredictionField::decode( |
| 3416 Smi::cast(get(index * kRangeEntrySize + kRangeHandlerIndex))->value()); |
| 3417 } |
| 3418 |
3413 void HandlerTable::SetRangeStart(int index, int value) { | 3419 void HandlerTable::SetRangeStart(int index, int value) { |
3414 set(index * kRangeEntrySize + kRangeStartIndex, Smi::FromInt(value)); | 3420 set(index * kRangeEntrySize + kRangeStartIndex, Smi::FromInt(value)); |
3415 } | 3421 } |
3416 | 3422 |
3417 | 3423 |
3418 void HandlerTable::SetRangeEnd(int index, int value) { | 3424 void HandlerTable::SetRangeEnd(int index, int value) { |
3419 set(index * kRangeEntrySize + kRangeEndIndex, Smi::FromInt(value)); | 3425 set(index * kRangeEntrySize + kRangeEndIndex, Smi::FromInt(value)); |
3420 } | 3426 } |
3421 | 3427 |
3422 | 3428 |
(...skipping 4413 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7836 #undef WRITE_INT64_FIELD | 7842 #undef WRITE_INT64_FIELD |
7837 #undef READ_BYTE_FIELD | 7843 #undef READ_BYTE_FIELD |
7838 #undef WRITE_BYTE_FIELD | 7844 #undef WRITE_BYTE_FIELD |
7839 #undef NOBARRIER_READ_BYTE_FIELD | 7845 #undef NOBARRIER_READ_BYTE_FIELD |
7840 #undef NOBARRIER_WRITE_BYTE_FIELD | 7846 #undef NOBARRIER_WRITE_BYTE_FIELD |
7841 | 7847 |
7842 } // namespace internal | 7848 } // namespace internal |
7843 } // namespace v8 | 7849 } // namespace v8 |
7844 | 7850 |
7845 #endif // V8_OBJECTS_INL_H_ | 7851 #endif // V8_OBJECTS_INL_H_ |
OLD | NEW |