| OLD | NEW |
| 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 2695 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2706 roots_[constant_symbol_table[i].index] = String::cast(obj); | 2706 roots_[constant_symbol_table[i].index] = String::cast(obj); |
| 2707 } | 2707 } |
| 2708 | 2708 |
| 2709 // Allocate the hidden symbol which is used to identify the hidden properties | 2709 // Allocate the hidden symbol which is used to identify the hidden properties |
| 2710 // in JSObjects. The hash code has a special value so that it will not match | 2710 // in JSObjects. The hash code has a special value so that it will not match |
| 2711 // the empty string when searching for the property. It cannot be part of the | 2711 // the empty string when searching for the property. It cannot be part of the |
| 2712 // loop above because it needs to be allocated manually with the special | 2712 // loop above because it needs to be allocated manually with the special |
| 2713 // hash code in place. The hash code for the hidden_symbol is zero to ensure | 2713 // hash code in place. The hash code for the hidden_symbol is zero to ensure |
| 2714 // that it will always be at the first entry in property descriptors. | 2714 // that it will always be at the first entry in property descriptors. |
| 2715 { MaybeObject* maybe_obj = | 2715 { MaybeObject* maybe_obj = |
| 2716 AllocateSymbol(CStrVector(""), 0, String::kZeroHash); | 2716 AllocateSymbol(CStrVector(""), 0, String::kEmptyStringHash); |
| 2717 if (!maybe_obj->ToObject(&obj)) return false; | 2717 if (!maybe_obj->ToObject(&obj)) return false; |
| 2718 } | 2718 } |
| 2719 hidden_symbol_ = String::cast(obj); | 2719 hidden_symbol_ = String::cast(obj); |
| 2720 | 2720 |
| 2721 // Allocate the foreign for __proto__. | 2721 // Allocate the foreign for __proto__. |
| 2722 { MaybeObject* maybe_obj = | 2722 { MaybeObject* maybe_obj = |
| 2723 AllocateForeign((Address) &Accessors::ObjectPrototype); | 2723 AllocateForeign((Address) &Accessors::ObjectPrototype); |
| 2724 if (!maybe_obj->ToObject(&obj)) return false; | 2724 if (!maybe_obj->ToObject(&obj)) return false; |
| 2725 } | 2725 } |
| 2726 set_prototype_accessors(Foreign::cast(obj)); | 2726 set_prototype_accessors(Foreign::cast(obj)); |
| (...skipping 4611 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7338 static_cast<int>(object_sizes_last_time_[index])); | 7338 static_cast<int>(object_sizes_last_time_[index])); |
| 7339 FIXED_ARRAY_SUB_INSTANCE_TYPE_LIST(ADJUST_LAST_TIME_OBJECT_COUNT) | 7339 FIXED_ARRAY_SUB_INSTANCE_TYPE_LIST(ADJUST_LAST_TIME_OBJECT_COUNT) |
| 7340 #undef ADJUST_LAST_TIME_OBJECT_COUNT | 7340 #undef ADJUST_LAST_TIME_OBJECT_COUNT |
| 7341 | 7341 |
| 7342 memcpy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); | 7342 memcpy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); |
| 7343 memcpy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); | 7343 memcpy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); |
| 7344 ClearObjectStats(); | 7344 ClearObjectStats(); |
| 7345 } | 7345 } |
| 7346 | 7346 |
| 7347 } } // namespace v8::internal | 7347 } } // namespace v8::internal |
| OLD | NEW |