OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 3645 matching lines...) Loading... |
3656 ACCESSORS(DebugInfo, code, Code, kPatchedCodeIndex) | 3656 ACCESSORS(DebugInfo, code, Code, kPatchedCodeIndex) |
3657 ACCESSORS(DebugInfo, break_points, FixedArray, kBreakPointsStateIndex) | 3657 ACCESSORS(DebugInfo, break_points, FixedArray, kBreakPointsStateIndex) |
3658 | 3658 |
3659 ACCESSORS_TO_SMI(BreakPointInfo, code_position, kCodePositionIndex) | 3659 ACCESSORS_TO_SMI(BreakPointInfo, code_position, kCodePositionIndex) |
3660 ACCESSORS_TO_SMI(BreakPointInfo, source_position, kSourcePositionIndex) | 3660 ACCESSORS_TO_SMI(BreakPointInfo, source_position, kSourcePositionIndex) |
3661 ACCESSORS_TO_SMI(BreakPointInfo, statement_position, kStatementPositionIndex) | 3661 ACCESSORS_TO_SMI(BreakPointInfo, statement_position, kStatementPositionIndex) |
3662 ACCESSORS(BreakPointInfo, break_point_objects, Object, kBreakPointObjectsIndex) | 3662 ACCESSORS(BreakPointInfo, break_point_objects, Object, kBreakPointObjectsIndex) |
3663 #endif | 3663 #endif |
3664 | 3664 |
3665 ACCESSORS(SharedFunctionInfo, name, Object, kNameOffset) | 3665 ACCESSORS(SharedFunctionInfo, name, Object, kNameOffset) |
| 3666 ACCESSORS(SharedFunctionInfo, optimized_code_map, Object, |
| 3667 kOptimizedCodeMapOffset) |
3666 ACCESSORS(SharedFunctionInfo, construct_stub, Code, kConstructStubOffset) | 3668 ACCESSORS(SharedFunctionInfo, construct_stub, Code, kConstructStubOffset) |
3667 ACCESSORS(SharedFunctionInfo, initial_map, Object, kInitialMapOffset) | 3669 ACCESSORS(SharedFunctionInfo, initial_map, Object, kInitialMapOffset) |
3668 ACCESSORS(SharedFunctionInfo, instance_class_name, Object, | 3670 ACCESSORS(SharedFunctionInfo, instance_class_name, Object, |
3669 kInstanceClassNameOffset) | 3671 kInstanceClassNameOffset) |
3670 ACCESSORS(SharedFunctionInfo, function_data, Object, kFunctionDataOffset) | 3672 ACCESSORS(SharedFunctionInfo, function_data, Object, kFunctionDataOffset) |
3671 ACCESSORS(SharedFunctionInfo, script, Object, kScriptOffset) | 3673 ACCESSORS(SharedFunctionInfo, script, Object, kScriptOffset) |
3672 ACCESSORS(SharedFunctionInfo, debug_info, Object, kDebugInfoOffset) | 3674 ACCESSORS(SharedFunctionInfo, debug_info, Object, kDebugInfoOffset) |
3673 ACCESSORS(SharedFunctionInfo, inferred_name, String, kInferredNameOffset) | 3675 ACCESSORS(SharedFunctionInfo, inferred_name, String, kInferredNameOffset) |
3674 ACCESSORS(SharedFunctionInfo, this_property_assignments, Object, | 3676 ACCESSORS(SharedFunctionInfo, this_property_assignments, Object, |
3675 kThisPropertyAssignmentsOffset) | 3677 kThisPropertyAssignmentsOffset) |
(...skipping 191 matching lines...) Loading... |
3867 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, | 3869 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, |
3868 name_should_print_as_anonymous, | 3870 name_should_print_as_anonymous, |
3869 kNameShouldPrintAsAnonymous) | 3871 kNameShouldPrintAsAnonymous) |
3870 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, bound, kBoundFunction) | 3872 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, bound, kBoundFunction) |
3871 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, is_anonymous, kIsAnonymous) | 3873 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, is_anonymous, kIsAnonymous) |
3872 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, is_function, kIsFunction) | 3874 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, is_function, kIsFunction) |
3873 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, dont_optimize, | 3875 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, dont_optimize, |
3874 kDontOptimize) | 3876 kDontOptimize) |
3875 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, dont_inline, kDontInline) | 3877 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, dont_inline, kDontInline) |
3876 | 3878 |
| 3879 void SharedFunctionInfo::BeforeVisitingPointers() { |
| 3880 if (IsInobjectSlackTrackingInProgress()) DetachInitialMap(); |
| 3881 |
| 3882 // Flush optimized code map on major GC. |
| 3883 // Note: we may experiment with rebuilding it or retaining entries |
| 3884 // which should survive as we iterate through optimized functions |
| 3885 // anyway. |
| 3886 set_optimized_code_map(Smi::FromInt(0)); |
| 3887 } |
| 3888 |
| 3889 |
3877 ACCESSORS(CodeCache, default_cache, FixedArray, kDefaultCacheOffset) | 3890 ACCESSORS(CodeCache, default_cache, FixedArray, kDefaultCacheOffset) |
3878 ACCESSORS(CodeCache, normal_type_cache, Object, kNormalTypeCacheOffset) | 3891 ACCESSORS(CodeCache, normal_type_cache, Object, kNormalTypeCacheOffset) |
3879 | 3892 |
3880 ACCESSORS(PolymorphicCodeCache, cache, Object, kCacheOffset) | 3893 ACCESSORS(PolymorphicCodeCache, cache, Object, kCacheOffset) |
3881 | 3894 |
3882 bool Script::HasValidSource() { | 3895 bool Script::HasValidSource() { |
3883 Object* src = this->source(); | 3896 Object* src = this->source(); |
3884 if (!src->IsString()) return true; | 3897 if (!src->IsString()) return true; |
3885 String* src_str = String::cast(src); | 3898 String* src_str = String::cast(src); |
3886 if (!StringShape(src_str).IsExternal()) return true; | 3899 if (!StringShape(src_str).IsExternal()) return true; |
(...skipping 1292 matching lines...) Loading... |
5179 #undef WRITE_UINT32_FIELD | 5192 #undef WRITE_UINT32_FIELD |
5180 #undef READ_SHORT_FIELD | 5193 #undef READ_SHORT_FIELD |
5181 #undef WRITE_SHORT_FIELD | 5194 #undef WRITE_SHORT_FIELD |
5182 #undef READ_BYTE_FIELD | 5195 #undef READ_BYTE_FIELD |
5183 #undef WRITE_BYTE_FIELD | 5196 #undef WRITE_BYTE_FIELD |
5184 | 5197 |
5185 | 5198 |
5186 } } // namespace v8::internal | 5199 } } // namespace v8::internal |
5187 | 5200 |
5188 #endif // V8_OBJECTS_INL_H_ | 5201 #endif // V8_OBJECTS_INL_H_ |
OLD | NEW |