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 3437 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3448 | 3448 |
3449 #ifdef ENABLE_LOGGING_AND_PROFILING | 3449 #ifdef ENABLE_LOGGING_AND_PROFILING |
3450 // This should be called only after initial objects have been created. | 3450 // This should be called only after initial objects have been created. |
3451 ProducerHeapProfile::Setup(); | 3451 ProducerHeapProfile::Setup(); |
3452 #endif | 3452 #endif |
3453 | 3453 |
3454 return true; | 3454 return true; |
3455 } | 3455 } |
3456 | 3456 |
3457 | 3457 |
3458 void Heap::SetStackLimit(intptr_t limit) { | 3458 void Heap::SetStackLimits() { |
3459 // On 64 bit machines, pointers are generally out of range of Smis. We write | 3459 // On 64 bit machines, pointers are generally out of range of Smis. We write |
3460 // something that looks like an out of range Smi to the GC. | 3460 // something that looks like an out of range Smi to the GC. |
3461 | 3461 |
3462 // Set up the special root array entry containing the stack guard. | 3462 // Set up the special root array entries containing the stack limits. |
3463 // This is actually an address, but the tag makes the GC ignore it. | 3463 // These are actually addresses, but the tag makes the GC ignore it. |
3464 roots_[kStackLimitRootIndex] = | 3464 roots_[kStackLimitRootIndex] = |
3465 reinterpret_cast<Object*>((limit & ~kSmiTagMask) | kSmiTag); | 3465 reinterpret_cast<Object*>( |
| 3466 (StackGuard::jslimit() & ~kSmiTagMask) | kSmiTag); |
| 3467 roots_[kRealStackLimitRootIndex] = |
| 3468 reinterpret_cast<Object*>( |
| 3469 (StackGuard::real_jslimit() & ~kSmiTagMask) | kSmiTag); |
3466 } | 3470 } |
3467 | 3471 |
3468 | 3472 |
3469 void Heap::TearDown() { | 3473 void Heap::TearDown() { |
3470 GlobalHandles::TearDown(); | 3474 GlobalHandles::TearDown(); |
3471 | 3475 |
3472 new_space_.TearDown(); | 3476 new_space_.TearDown(); |
3473 | 3477 |
3474 if (old_pointer_space_ != NULL) { | 3478 if (old_pointer_space_ != NULL) { |
3475 old_pointer_space_->TearDown(); | 3479 old_pointer_space_->TearDown(); |
(...skipping 554 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4030 for (int i = 0; i < kNumberOfCaches; i++) { | 4034 for (int i = 0; i < kNumberOfCaches; i++) { |
4031 if (caches_[i] != NULL) { | 4035 if (caches_[i] != NULL) { |
4032 delete caches_[i]; | 4036 delete caches_[i]; |
4033 caches_[i] = NULL; | 4037 caches_[i] = NULL; |
4034 } | 4038 } |
4035 } | 4039 } |
4036 } | 4040 } |
4037 | 4041 |
4038 | 4042 |
4039 } } // namespace v8::internal | 4043 } } // namespace v8::internal |
OLD | NEW |