| OLD | NEW |
| 1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 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 1186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1197 obj = AllocateRawAsciiString(0, TENURED); | 1197 obj = AllocateRawAsciiString(0, TENURED); |
| 1198 if (obj->IsFailure()) return false; | 1198 if (obj->IsFailure()) return false; |
| 1199 empty_string_ = String::cast(obj); | 1199 empty_string_ = String::cast(obj); |
| 1200 | 1200 |
| 1201 #define SYMBOL_INITIALIZE(name, string) \ | 1201 #define SYMBOL_INITIALIZE(name, string) \ |
| 1202 obj = LookupAsciiSymbol(string); \ | 1202 obj = LookupAsciiSymbol(string); \ |
| 1203 if (obj->IsFailure()) return false; \ | 1203 if (obj->IsFailure()) return false; \ |
| 1204 (name##_) = String::cast(obj); | 1204 (name##_) = String::cast(obj); |
| 1205 SYMBOL_LIST(SYMBOL_INITIALIZE) | 1205 SYMBOL_LIST(SYMBOL_INITIALIZE) |
| 1206 #undef SYMBOL_INITIALIZE | 1206 #undef SYMBOL_INITIALIZE |
| 1207 | 1207 |
| 1208 // Allocate the hidden symbol which is used to identify the hidden properties | 1208 // Allocate the hidden symbol which is used to identify the hidden properties |
| 1209 // in JSObjects. The hash code has a special value so that it will not match | 1209 // in JSObjects. The hash code has a special value so that it will not match |
| 1210 // the empty string when searching for the property. It cannot be part of the | 1210 // the empty string when searching for the property. It cannot be part of the |
| 1211 // SYMBOL_LIST because it needs to be allocated manually with the special | 1211 // SYMBOL_LIST because it needs to be allocated manually with the special |
| 1212 // hash code in place. The hash code for the hidden_symbol is zero to ensure | 1212 // hash code in place. The hash code for the hidden_symbol is zero to ensure |
| 1213 // that it will always be at the first entry in property descriptors. | 1213 // that it will always be at the first entry in property descriptors. |
| 1214 obj = AllocateSymbol(CStrVector(""), 0, String::kHashComputedMask); | 1214 obj = AllocateSymbol(CStrVector(""), 0, String::kHashComputedMask); |
| 1215 if (obj->IsFailure()) return false; | 1215 if (obj->IsFailure()) return false; |
| 1216 hidden_symbol_ = String::cast(obj); | 1216 hidden_symbol_ = String::cast(obj); |
| 1217 | 1217 |
| (...skipping 2108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3326 #ifdef DEBUG | 3326 #ifdef DEBUG |
| 3327 bool Heap::GarbageCollectionGreedyCheck() { | 3327 bool Heap::GarbageCollectionGreedyCheck() { |
| 3328 ASSERT(FLAG_gc_greedy); | 3328 ASSERT(FLAG_gc_greedy); |
| 3329 if (Bootstrapper::IsActive()) return true; | 3329 if (Bootstrapper::IsActive()) return true; |
| 3330 if (disallow_allocation_failure()) return true; | 3330 if (disallow_allocation_failure()) return true; |
| 3331 return CollectGarbage(0, NEW_SPACE); | 3331 return CollectGarbage(0, NEW_SPACE); |
| 3332 } | 3332 } |
| 3333 #endif | 3333 #endif |
| 3334 | 3334 |
| 3335 } } // namespace v8::internal | 3335 } } // namespace v8::internal |
| OLD | NEW |