| 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 402 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 413 #endif // DEBUG | 413 #endif // DEBUG |
| 414 } | 414 } |
| 415 | 415 |
| 416 | 416 |
| 417 void Heap::GarbageCollectionPrologue() { | 417 void Heap::GarbageCollectionPrologue() { |
| 418 isolate_->transcendental_cache()->Clear(); | 418 isolate_->transcendental_cache()->Clear(); |
| 419 ClearJSFunctionResultCaches(); | 419 ClearJSFunctionResultCaches(); |
| 420 gc_count_++; | 420 gc_count_++; |
| 421 unflattened_strings_length_ = 0; | 421 unflattened_strings_length_ = 0; |
| 422 | 422 |
| 423 bool should_enable_code_flushing = FLAG_flush_code; | 423 if (FLAG_flush_code && FLAG_flush_code_incrementally) { |
| 424 #ifdef ENABLE_DEBUGGER_SUPPORT | 424 mark_compact_collector()->EnableCodeFlushing(true); |
| 425 if (isolate_->debug()->IsLoaded() || isolate_->debug()->has_break_points()) { | |
| 426 should_enable_code_flushing = false; | |
| 427 } | 425 } |
| 428 #endif | |
| 429 mark_compact_collector()->EnableCodeFlushing(should_enable_code_flushing); | |
| 430 | 426 |
| 431 #ifdef VERIFY_HEAP | 427 #ifdef VERIFY_HEAP |
| 432 if (FLAG_verify_heap) { | 428 if (FLAG_verify_heap) { |
| 433 Verify(); | 429 Verify(); |
| 434 } | 430 } |
| 435 #endif | 431 #endif |
| 436 | 432 |
| 437 #ifdef DEBUG | 433 #ifdef DEBUG |
| 438 ASSERT(allocation_allowed_ && gc_state_ == NOT_IN_GC); | 434 ASSERT(allocation_allowed_ && gc_state_ == NOT_IN_GC); |
| 439 allow_allocation(false); | 435 allow_allocation(false); |
| (...skipping 6977 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7417 static_cast<int>(object_sizes_last_time_[index])); | 7413 static_cast<int>(object_sizes_last_time_[index])); |
| 7418 FIXED_ARRAY_SUB_INSTANCE_TYPE_LIST(ADJUST_LAST_TIME_OBJECT_COUNT) | 7414 FIXED_ARRAY_SUB_INSTANCE_TYPE_LIST(ADJUST_LAST_TIME_OBJECT_COUNT) |
| 7419 #undef ADJUST_LAST_TIME_OBJECT_COUNT | 7415 #undef ADJUST_LAST_TIME_OBJECT_COUNT |
| 7420 | 7416 |
| 7421 memcpy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); | 7417 memcpy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); |
| 7422 memcpy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); | 7418 memcpy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); |
| 7423 ClearObjectStats(); | 7419 ClearObjectStats(); |
| 7424 } | 7420 } |
| 7425 | 7421 |
| 7426 } } // namespace v8::internal | 7422 } } // namespace v8::internal |
| OLD | NEW |