| 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 5262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5273 }; | 5273 }; |
| 5274 | 5274 |
| 5275 int AbstractCode::instruction_size() { | 5275 int AbstractCode::instruction_size() { |
| 5276 if (IsCode()) { | 5276 if (IsCode()) { |
| 5277 return GetCode()->instruction_size(); | 5277 return GetCode()->instruction_size(); |
| 5278 } else { | 5278 } else { |
| 5279 return GetBytecodeArray()->length(); | 5279 return GetBytecodeArray()->length(); |
| 5280 } | 5280 } |
| 5281 } | 5281 } |
| 5282 | 5282 |
| 5283 ByteArray* AbstractCode::source_position_table() { |
| 5284 if (IsCode()) { |
| 5285 return GetCode()->source_position_table(); |
| 5286 } else { |
| 5287 return GetBytecodeArray()->source_position_table(); |
| 5288 } |
| 5289 } |
| 5290 |
| 5283 int AbstractCode::SizeIncludingMetadata() { | 5291 int AbstractCode::SizeIncludingMetadata() { |
| 5284 if (IsCode()) { | 5292 if (IsCode()) { |
| 5285 return GetCode()->SizeIncludingMetadata(); | 5293 return GetCode()->SizeIncludingMetadata(); |
| 5286 } else { | 5294 } else { |
| 5287 return GetBytecodeArray()->SizeIncludingMetadata(); | 5295 return GetBytecodeArray()->SizeIncludingMetadata(); |
| 5288 } | 5296 } |
| 5289 } | 5297 } |
| 5290 int AbstractCode::ExecutableSize() { | 5298 int AbstractCode::ExecutableSize() { |
| 5291 if (IsCode()) { | 5299 if (IsCode()) { |
| 5292 return GetCode()->ExecutableSize(); | 5300 return GetCode()->ExecutableSize(); |
| (...skipping 2745 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8038 #undef WRITE_INT64_FIELD | 8046 #undef WRITE_INT64_FIELD |
| 8039 #undef READ_BYTE_FIELD | 8047 #undef READ_BYTE_FIELD |
| 8040 #undef WRITE_BYTE_FIELD | 8048 #undef WRITE_BYTE_FIELD |
| 8041 #undef NOBARRIER_READ_BYTE_FIELD | 8049 #undef NOBARRIER_READ_BYTE_FIELD |
| 8042 #undef NOBARRIER_WRITE_BYTE_FIELD | 8050 #undef NOBARRIER_WRITE_BYTE_FIELD |
| 8043 | 8051 |
| 8044 } // namespace internal | 8052 } // namespace internal |
| 8045 } // namespace v8 | 8053 } // namespace v8 |
| 8046 | 8054 |
| 8047 #endif // V8_OBJECTS_INL_H_ | 8055 #endif // V8_OBJECTS_INL_H_ |
| OLD | NEW |