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 5112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5123 int offset = constant_pool_offset(); | 5123 int offset = constant_pool_offset(); |
5124 if (offset < instruction_size()) { | 5124 if (offset < instruction_size()) { |
5125 constant_pool = FIELD_ADDR(this, kHeaderSize + offset); | 5125 constant_pool = FIELD_ADDR(this, kHeaderSize + offset); |
5126 } | 5126 } |
5127 } | 5127 } |
5128 return constant_pool; | 5128 return constant_pool; |
5129 } | 5129 } |
5130 | 5130 |
5131 Code::Flags Code::ComputeFlags(Kind kind, ExtraICState extra_ic_state, | 5131 Code::Flags Code::ComputeFlags(Kind kind, ExtraICState extra_ic_state, |
5132 CacheHolderFlag holder) { | 5132 CacheHolderFlag holder) { |
| 5133 // TODO(ishell): remove ICStateField. |
5133 // Compute the bit mask. | 5134 // Compute the bit mask. |
5134 unsigned int bits = KindField::encode(kind) | | 5135 unsigned int bits = KindField::encode(kind) | |
| 5136 ICStateField::encode(MONOMORPHIC) | |
5135 ExtraICStateField::encode(extra_ic_state) | | 5137 ExtraICStateField::encode(extra_ic_state) | |
5136 CacheHolderField::encode(holder); | 5138 CacheHolderField::encode(holder); |
5137 return static_cast<Flags>(bits); | 5139 return static_cast<Flags>(bits); |
5138 } | 5140 } |
5139 | 5141 |
5140 Code::Flags Code::ComputeHandlerFlags(Kind handler_kind, | 5142 Code::Flags Code::ComputeHandlerFlags(Kind handler_kind, |
5141 CacheHolderFlag holder) { | 5143 CacheHolderFlag holder) { |
5142 return ComputeFlags(Code::HANDLER, handler_kind, holder); | 5144 return ComputeFlags(Code::HANDLER, handler_kind, holder); |
5143 } | 5145 } |
5144 | 5146 |
(...skipping 2768 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7913 #undef WRITE_INT64_FIELD | 7915 #undef WRITE_INT64_FIELD |
7914 #undef READ_BYTE_FIELD | 7916 #undef READ_BYTE_FIELD |
7915 #undef WRITE_BYTE_FIELD | 7917 #undef WRITE_BYTE_FIELD |
7916 #undef NOBARRIER_READ_BYTE_FIELD | 7918 #undef NOBARRIER_READ_BYTE_FIELD |
7917 #undef NOBARRIER_WRITE_BYTE_FIELD | 7919 #undef NOBARRIER_WRITE_BYTE_FIELD |
7918 | 7920 |
7919 } // namespace internal | 7921 } // namespace internal |
7920 } // namespace v8 | 7922 } // namespace v8 |
7921 | 7923 |
7922 #endif // V8_OBJECTS_INL_H_ | 7924 #endif // V8_OBJECTS_INL_H_ |
OLD | NEW |