| 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 13 matching lines...) Expand all Loading... |
| 24 #include "src/heap/incremental-marking.h" | 24 #include "src/heap/incremental-marking.h" |
| 25 #include "src/heap/objects-visiting.h" | 25 #include "src/heap/objects-visiting.h" |
| 26 #include "src/heap/spaces.h" | 26 #include "src/heap/spaces.h" |
| 27 #include "src/heap/store-buffer.h" | 27 #include "src/heap/store-buffer.h" |
| 28 #include "src/isolate.h" | 28 #include "src/isolate.h" |
| 29 #include "src/lookup.h" | 29 #include "src/lookup.h" |
| 30 #include "src/objects.h" | 30 #include "src/objects.h" |
| 31 #include "src/property.h" | 31 #include "src/property.h" |
| 32 #include "src/prototype.h" | 32 #include "src/prototype.h" |
| 33 #include "src/transitions-inl.h" | 33 #include "src/transitions-inl.h" |
| 34 #include "src/type-feedback-vector.h" |
| 34 #include "src/v8memory.h" | 35 #include "src/v8memory.h" |
| 35 | 36 |
| 36 namespace v8 { | 37 namespace v8 { |
| 37 namespace internal { | 38 namespace internal { |
| 38 | 39 |
| 39 PropertyDetails::PropertyDetails(Smi* smi) { | 40 PropertyDetails::PropertyDetails(Smi* smi) { |
| 40 value_ = smi->value(); | 41 value_ = smi->value(); |
| 41 } | 42 } |
| 42 | 43 |
| 43 | 44 |
| (...skipping 657 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 701 bool Object::IsDescriptorArray() const { | 702 bool Object::IsDescriptorArray() const { |
| 702 return IsFixedArray(); | 703 return IsFixedArray(); |
| 703 } | 704 } |
| 704 | 705 |
| 705 | 706 |
| 706 bool Object::IsTransitionArray() const { | 707 bool Object::IsTransitionArray() const { |
| 707 return IsFixedArray(); | 708 return IsFixedArray(); |
| 708 } | 709 } |
| 709 | 710 |
| 710 | 711 |
| 712 bool Object::IsTypeFeedbackVector() const { return IsFixedArray(); } |
| 713 |
| 714 |
| 711 bool Object::IsDeoptimizationInputData() const { | 715 bool Object::IsDeoptimizationInputData() const { |
| 712 // Must be a fixed array. | 716 // Must be a fixed array. |
| 713 if (!IsFixedArray()) return false; | 717 if (!IsFixedArray()) return false; |
| 714 | 718 |
| 715 // There's no sure way to detect the difference between a fixed array and | 719 // There's no sure way to detect the difference between a fixed array and |
| 716 // a deoptimization data array. Since this is used for asserts we can | 720 // a deoptimization data array. Since this is used for asserts we can |
| 717 // check that the length is zero or else the fixed size plus a multiple of | 721 // check that the length is zero or else the fixed size plus a multiple of |
| 718 // the entry size. | 722 // the entry size. |
| 719 int length = FixedArray::cast(this)->length(); | 723 int length = FixedArray::cast(this)->length(); |
| 720 if (length == 0) return true; | 724 if (length == 0) return true; |
| (...skipping 4672 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5393 | 5397 |
| 5394 ACCESSORS_TO_SMI(BreakPointInfo, code_position, kCodePositionIndex) | 5398 ACCESSORS_TO_SMI(BreakPointInfo, code_position, kCodePositionIndex) |
| 5395 ACCESSORS_TO_SMI(BreakPointInfo, source_position, kSourcePositionIndex) | 5399 ACCESSORS_TO_SMI(BreakPointInfo, source_position, kSourcePositionIndex) |
| 5396 ACCESSORS_TO_SMI(BreakPointInfo, statement_position, kStatementPositionIndex) | 5400 ACCESSORS_TO_SMI(BreakPointInfo, statement_position, kStatementPositionIndex) |
| 5397 ACCESSORS(BreakPointInfo, break_point_objects, Object, kBreakPointObjectsIndex) | 5401 ACCESSORS(BreakPointInfo, break_point_objects, Object, kBreakPointObjectsIndex) |
| 5398 | 5402 |
| 5399 ACCESSORS(SharedFunctionInfo, name, Object, kNameOffset) | 5403 ACCESSORS(SharedFunctionInfo, name, Object, kNameOffset) |
| 5400 ACCESSORS(SharedFunctionInfo, optimized_code_map, Object, | 5404 ACCESSORS(SharedFunctionInfo, optimized_code_map, Object, |
| 5401 kOptimizedCodeMapOffset) | 5405 kOptimizedCodeMapOffset) |
| 5402 ACCESSORS(SharedFunctionInfo, construct_stub, Code, kConstructStubOffset) | 5406 ACCESSORS(SharedFunctionInfo, construct_stub, Code, kConstructStubOffset) |
| 5403 ACCESSORS(SharedFunctionInfo, feedback_vector, FixedArray, | 5407 ACCESSORS(SharedFunctionInfo, feedback_vector, TypeFeedbackVector, |
| 5404 kFeedbackVectorOffset) | 5408 kFeedbackVectorOffset) |
| 5405 ACCESSORS(SharedFunctionInfo, instance_class_name, Object, | 5409 ACCESSORS(SharedFunctionInfo, instance_class_name, Object, |
| 5406 kInstanceClassNameOffset) | 5410 kInstanceClassNameOffset) |
| 5407 ACCESSORS(SharedFunctionInfo, function_data, Object, kFunctionDataOffset) | 5411 ACCESSORS(SharedFunctionInfo, function_data, Object, kFunctionDataOffset) |
| 5408 ACCESSORS(SharedFunctionInfo, script, Object, kScriptOffset) | 5412 ACCESSORS(SharedFunctionInfo, script, Object, kScriptOffset) |
| 5409 ACCESSORS(SharedFunctionInfo, debug_info, Object, kDebugInfoOffset) | 5413 ACCESSORS(SharedFunctionInfo, debug_info, Object, kDebugInfoOffset) |
| 5410 ACCESSORS(SharedFunctionInfo, inferred_name, String, kInferredNameOffset) | 5414 ACCESSORS(SharedFunctionInfo, inferred_name, String, kInferredNameOffset) |
| 5411 | 5415 |
| 5412 | 5416 |
| 5413 SMI_ACCESSORS(FunctionTemplateInfo, length, kLengthOffset) | 5417 SMI_ACCESSORS(FunctionTemplateInfo, length, kLengthOffset) |
| (...skipping 1847 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7261 #undef READ_SHORT_FIELD | 7265 #undef READ_SHORT_FIELD |
| 7262 #undef WRITE_SHORT_FIELD | 7266 #undef WRITE_SHORT_FIELD |
| 7263 #undef READ_BYTE_FIELD | 7267 #undef READ_BYTE_FIELD |
| 7264 #undef WRITE_BYTE_FIELD | 7268 #undef WRITE_BYTE_FIELD |
| 7265 #undef NOBARRIER_READ_BYTE_FIELD | 7269 #undef NOBARRIER_READ_BYTE_FIELD |
| 7266 #undef NOBARRIER_WRITE_BYTE_FIELD | 7270 #undef NOBARRIER_WRITE_BYTE_FIELD |
| 7267 | 7271 |
| 7268 } } // namespace v8::internal | 7272 } } // namespace v8::internal |
| 7269 | 7273 |
| 7270 #endif // V8_OBJECTS_INL_H_ | 7274 #endif // V8_OBJECTS_INL_H_ |
| OLD | NEW |