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 1198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1209 // If the map object is aligned fill the padding area with Smi 0 objects. | 1209 // If the map object is aligned fill the padding area with Smi 0 objects. |
1210 if (Map::kPadStart < Map::kSize) { | 1210 if (Map::kPadStart < Map::kSize) { |
1211 memset(reinterpret_cast<byte*>(map) + Map::kPadStart - kHeapObjectTag, | 1211 memset(reinterpret_cast<byte*>(map) + Map::kPadStart - kHeapObjectTag, |
1212 0, | 1212 0, |
1213 Map::kSize - Map::kPadStart); | 1213 Map::kSize - Map::kPadStart); |
1214 } | 1214 } |
1215 return map; | 1215 return map; |
1216 } | 1216 } |
1217 | 1217 |
1218 | 1218 |
| 1219 Object* Heap::AllocateCodeCache() { |
| 1220 Object* result = AllocateStruct(CODE_CACHE_TYPE); |
| 1221 if (result->IsFailure()) return result; |
| 1222 CodeCache* code_cache = CodeCache::cast(result); |
| 1223 code_cache->set_default_cache(empty_fixed_array()); |
| 1224 code_cache->set_normal_type_cache(undefined_value()); |
| 1225 return code_cache; |
| 1226 } |
| 1227 |
| 1228 |
1219 const Heap::StringTypeTable Heap::string_type_table[] = { | 1229 const Heap::StringTypeTable Heap::string_type_table[] = { |
1220 #define STRING_TYPE_ELEMENT(type, size, name, camel_name) \ | 1230 #define STRING_TYPE_ELEMENT(type, size, name, camel_name) \ |
1221 {type, size, k##camel_name##MapRootIndex}, | 1231 {type, size, k##camel_name##MapRootIndex}, |
1222 STRING_TYPE_LIST(STRING_TYPE_ELEMENT) | 1232 STRING_TYPE_LIST(STRING_TYPE_ELEMENT) |
1223 #undef STRING_TYPE_ELEMENT | 1233 #undef STRING_TYPE_ELEMENT |
1224 }; | 1234 }; |
1225 | 1235 |
1226 | 1236 |
1227 const Heap::ConstantSymbolTable Heap::constant_symbol_table[] = { | 1237 const Heap::ConstantSymbolTable Heap::constant_symbol_table[] = { |
1228 #define CONSTANT_SYMBOL_ELEMENT(name, contents) \ | 1238 #define CONSTANT_SYMBOL_ELEMENT(name, contents) \ |
(...skipping 3005 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4234 void ExternalStringTable::TearDown() { | 4244 void ExternalStringTable::TearDown() { |
4235 new_space_strings_.Free(); | 4245 new_space_strings_.Free(); |
4236 old_space_strings_.Free(); | 4246 old_space_strings_.Free(); |
4237 } | 4247 } |
4238 | 4248 |
4239 | 4249 |
4240 List<Object*> ExternalStringTable::new_space_strings_; | 4250 List<Object*> ExternalStringTable::new_space_strings_; |
4241 List<Object*> ExternalStringTable::old_space_strings_; | 4251 List<Object*> ExternalStringTable::old_space_strings_; |
4242 | 4252 |
4243 } } // namespace v8::internal | 4253 } } // namespace v8::internal |
OLD | NEW |