Chromium Code Reviews

Side by Side Diff: src/objects-inl.h

Issue 178463007: Moved type feedback vector to SharedFunctionInfo. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Ports and comment response. Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | | Annotate | Revision Log
OLDNEW
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 1457 matching lines...)
1468 return TRACK_ALLOCATION_SITE; 1468 return TRACK_ALLOCATION_SITE;
1469 } 1469 }
1470 1470
1471 return DONT_TRACK_ALLOCATION_SITE; 1471 return DONT_TRACK_ALLOCATION_SITE;
1472 } 1472 }
1473 1473
1474 1474
1475 AllocationSiteMode AllocationSite::GetMode(ElementsKind from, 1475 AllocationSiteMode AllocationSite::GetMode(ElementsKind from,
1476 ElementsKind to) { 1476 ElementsKind to) {
1477 if (IsFastSmiElementsKind(from) && 1477 if (IsFastSmiElementsKind(from) &&
1478 IsMoreGeneralElementsKindTransition(from, to)) { 1478 IsMoreGeneralElementsKindTransition(from, to)) {
1479 return TRACK_ALLOCATION_SITE; 1479 return TRACK_ALLOCATION_SITE;
1480 } 1480 }
1481 1481
1482 return DONT_TRACK_ALLOCATION_SITE; 1482 return DONT_TRACK_ALLOCATION_SITE;
1483 } 1483 }
1484 1484
1485 1485
1486 inline bool AllocationSite::CanTrack(InstanceType type) { 1486 inline bool AllocationSite::CanTrack(InstanceType type) {
1487 if (FLAG_allocation_site_pretenuring) { 1487 if (FLAG_allocation_site_pretenuring) {
1488 return type == JS_ARRAY_TYPE || 1488 return type == JS_ARRAY_TYPE ||
(...skipping 3465 matching lines...)
4954 ACCESSORS_TO_SMI(BreakPointInfo, code_position, kCodePositionIndex) 4954 ACCESSORS_TO_SMI(BreakPointInfo, code_position, kCodePositionIndex)
4955 ACCESSORS_TO_SMI(BreakPointInfo, source_position, kSourcePositionIndex) 4955 ACCESSORS_TO_SMI(BreakPointInfo, source_position, kSourcePositionIndex)
4956 ACCESSORS_TO_SMI(BreakPointInfo, statement_position, kStatementPositionIndex) 4956 ACCESSORS_TO_SMI(BreakPointInfo, statement_position, kStatementPositionIndex)
4957 ACCESSORS(BreakPointInfo, break_point_objects, Object, kBreakPointObjectsIndex) 4957 ACCESSORS(BreakPointInfo, break_point_objects, Object, kBreakPointObjectsIndex)
4958 #endif 4958 #endif
4959 4959
4960 ACCESSORS(SharedFunctionInfo, name, Object, kNameOffset) 4960 ACCESSORS(SharedFunctionInfo, name, Object, kNameOffset)
4961 ACCESSORS(SharedFunctionInfo, optimized_code_map, Object, 4961 ACCESSORS(SharedFunctionInfo, optimized_code_map, Object,
4962 kOptimizedCodeMapOffset) 4962 kOptimizedCodeMapOffset)
4963 ACCESSORS(SharedFunctionInfo, construct_stub, Code, kConstructStubOffset) 4963 ACCESSORS(SharedFunctionInfo, construct_stub, Code, kConstructStubOffset)
4964 ACCESSORS(SharedFunctionInfo, feedback_vector, FixedArray,
4965 kFeedbackVectorOffset)
4964 ACCESSORS(SharedFunctionInfo, initial_map, Object, kInitialMapOffset) 4966 ACCESSORS(SharedFunctionInfo, initial_map, Object, kInitialMapOffset)
4965 ACCESSORS(SharedFunctionInfo, instance_class_name, Object, 4967 ACCESSORS(SharedFunctionInfo, instance_class_name, Object,
4966 kInstanceClassNameOffset) 4968 kInstanceClassNameOffset)
4967 ACCESSORS(SharedFunctionInfo, function_data, Object, kFunctionDataOffset) 4969 ACCESSORS(SharedFunctionInfo, function_data, Object, kFunctionDataOffset)
4968 ACCESSORS(SharedFunctionInfo, script, Object, kScriptOffset) 4970 ACCESSORS(SharedFunctionInfo, script, Object, kScriptOffset)
4969 ACCESSORS(SharedFunctionInfo, debug_info, Object, kDebugInfoOffset) 4971 ACCESSORS(SharedFunctionInfo, debug_info, Object, kDebugInfoOffset)
4970 ACCESSORS(SharedFunctionInfo, inferred_name, String, kInferredNameOffset) 4972 ACCESSORS(SharedFunctionInfo, inferred_name, String, kInferredNameOffset)
4971 SMI_ACCESSORS(SharedFunctionInfo, ast_node_count, kAstNodeCountOffset) 4973 SMI_ACCESSORS(SharedFunctionInfo, ast_node_count, kAstNodeCountOffset)
4972 4974
4973 4975
(...skipping 1661 matching lines...)
6635 } 6637 }
6636 6638
6637 6639
6638 bool TypeFeedbackInfo::matches_inlined_type_change_checksum(int checksum) { 6640 bool TypeFeedbackInfo::matches_inlined_type_change_checksum(int checksum) {
6639 int value = Smi::cast(READ_FIELD(this, kStorage2Offset))->value(); 6641 int value = Smi::cast(READ_FIELD(this, kStorage2Offset))->value();
6640 int mask = (1 << kTypeChangeChecksumBits) - 1; 6642 int mask = (1 << kTypeChangeChecksumBits) - 1;
6641 return InlinedTypeChangeChecksum::decode(value) == (checksum & mask); 6643 return InlinedTypeChangeChecksum::decode(value) == (checksum & mask);
6642 } 6644 }
6643 6645
6644 6646
6645 ACCESSORS(TypeFeedbackInfo, feedback_vector, FixedArray,
6646 kFeedbackVectorOffset)
6647
6648
6649 SMI_ACCESSORS(AliasedArgumentsEntry, aliased_context_slot, kAliasedContextSlot) 6647 SMI_ACCESSORS(AliasedArgumentsEntry, aliased_context_slot, kAliasedContextSlot)
6650 6648
6651 6649
6652 Relocatable::Relocatable(Isolate* isolate) { 6650 Relocatable::Relocatable(Isolate* isolate) {
6653 isolate_ = isolate; 6651 isolate_ = isolate;
6654 prev_ = isolate->relocatable_top(); 6652 prev_ = isolate->relocatable_top();
6655 isolate->set_relocatable_top(this); 6653 isolate->set_relocatable_top(this);
6656 } 6654 }
6657 6655
6658 6656
(...skipping 91 matching lines...)
6750 #undef READ_UINT32_FIELD 6748 #undef READ_UINT32_FIELD
6751 #undef WRITE_UINT32_FIELD 6749 #undef WRITE_UINT32_FIELD
6752 #undef READ_SHORT_FIELD 6750 #undef READ_SHORT_FIELD
6753 #undef WRITE_SHORT_FIELD 6751 #undef WRITE_SHORT_FIELD
6754 #undef READ_BYTE_FIELD 6752 #undef READ_BYTE_FIELD
6755 #undef WRITE_BYTE_FIELD 6753 #undef WRITE_BYTE_FIELD
6756 6754
6757 } } // namespace v8::internal 6755 } } // namespace v8::internal
6758 6756
6759 #endif // V8_OBJECTS_INL_H_ 6757 #endif // V8_OBJECTS_INL_H_
OLDNEW

Powered by Google App Engine