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 2932 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2943 if (string->IsSymbol()) { | 2943 if (string->IsSymbol()) { |
2944 *symbol = string; | 2944 *symbol = string; |
2945 return true; | 2945 return true; |
2946 } | 2946 } |
2947 return symbol_table()->LookupSymbolIfExists(string, symbol); | 2947 return symbol_table()->LookupSymbolIfExists(string, symbol); |
2948 } | 2948 } |
2949 | 2949 |
2950 | 2950 |
2951 #ifdef DEBUG | 2951 #ifdef DEBUG |
2952 void Heap::ZapFromSpace() { | 2952 void Heap::ZapFromSpace() { |
2953 ASSERT(HAS_HEAP_OBJECT_TAG(kFromSpaceZapValue)); | 2953 ASSERT(reinterpret_cast<Object*>(kFromSpaceZapValue)->IsHeapObject()); |
2954 for (Address a = new_space_.FromSpaceLow(); | 2954 for (Address a = new_space_.FromSpaceLow(); |
2955 a < new_space_.FromSpaceHigh(); | 2955 a < new_space_.FromSpaceHigh(); |
2956 a += kPointerSize) { | 2956 a += kPointerSize) { |
2957 Memory::Address_at(a) = kFromSpaceZapValue; | 2957 Memory::Address_at(a) = kFromSpaceZapValue; |
2958 } | 2958 } |
2959 } | 2959 } |
2960 #endif // DEBUG | 2960 #endif // DEBUG |
2961 | 2961 |
2962 | 2962 |
2963 int Heap::IterateRSetRange(Address object_start, | 2963 int Heap::IterateRSetRange(Address object_start, |
(...skipping 962 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3926 #ifdef DEBUG | 3926 #ifdef DEBUG |
3927 bool Heap::GarbageCollectionGreedyCheck() { | 3927 bool Heap::GarbageCollectionGreedyCheck() { |
3928 ASSERT(FLAG_gc_greedy); | 3928 ASSERT(FLAG_gc_greedy); |
3929 if (Bootstrapper::IsActive()) return true; | 3929 if (Bootstrapper::IsActive()) return true; |
3930 if (disallow_allocation_failure()) return true; | 3930 if (disallow_allocation_failure()) return true; |
3931 return CollectGarbage(0, NEW_SPACE); | 3931 return CollectGarbage(0, NEW_SPACE); |
3932 } | 3932 } |
3933 #endif | 3933 #endif |
3934 | 3934 |
3935 } } // namespace v8::internal | 3935 } } // namespace v8::internal |
OLD | NEW |