| 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 630 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 641 uint32_t seed_; | 641 uint32_t seed_; |
| 642 }; | 642 }; |
| 643 | 643 |
| 644 | 644 |
| 645 bool Object::IsNumber() const { | 645 bool Object::IsNumber() const { |
| 646 return IsSmi() || IsHeapNumber(); | 646 return IsSmi() || IsHeapNumber(); |
| 647 } | 647 } |
| 648 | 648 |
| 649 | 649 |
| 650 TYPE_CHECKER(ByteArray, BYTE_ARRAY_TYPE) | 650 TYPE_CHECKER(ByteArray, BYTE_ARRAY_TYPE) |
| 651 TYPE_CHECKER(BytecodeArray, BYTECODE_ARRAY_TYPE) |
| 651 TYPE_CHECKER(FreeSpace, FREE_SPACE_TYPE) | 652 TYPE_CHECKER(FreeSpace, FREE_SPACE_TYPE) |
| 652 | 653 |
| 653 | 654 |
| 654 bool Object::IsFiller() const { | 655 bool Object::IsFiller() const { |
| 655 if (!Object::IsHeapObject()) return false; | 656 if (!Object::IsHeapObject()) return false; |
| 656 InstanceType instance_type = HeapObject::cast(this)->map()->instance_type(); | 657 InstanceType instance_type = HeapObject::cast(this)->map()->instance_type(); |
| 657 return instance_type == FREE_SPACE_TYPE || instance_type == FILLER_TYPE; | 658 return instance_type == FREE_SPACE_TYPE || instance_type == FILLER_TYPE; |
| 658 } | 659 } |
| 659 | 660 |
| 660 | 661 |
| (...skipping 2273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2934 } | 2935 } |
| 2935 | 2936 |
| 2936 | 2937 |
| 2937 // ------------------------------------ | 2938 // ------------------------------------ |
| 2938 // Cast operations | 2939 // Cast operations |
| 2939 | 2940 |
| 2940 | 2941 |
| 2941 CAST_ACCESSOR(AccessorInfo) | 2942 CAST_ACCESSOR(AccessorInfo) |
| 2942 CAST_ACCESSOR(ArrayList) | 2943 CAST_ACCESSOR(ArrayList) |
| 2943 CAST_ACCESSOR(ByteArray) | 2944 CAST_ACCESSOR(ByteArray) |
| 2945 CAST_ACCESSOR(BytecodeArray) |
| 2944 CAST_ACCESSOR(Cell) | 2946 CAST_ACCESSOR(Cell) |
| 2945 CAST_ACCESSOR(Code) | 2947 CAST_ACCESSOR(Code) |
| 2946 CAST_ACCESSOR(CodeCacheHashTable) | 2948 CAST_ACCESSOR(CodeCacheHashTable) |
| 2947 CAST_ACCESSOR(CompilationCacheTable) | 2949 CAST_ACCESSOR(CompilationCacheTable) |
| 2948 CAST_ACCESSOR(ConsString) | 2950 CAST_ACCESSOR(ConsString) |
| 2949 CAST_ACCESSOR(DeoptimizationInputData) | 2951 CAST_ACCESSOR(DeoptimizationInputData) |
| 2950 CAST_ACCESSOR(DeoptimizationOutputData) | 2952 CAST_ACCESSOR(DeoptimizationOutputData) |
| 2951 CAST_ACCESSOR(DependentCode) | 2953 CAST_ACCESSOR(DependentCode) |
| 2952 CAST_ACCESSOR(DescriptorArray) | 2954 CAST_ACCESSOR(DescriptorArray) |
| 2953 CAST_ACCESSOR(ExternalArray) | 2955 CAST_ACCESSOR(ExternalArray) |
| (...skipping 2230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5184 ACCESSORS_TO_SMI(BreakPointInfo, source_position, kSourcePositionIndex) | 5186 ACCESSORS_TO_SMI(BreakPointInfo, source_position, kSourcePositionIndex) |
| 5185 ACCESSORS_TO_SMI(BreakPointInfo, statement_position, kStatementPositionIndex) | 5187 ACCESSORS_TO_SMI(BreakPointInfo, statement_position, kStatementPositionIndex) |
| 5186 ACCESSORS(BreakPointInfo, break_point_objects, Object, kBreakPointObjectsIndex) | 5188 ACCESSORS(BreakPointInfo, break_point_objects, Object, kBreakPointObjectsIndex) |
| 5187 | 5189 |
| 5188 ACCESSORS(SharedFunctionInfo, name, Object, kNameOffset) | 5190 ACCESSORS(SharedFunctionInfo, name, Object, kNameOffset) |
| 5189 ACCESSORS(SharedFunctionInfo, optimized_code_map, Object, | 5191 ACCESSORS(SharedFunctionInfo, optimized_code_map, Object, |
| 5190 kOptimizedCodeMapOffset) | 5192 kOptimizedCodeMapOffset) |
| 5191 ACCESSORS(SharedFunctionInfo, construct_stub, Code, kConstructStubOffset) | 5193 ACCESSORS(SharedFunctionInfo, construct_stub, Code, kConstructStubOffset) |
| 5192 ACCESSORS(SharedFunctionInfo, feedback_vector, TypeFeedbackVector, | 5194 ACCESSORS(SharedFunctionInfo, feedback_vector, TypeFeedbackVector, |
| 5193 kFeedbackVectorOffset) | 5195 kFeedbackVectorOffset) |
| 5196 ACCESSORS(SharedFunctionInfo, bytecode_array, BytecodeArray, |
| 5197 kBytecodeArrayOffset) |
| 5194 #if TRACE_MAPS | 5198 #if TRACE_MAPS |
| 5195 SMI_ACCESSORS(SharedFunctionInfo, unique_id, kUniqueIdOffset) | 5199 SMI_ACCESSORS(SharedFunctionInfo, unique_id, kUniqueIdOffset) |
| 5196 #endif | 5200 #endif |
| 5197 ACCESSORS(SharedFunctionInfo, instance_class_name, Object, | 5201 ACCESSORS(SharedFunctionInfo, instance_class_name, Object, |
| 5198 kInstanceClassNameOffset) | 5202 kInstanceClassNameOffset) |
| 5199 ACCESSORS(SharedFunctionInfo, function_data, Object, kFunctionDataOffset) | 5203 ACCESSORS(SharedFunctionInfo, function_data, Object, kFunctionDataOffset) |
| 5200 ACCESSORS(SharedFunctionInfo, script, Object, kScriptOffset) | 5204 ACCESSORS(SharedFunctionInfo, script, Object, kScriptOffset) |
| 5201 ACCESSORS(SharedFunctionInfo, debug_info, Object, kDebugInfoOffset) | 5205 ACCESSORS(SharedFunctionInfo, debug_info, Object, kDebugInfoOffset) |
| 5202 ACCESSORS(SharedFunctionInfo, inferred_name, String, kInferredNameOffset) | 5206 ACCESSORS(SharedFunctionInfo, inferred_name, String, kInferredNameOffset) |
| 5203 | 5207 |
| (...skipping 2111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7315 #undef READ_SHORT_FIELD | 7319 #undef READ_SHORT_FIELD |
| 7316 #undef WRITE_SHORT_FIELD | 7320 #undef WRITE_SHORT_FIELD |
| 7317 #undef READ_BYTE_FIELD | 7321 #undef READ_BYTE_FIELD |
| 7318 #undef WRITE_BYTE_FIELD | 7322 #undef WRITE_BYTE_FIELD |
| 7319 #undef NOBARRIER_READ_BYTE_FIELD | 7323 #undef NOBARRIER_READ_BYTE_FIELD |
| 7320 #undef NOBARRIER_WRITE_BYTE_FIELD | 7324 #undef NOBARRIER_WRITE_BYTE_FIELD |
| 7321 | 7325 |
| 7322 } } // namespace v8::internal | 7326 } } // namespace v8::internal |
| 7323 | 7327 |
| 7324 #endif // V8_OBJECTS_INL_H_ | 7328 #endif // V8_OBJECTS_INL_H_ |
| OLD | NEW |