Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(143)

Side by Side Diff: src/heap.cc

Issue 7282026: Introduce code flushing of RegExp code. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 9 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 initial_semispace_size_(512*KB), 90 initial_semispace_size_(512*KB),
91 max_old_generation_size_(512*MB), 91 max_old_generation_size_(512*MB),
92 max_executable_size_(128*MB), 92 max_executable_size_(128*MB),
93 code_range_size_(0), 93 code_range_size_(0),
94 #endif 94 #endif
95 // Variables set based on semispace_size_ and old_generation_size_ in 95 // Variables set based on semispace_size_ and old_generation_size_ in
96 // ConfigureHeap (survived_since_last_expansion_, external_allocation_limit_) 96 // ConfigureHeap (survived_since_last_expansion_, external_allocation_limit_)
97 // Will be 4 * reserved_semispace_size_ to ensure that young 97 // Will be 4 * reserved_semispace_size_ to ensure that young
98 // generation can be aligned to its size. 98 // generation can be aligned to its size.
99 survived_since_last_expansion_(0), 99 survived_since_last_expansion_(0),
100 sweep_generation_(0),
100 always_allocate_scope_depth_(0), 101 always_allocate_scope_depth_(0),
101 linear_allocation_scope_depth_(0), 102 linear_allocation_scope_depth_(0),
102 contexts_disposed_(0), 103 contexts_disposed_(0),
103 new_space_(this), 104 new_space_(this),
104 old_pointer_space_(NULL), 105 old_pointer_space_(NULL),
105 old_data_space_(NULL), 106 old_data_space_(NULL),
106 code_space_(NULL), 107 code_space_(NULL),
107 map_space_(NULL), 108 map_space_(NULL),
108 cell_space_(NULL), 109 cell_space_(NULL),
109 lo_space_(NULL), 110 lo_space_(NULL),
(...skipping 625 matching lines...) Expand 10 before | Expand all | Expand 10 after
735 } 736 }
736 } 737 }
737 738
738 EnsureFromSpaceIsCommitted(); 739 EnsureFromSpaceIsCommitted();
739 740
740 int start_new_space_size = Heap::new_space()->SizeAsInt(); 741 int start_new_space_size = Heap::new_space()->SizeAsInt();
741 742
742 if (collector == MARK_COMPACTOR) { 743 if (collector == MARK_COMPACTOR) {
743 // Perform mark-sweep with optional compaction. 744 // Perform mark-sweep with optional compaction.
744 MarkCompact(tracer); 745 MarkCompact(tracer);
745 746 sweep_generation_++;
746 bool high_survival_rate_during_scavenges = IsHighSurvivalRate() && 747 bool high_survival_rate_during_scavenges = IsHighSurvivalRate() &&
747 IsStableOrIncreasingSurvivalTrend(); 748 IsStableOrIncreasingSurvivalTrend();
748 749
749 UpdateSurvivalRateTrend(start_new_space_size); 750 UpdateSurvivalRateTrend(start_new_space_size);
750 751
751 intptr_t old_gen_size = PromotedSpaceSize(); 752 intptr_t old_gen_size = PromotedSpaceSize();
752 old_gen_promotion_limit_ = 753 old_gen_promotion_limit_ =
753 old_gen_size + Max(kMinimumPromotionLimit, old_gen_size / 3); 754 old_gen_size + Max(kMinimumPromotionLimit, old_gen_size / 3);
754 old_gen_allocation_limit_ = 755 old_gen_allocation_limit_ =
755 old_gen_size + Max(kMinimumAllocationLimit, old_gen_size / 2); 756 old_gen_size + Max(kMinimumAllocationLimit, old_gen_size / 2);
(...skipping 542 matching lines...) Expand 10 before | Expand all | Expand 10 after
1298 template VisitSpecialized<Context::kSize>); 1299 template VisitSpecialized<Context::kSize>);
1299 1300
1300 table_.Register(kVisitConsString, 1301 table_.Register(kVisitConsString,
1301 &ObjectEvacuationStrategy<POINTER_OBJECT>:: 1302 &ObjectEvacuationStrategy<POINTER_OBJECT>::
1302 template VisitSpecialized<ConsString::kSize>); 1303 template VisitSpecialized<ConsString::kSize>);
1303 1304
1304 table_.Register(kVisitSharedFunctionInfo, 1305 table_.Register(kVisitSharedFunctionInfo,
1305 &ObjectEvacuationStrategy<POINTER_OBJECT>:: 1306 &ObjectEvacuationStrategy<POINTER_OBJECT>::
1306 template VisitSpecialized<SharedFunctionInfo::kSize>); 1307 template VisitSpecialized<SharedFunctionInfo::kSize>);
1307 1308
1309 table_.Register(kVisitJSRegExp,
1310 &ObjectEvacuationStrategy<POINTER_OBJECT>::
1311 Visit);
1312
1313
1308 table_.Register(kVisitJSFunction, 1314 table_.Register(kVisitJSFunction,
1309 &ObjectEvacuationStrategy<POINTER_OBJECT>:: 1315 &ObjectEvacuationStrategy<POINTER_OBJECT>::
1310 template VisitSpecialized<JSFunction::kSize>); 1316 template VisitSpecialized<JSFunction::kSize>);
1311 1317
1312 table_.RegisterSpecializations<ObjectEvacuationStrategy<DATA_OBJECT>, 1318 table_.RegisterSpecializations<ObjectEvacuationStrategy<DATA_OBJECT>,
1313 kVisitDataObject, 1319 kVisitDataObject,
1314 kVisitDataObjectGeneric>(); 1320 kVisitDataObjectGeneric>();
1315 1321
1316 table_.RegisterSpecializations<ObjectEvacuationStrategy<POINTER_OBJECT>, 1322 table_.RegisterSpecializations<ObjectEvacuationStrategy<POINTER_OBJECT>,
1317 kVisitJSObject, 1323 kVisitJSObject,
(...skipping 4720 matching lines...) Expand 10 before | Expand all | Expand 10 after
6038 } 6044 }
6039 6045
6040 6046
6041 void ExternalStringTable::TearDown() { 6047 void ExternalStringTable::TearDown() {
6042 new_space_strings_.Free(); 6048 new_space_strings_.Free();
6043 old_space_strings_.Free(); 6049 old_space_strings_.Free();
6044 } 6050 }
6045 6051
6046 6052
6047 } } // namespace v8::internal 6053 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/heap.h ('k') | src/ia32/code-stubs-ia32.cc » ('j') | src/objects-debug.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698