| OLD | NEW |
| 1 // Copyright 2009 the V8 project authors. All rights reserved. | 1 // Copyright 2009 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 1079 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1090 map->set_prototype(null_value()); | 1090 map->set_prototype(null_value()); |
| 1091 map->set_constructor(null_value()); | 1091 map->set_constructor(null_value()); |
| 1092 map->set_instance_size(instance_size); | 1092 map->set_instance_size(instance_size); |
| 1093 map->set_inobject_properties(0); | 1093 map->set_inobject_properties(0); |
| 1094 map->set_pre_allocated_property_fields(0); | 1094 map->set_pre_allocated_property_fields(0); |
| 1095 map->set_instance_descriptors(empty_descriptor_array()); | 1095 map->set_instance_descriptors(empty_descriptor_array()); |
| 1096 map->set_code_cache(empty_fixed_array()); | 1096 map->set_code_cache(empty_fixed_array()); |
| 1097 map->set_unused_property_fields(0); | 1097 map->set_unused_property_fields(0); |
| 1098 map->set_bit_field(0); | 1098 map->set_bit_field(0); |
| 1099 map->set_bit_field2(0); | 1099 map->set_bit_field2(0); |
| 1100 |
| 1101 // If the map object is aligned fill the padding area with Smi 0 objects. |
| 1102 if (Map::kPadStart < Map::kSize) { |
| 1103 memset(reinterpret_cast<byte*>(map) + Map::kPadStart - kHeapObjectTag, |
| 1104 0, |
| 1105 Map::kSize - Map::kPadStart); |
| 1106 } |
| 1100 return map; | 1107 return map; |
| 1101 } | 1108 } |
| 1102 | 1109 |
| 1103 | 1110 |
| 1104 const Heap::StringTypeTable Heap::string_type_table[] = { | 1111 const Heap::StringTypeTable Heap::string_type_table[] = { |
| 1105 #define STRING_TYPE_ELEMENT(type, size, name, camel_name) \ | 1112 #define STRING_TYPE_ELEMENT(type, size, name, camel_name) \ |
| 1106 {type, size, k##camel_name##MapRootIndex}, | 1113 {type, size, k##camel_name##MapRootIndex}, |
| 1107 STRING_TYPE_LIST(STRING_TYPE_ELEMENT) | 1114 STRING_TYPE_LIST(STRING_TYPE_ELEMENT) |
| 1108 #undef STRING_TYPE_ELEMENT | 1115 #undef STRING_TYPE_ELEMENT |
| 1109 }; | 1116 }; |
| (...skipping 2954 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4064 for (int i = 0; i < kNumberOfCaches; i++) { | 4071 for (int i = 0; i < kNumberOfCaches; i++) { |
| 4065 if (caches_[i] != NULL) { | 4072 if (caches_[i] != NULL) { |
| 4066 delete caches_[i]; | 4073 delete caches_[i]; |
| 4067 caches_[i] = NULL; | 4074 caches_[i] = NULL; |
| 4068 } | 4075 } |
| 4069 } | 4076 } |
| 4070 } | 4077 } |
| 4071 | 4078 |
| 4072 | 4079 |
| 4073 } } // namespace v8::internal | 4080 } } // namespace v8::internal |
| OLD | NEW |