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

Side by Side Diff: src/heap.cc

Issue 10824079: Use a special EnumLength field to indicate number of valid enum cache values. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comments Created 8 years, 3 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/handles.cc ('k') | src/hydrogen.cc » ('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 2072 matching lines...) Expand 10 before | Expand all | Expand 10 after
2083 map->set_prototype(null_value(), SKIP_WRITE_BARRIER); 2083 map->set_prototype(null_value(), SKIP_WRITE_BARRIER);
2084 map->set_constructor(null_value(), SKIP_WRITE_BARRIER); 2084 map->set_constructor(null_value(), SKIP_WRITE_BARRIER);
2085 map->set_instance_size(instance_size); 2085 map->set_instance_size(instance_size);
2086 map->set_inobject_properties(0); 2086 map->set_inobject_properties(0);
2087 map->set_pre_allocated_property_fields(0); 2087 map->set_pre_allocated_property_fields(0);
2088 map->set_code_cache(empty_fixed_array(), SKIP_WRITE_BARRIER); 2088 map->set_code_cache(empty_fixed_array(), SKIP_WRITE_BARRIER);
2089 map->init_back_pointer(undefined_value()); 2089 map->init_back_pointer(undefined_value());
2090 map->set_unused_property_fields(0); 2090 map->set_unused_property_fields(0);
2091 map->set_bit_field(0); 2091 map->set_bit_field(0);
2092 map->set_bit_field2(1 << Map::kIsExtensible); 2092 map->set_bit_field2(1 << Map::kIsExtensible);
2093 map->set_bit_field3(0); 2093 int bit_field3 = Map::EnumLengthBits::encode(Map::kInvalidEnumCache);
2094 map->set_bit_field3(bit_field3);
2094 map->set_elements_kind(elements_kind); 2095 map->set_elements_kind(elements_kind);
2095 2096
2096 // If the map object is aligned fill the padding area with Smi 0 objects. 2097 // If the map object is aligned fill the padding area with Smi 0 objects.
2097 if (Map::kPadStart < Map::kSize) { 2098 if (Map::kPadStart < Map::kSize) {
2098 memset(reinterpret_cast<byte*>(map) + Map::kPadStart - kHeapObjectTag, 2099 memset(reinterpret_cast<byte*>(map) + Map::kPadStart - kHeapObjectTag,
2099 0, 2100 0,
2100 Map::kSize - Map::kPadStart); 2101 Map::kSize - Map::kPadStart);
2101 } 2102 }
2102 return map; 2103 return map;
2103 } 2104 }
(...skipping 5179 matching lines...) Expand 10 before | Expand all | Expand 10 after
7283 static_cast<int>(object_sizes_last_time_[index])); 7284 static_cast<int>(object_sizes_last_time_[index]));
7284 FIXED_ARRAY_SUB_INSTANCE_TYPE_LIST(ADJUST_LAST_TIME_OBJECT_COUNT) 7285 FIXED_ARRAY_SUB_INSTANCE_TYPE_LIST(ADJUST_LAST_TIME_OBJECT_COUNT)
7285 #undef ADJUST_LAST_TIME_OBJECT_COUNT 7286 #undef ADJUST_LAST_TIME_OBJECT_COUNT
7286 7287
7287 memcpy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); 7288 memcpy(object_counts_last_time_, object_counts_, sizeof(object_counts_));
7288 memcpy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); 7289 memcpy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_));
7289 ClearObjectStats(); 7290 ClearObjectStats();
7290 } 7291 }
7291 7292
7292 } } // namespace v8::internal 7293 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/handles.cc ('k') | src/hydrogen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698