Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(892)

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

Issue 14996004: Track heap objects. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/objects.cc ('k') | src/property-details.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 3590 matching lines...) Expand 10 before | Expand all | Expand 10 after
3601 bool Map::CanBeDeprecated() { 3601 bool Map::CanBeDeprecated() {
3602 int descriptor = LastAdded(); 3602 int descriptor = LastAdded();
3603 for (int i = 0; i <= descriptor; i++) { 3603 for (int i = 0; i <= descriptor; i++) {
3604 PropertyDetails details = instance_descriptors()->GetDetails(i); 3604 PropertyDetails details = instance_descriptors()->GetDetails(i);
3605 if (FLAG_track_fields && details.representation().IsSmi()) { 3605 if (FLAG_track_fields && details.representation().IsSmi()) {
3606 return true; 3606 return true;
3607 } 3607 }
3608 if (FLAG_track_double_fields && details.representation().IsDouble()) { 3608 if (FLAG_track_double_fields && details.representation().IsDouble()) {
3609 return true; 3609 return true;
3610 } 3610 }
3611 if (FLAG_track_heap_object_fields &&
3612 details.representation().IsHeapObject()) {
3613 return true;
3614 }
3611 } 3615 }
3612 return false; 3616 return false;
3613 } 3617 }
3614 3618
3615 3619
3616 Handle<Map> Map::CurrentMapForDeprecated(Handle<Map> map) { 3620 Handle<Map> Map::CurrentMapForDeprecated(Handle<Map> map) {
3617 if (!map->is_deprecated()) return map; 3621 if (!map->is_deprecated()) return map;
3618 return GeneralizeRepresentation(map, 0, Representation::Smi()); 3622 return GeneralizeRepresentation(map, 0, Representation::Smi());
3619 } 3623 }
3620 3624
(...skipping 2593 matching lines...) Expand 10 before | Expand all | Expand 10 after
6214 #undef WRITE_UINT32_FIELD 6218 #undef WRITE_UINT32_FIELD
6215 #undef READ_SHORT_FIELD 6219 #undef READ_SHORT_FIELD
6216 #undef WRITE_SHORT_FIELD 6220 #undef WRITE_SHORT_FIELD
6217 #undef READ_BYTE_FIELD 6221 #undef READ_BYTE_FIELD
6218 #undef WRITE_BYTE_FIELD 6222 #undef WRITE_BYTE_FIELD
6219 6223
6220 6224
6221 } } // namespace v8::internal 6225 } } // namespace v8::internal
6222 6226
6223 #endif // V8_OBJECTS_INL_H_ 6227 #endif // V8_OBJECTS_INL_H_
OLDNEW
« no previous file with comments | « src/objects.cc ('k') | src/property-details.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698