| 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 388 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 399 #endif // DEBUG | 399 #endif // DEBUG |
| 400 } | 400 } |
| 401 | 401 |
| 402 | 402 |
| 403 void Heap::GarbageCollectionPrologue() { | 403 void Heap::GarbageCollectionPrologue() { |
| 404 isolate_->transcendental_cache()->Clear(); | 404 isolate_->transcendental_cache()->Clear(); |
| 405 ClearJSFunctionResultCaches(); | 405 ClearJSFunctionResultCaches(); |
| 406 gc_count_++; | 406 gc_count_++; |
| 407 unflattened_strings_length_ = 0; | 407 unflattened_strings_length_ = 0; |
| 408 | 408 |
| 409 bool should_enable_code_flushing = FLAG_flush_code; |
| 410 #ifdef ENABLE_DEBUGGER_SUPPORT |
| 411 if (isolate_->debug()->IsLoaded() || isolate_->debug()->has_break_points()) { |
| 412 should_enable_code_flushing = false; |
| 413 } |
| 414 #endif |
| 415 mark_compact_collector()->EnableCodeFlushing(should_enable_code_flushing); |
| 416 |
| 409 #ifdef VERIFY_HEAP | 417 #ifdef VERIFY_HEAP |
| 410 if (FLAG_verify_heap) { | 418 if (FLAG_verify_heap) { |
| 411 Verify(); | 419 Verify(); |
| 412 } | 420 } |
| 413 #endif | 421 #endif |
| 414 | 422 |
| 415 #ifdef DEBUG | 423 #ifdef DEBUG |
| 416 ASSERT(allocation_allowed_ && gc_state_ == NOT_IN_GC); | 424 ASSERT(allocation_allowed_ && gc_state_ == NOT_IN_GC); |
| 417 allow_allocation(false); | 425 allow_allocation(false); |
| 418 | 426 |
| (...skipping 6921 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7340 static_cast<int>(object_sizes_last_time_[index])); | 7348 static_cast<int>(object_sizes_last_time_[index])); |
| 7341 FIXED_ARRAY_SUB_INSTANCE_TYPE_LIST(ADJUST_LAST_TIME_OBJECT_COUNT) | 7349 FIXED_ARRAY_SUB_INSTANCE_TYPE_LIST(ADJUST_LAST_TIME_OBJECT_COUNT) |
| 7342 #undef ADJUST_LAST_TIME_OBJECT_COUNT | 7350 #undef ADJUST_LAST_TIME_OBJECT_COUNT |
| 7343 | 7351 |
| 7344 memcpy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); | 7352 memcpy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); |
| 7345 memcpy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); | 7353 memcpy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); |
| 7346 ClearObjectStats(); | 7354 ClearObjectStats(); |
| 7347 } | 7355 } |
| 7348 | 7356 |
| 7349 } } // namespace v8::internal | 7357 } } // namespace v8::internal |
| OLD | NEW |