| 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 2282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2943 } | 2944 } |
| 2944 | 2945 |
| 2945 | 2946 |
| 2946 // ------------------------------------ | 2947 // ------------------------------------ |
| 2947 // Cast operations | 2948 // Cast operations |
| 2948 | 2949 |
| 2949 | 2950 |
| 2950 CAST_ACCESSOR(AccessorInfo) | 2951 CAST_ACCESSOR(AccessorInfo) |
| 2951 CAST_ACCESSOR(ArrayList) | 2952 CAST_ACCESSOR(ArrayList) |
| 2952 CAST_ACCESSOR(ByteArray) | 2953 CAST_ACCESSOR(ByteArray) |
| 2954 CAST_ACCESSOR(BytecodeArray) |
| 2953 CAST_ACCESSOR(Cell) | 2955 CAST_ACCESSOR(Cell) |
| 2954 CAST_ACCESSOR(Code) | 2956 CAST_ACCESSOR(Code) |
| 2955 CAST_ACCESSOR(CodeCacheHashTable) | 2957 CAST_ACCESSOR(CodeCacheHashTable) |
| 2956 CAST_ACCESSOR(CompilationCacheTable) | 2958 CAST_ACCESSOR(CompilationCacheTable) |
| 2957 CAST_ACCESSOR(ConsString) | 2959 CAST_ACCESSOR(ConsString) |
| 2958 CAST_ACCESSOR(DeoptimizationInputData) | 2960 CAST_ACCESSOR(DeoptimizationInputData) |
| 2959 CAST_ACCESSOR(DeoptimizationOutputData) | 2961 CAST_ACCESSOR(DeoptimizationOutputData) |
| 2960 CAST_ACCESSOR(DependentCode) | 2962 CAST_ACCESSOR(DependentCode) |
| 2961 CAST_ACCESSOR(DescriptorArray) | 2963 CAST_ACCESSOR(DescriptorArray) |
| 2962 CAST_ACCESSOR(ExternalArray) | 2964 CAST_ACCESSOR(ExternalArray) |
| (...skipping 2220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5183 ACCESSORS_TO_SMI(BreakPointInfo, source_position, kSourcePositionIndex) | 5185 ACCESSORS_TO_SMI(BreakPointInfo, source_position, kSourcePositionIndex) |
| 5184 ACCESSORS_TO_SMI(BreakPointInfo, statement_position, kStatementPositionIndex) | 5186 ACCESSORS_TO_SMI(BreakPointInfo, statement_position, kStatementPositionIndex) |
| 5185 ACCESSORS(BreakPointInfo, break_point_objects, Object, kBreakPointObjectsIndex) | 5187 ACCESSORS(BreakPointInfo, break_point_objects, Object, kBreakPointObjectsIndex) |
| 5186 | 5188 |
| 5187 ACCESSORS(SharedFunctionInfo, name, Object, kNameOffset) | 5189 ACCESSORS(SharedFunctionInfo, name, Object, kNameOffset) |
| 5188 ACCESSORS(SharedFunctionInfo, optimized_code_map, Object, | 5190 ACCESSORS(SharedFunctionInfo, optimized_code_map, Object, |
| 5189 kOptimizedCodeMapOffset) | 5191 kOptimizedCodeMapOffset) |
| 5190 ACCESSORS(SharedFunctionInfo, construct_stub, Code, kConstructStubOffset) | 5192 ACCESSORS(SharedFunctionInfo, construct_stub, Code, kConstructStubOffset) |
| 5191 ACCESSORS(SharedFunctionInfo, feedback_vector, TypeFeedbackVector, | 5193 ACCESSORS(SharedFunctionInfo, feedback_vector, TypeFeedbackVector, |
| 5192 kFeedbackVectorOffset) | 5194 kFeedbackVectorOffset) |
| 5195 ACCESSORS(SharedFunctionInfo, bytecode_array, BytecodeArray, |
| 5196 kBytecodeArrayOffset) |
| 5193 #if TRACE_MAPS | 5197 #if TRACE_MAPS |
| 5194 SMI_ACCESSORS(SharedFunctionInfo, unique_id, kUniqueIdOffset) | 5198 SMI_ACCESSORS(SharedFunctionInfo, unique_id, kUniqueIdOffset) |
| 5195 #endif | 5199 #endif |
| 5196 ACCESSORS(SharedFunctionInfo, instance_class_name, Object, | 5200 ACCESSORS(SharedFunctionInfo, instance_class_name, Object, |
| 5197 kInstanceClassNameOffset) | 5201 kInstanceClassNameOffset) |
| 5198 ACCESSORS(SharedFunctionInfo, function_data, Object, kFunctionDataOffset) | 5202 ACCESSORS(SharedFunctionInfo, function_data, Object, kFunctionDataOffset) |
| 5199 ACCESSORS(SharedFunctionInfo, script, Object, kScriptOffset) | 5203 ACCESSORS(SharedFunctionInfo, script, Object, kScriptOffset) |
| 5200 ACCESSORS(SharedFunctionInfo, debug_info, Object, kDebugInfoOffset) | 5204 ACCESSORS(SharedFunctionInfo, debug_info, Object, kDebugInfoOffset) |
| 5201 ACCESSORS(SharedFunctionInfo, inferred_name, String, kInferredNameOffset) | 5205 ACCESSORS(SharedFunctionInfo, inferred_name, String, kInferredNameOffset) |
| 5202 | 5206 |
| (...skipping 2111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7314 #undef READ_SHORT_FIELD | 7318 #undef READ_SHORT_FIELD |
| 7315 #undef WRITE_SHORT_FIELD | 7319 #undef WRITE_SHORT_FIELD |
| 7316 #undef READ_BYTE_FIELD | 7320 #undef READ_BYTE_FIELD |
| 7317 #undef WRITE_BYTE_FIELD | 7321 #undef WRITE_BYTE_FIELD |
| 7318 #undef NOBARRIER_READ_BYTE_FIELD | 7322 #undef NOBARRIER_READ_BYTE_FIELD |
| 7319 #undef NOBARRIER_WRITE_BYTE_FIELD | 7323 #undef NOBARRIER_WRITE_BYTE_FIELD |
| 7320 | 7324 |
| 7321 } } // namespace v8::internal | 7325 } } // namespace v8::internal |
| 7322 | 7326 |
| 7323 #endif // V8_OBJECTS_INL_H_ | 7327 #endif // V8_OBJECTS_INL_H_ |
| OLD | NEW |