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 3497 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3508 ACCESSORS(DebugInfo, code, Code, kPatchedCodeIndex) | 3508 ACCESSORS(DebugInfo, code, Code, kPatchedCodeIndex) |
3509 ACCESSORS(DebugInfo, break_points, FixedArray, kBreakPointsStateIndex) | 3509 ACCESSORS(DebugInfo, break_points, FixedArray, kBreakPointsStateIndex) |
3510 | 3510 |
3511 ACCESSORS_TO_SMI(BreakPointInfo, code_position, kCodePositionIndex) | 3511 ACCESSORS_TO_SMI(BreakPointInfo, code_position, kCodePositionIndex) |
3512 ACCESSORS_TO_SMI(BreakPointInfo, source_position, kSourcePositionIndex) | 3512 ACCESSORS_TO_SMI(BreakPointInfo, source_position, kSourcePositionIndex) |
3513 ACCESSORS_TO_SMI(BreakPointInfo, statement_position, kStatementPositionIndex) | 3513 ACCESSORS_TO_SMI(BreakPointInfo, statement_position, kStatementPositionIndex) |
3514 ACCESSORS(BreakPointInfo, break_point_objects, Object, kBreakPointObjectsIndex) | 3514 ACCESSORS(BreakPointInfo, break_point_objects, Object, kBreakPointObjectsIndex) |
3515 #endif | 3515 #endif |
3516 | 3516 |
3517 ACCESSORS(SharedFunctionInfo, name, Object, kNameOffset) | 3517 ACCESSORS(SharedFunctionInfo, name, Object, kNameOffset) |
| 3518 ACCESSORS(SharedFunctionInfo, optimized_code_map, Object, |
| 3519 kOptimizedCodeMapOffset) |
3518 ACCESSORS(SharedFunctionInfo, construct_stub, Code, kConstructStubOffset) | 3520 ACCESSORS(SharedFunctionInfo, construct_stub, Code, kConstructStubOffset) |
3519 ACCESSORS(SharedFunctionInfo, initial_map, Object, kInitialMapOffset) | 3521 ACCESSORS(SharedFunctionInfo, initial_map, Object, kInitialMapOffset) |
3520 ACCESSORS(SharedFunctionInfo, instance_class_name, Object, | 3522 ACCESSORS(SharedFunctionInfo, instance_class_name, Object, |
3521 kInstanceClassNameOffset) | 3523 kInstanceClassNameOffset) |
3522 ACCESSORS(SharedFunctionInfo, function_data, Object, kFunctionDataOffset) | 3524 ACCESSORS(SharedFunctionInfo, function_data, Object, kFunctionDataOffset) |
3523 ACCESSORS(SharedFunctionInfo, script, Object, kScriptOffset) | 3525 ACCESSORS(SharedFunctionInfo, script, Object, kScriptOffset) |
3524 ACCESSORS(SharedFunctionInfo, debug_info, Object, kDebugInfoOffset) | 3526 ACCESSORS(SharedFunctionInfo, debug_info, Object, kDebugInfoOffset) |
3525 ACCESSORS(SharedFunctionInfo, inferred_name, String, kInferredNameOffset) | 3527 ACCESSORS(SharedFunctionInfo, inferred_name, String, kInferredNameOffset) |
3526 ACCESSORS(SharedFunctionInfo, this_property_assignments, Object, | 3528 ACCESSORS(SharedFunctionInfo, this_property_assignments, Object, |
3527 kThisPropertyAssignmentsOffset) | 3529 kThisPropertyAssignmentsOffset) |
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3715 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, | 3717 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, |
3716 name_should_print_as_anonymous, | 3718 name_should_print_as_anonymous, |
3717 kNameShouldPrintAsAnonymous) | 3719 kNameShouldPrintAsAnonymous) |
3718 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, bound, kBoundFunction) | 3720 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, bound, kBoundFunction) |
3719 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, is_anonymous, kIsAnonymous) | 3721 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, is_anonymous, kIsAnonymous) |
3720 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, is_function, kIsFunction) | 3722 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, is_function, kIsFunction) |
3721 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, dont_optimize, | 3723 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, dont_optimize, |
3722 kDontOptimize) | 3724 kDontOptimize) |
3723 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, dont_inline, kDontInline) | 3725 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, dont_inline, kDontInline) |
3724 | 3726 |
| 3727 void SharedFunctionInfo::BeforeVisitingPointers() { |
| 3728 if (IsInobjectSlackTrackingInProgress()) DetachInitialMap(); |
| 3729 |
| 3730 // Flush optimized code map on major GC. |
| 3731 // Note: we may experiment with rebuilding it or retaining entries |
| 3732 // which should survive as we iterate through optimized functions |
| 3733 // anyway. |
| 3734 set_optimized_code_map(Smi::FromInt(0)); |
| 3735 } |
| 3736 |
| 3737 |
3725 ACCESSORS(CodeCache, default_cache, FixedArray, kDefaultCacheOffset) | 3738 ACCESSORS(CodeCache, default_cache, FixedArray, kDefaultCacheOffset) |
3726 ACCESSORS(CodeCache, normal_type_cache, Object, kNormalTypeCacheOffset) | 3739 ACCESSORS(CodeCache, normal_type_cache, Object, kNormalTypeCacheOffset) |
3727 | 3740 |
3728 ACCESSORS(PolymorphicCodeCache, cache, Object, kCacheOffset) | 3741 ACCESSORS(PolymorphicCodeCache, cache, Object, kCacheOffset) |
3729 | 3742 |
3730 bool Script::HasValidSource() { | 3743 bool Script::HasValidSource() { |
3731 Object* src = this->source(); | 3744 Object* src = this->source(); |
3732 if (!src->IsString()) return true; | 3745 if (!src->IsString()) return true; |
3733 String* src_str = String::cast(src); | 3746 String* src_str = String::cast(src); |
3734 if (!StringShape(src_str).IsExternal()) return true; | 3747 if (!StringShape(src_str).IsExternal()) return true; |
(...skipping 1227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4962 #undef WRITE_UINT32_FIELD | 4975 #undef WRITE_UINT32_FIELD |
4963 #undef READ_SHORT_FIELD | 4976 #undef READ_SHORT_FIELD |
4964 #undef WRITE_SHORT_FIELD | 4977 #undef WRITE_SHORT_FIELD |
4965 #undef READ_BYTE_FIELD | 4978 #undef READ_BYTE_FIELD |
4966 #undef WRITE_BYTE_FIELD | 4979 #undef WRITE_BYTE_FIELD |
4967 | 4980 |
4968 | 4981 |
4969 } } // namespace v8::internal | 4982 } } // namespace v8::internal |
4970 | 4983 |
4971 #endif // V8_OBJECTS_INL_H_ | 4984 #endif // V8_OBJECTS_INL_H_ |
OLD | NEW |