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

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 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 initial_semispace_size_(512*KB), 89 initial_semispace_size_(512*KB),
90 max_old_generation_size_(512*MB), 90 max_old_generation_size_(512*MB),
91 max_executable_size_(128*MB), 91 max_executable_size_(128*MB),
92 code_range_size_(0), 92 code_range_size_(0),
93 #endif 93 #endif
94 // Variables set based on semispace_size_ and old_generation_size_ in 94 // Variables set based on semispace_size_ and old_generation_size_ in
95 // ConfigureHeap (survived_since_last_expansion_, external_allocation_limit_) 95 // ConfigureHeap (survived_since_last_expansion_, external_allocation_limit_)
96 // Will be 4 * reserved_semispace_size_ to ensure that young 96 // Will be 4 * reserved_semispace_size_ to ensure that young
97 // generation can be aligned to its size. 97 // generation can be aligned to its size.
98 survived_since_last_expansion_(0), 98 survived_since_last_expansion_(0),
99 sweep_generation_(0),
99 always_allocate_scope_depth_(0), 100 always_allocate_scope_depth_(0),
100 linear_allocation_scope_depth_(0), 101 linear_allocation_scope_depth_(0),
101 contexts_disposed_(0), 102 contexts_disposed_(0),
102 new_space_(this), 103 new_space_(this),
103 old_pointer_space_(NULL), 104 old_pointer_space_(NULL),
104 old_data_space_(NULL), 105 old_data_space_(NULL),
105 code_space_(NULL), 106 code_space_(NULL),
106 map_space_(NULL), 107 map_space_(NULL),
107 cell_space_(NULL), 108 cell_space_(NULL),
108 lo_space_(NULL), 109 lo_space_(NULL),
(...skipping 625 matching lines...) Expand 10 before | Expand all | Expand 10 after
734 } 735 }
735 } 736 }
736 737
737 EnsureFromSpaceIsCommitted(); 738 EnsureFromSpaceIsCommitted();
738 739
739 int start_new_space_size = Heap::new_space()->SizeAsInt(); 740 int start_new_space_size = Heap::new_space()->SizeAsInt();
740 741
741 if (collector == MARK_COMPACTOR) { 742 if (collector == MARK_COMPACTOR) {
742 // Perform mark-sweep with optional compaction. 743 // Perform mark-sweep with optional compaction.
743 MarkCompact(tracer); 744 MarkCompact(tracer);
744 745 sweep_generation_++;
745 bool high_survival_rate_during_scavenges = IsHighSurvivalRate() && 746 bool high_survival_rate_during_scavenges = IsHighSurvivalRate() &&
746 IsStableOrIncreasingSurvivalTrend(); 747 IsStableOrIncreasingSurvivalTrend();
747 748
748 UpdateSurvivalRateTrend(start_new_space_size); 749 UpdateSurvivalRateTrend(start_new_space_size);
749 750
750 intptr_t old_gen_size = PromotedSpaceSize(); 751 intptr_t old_gen_size = PromotedSpaceSize();
751 old_gen_promotion_limit_ = 752 old_gen_promotion_limit_ =
752 old_gen_size + Max(kMinimumPromotionLimit, old_gen_size / 3); 753 old_gen_size + Max(kMinimumPromotionLimit, old_gen_size / 3);
753 old_gen_allocation_limit_ = 754 old_gen_allocation_limit_ =
754 old_gen_size + Max(kMinimumAllocationLimit, old_gen_size / 2); 755 old_gen_size + Max(kMinimumAllocationLimit, old_gen_size / 2);
(...skipping 542 matching lines...) Expand 10 before | Expand all | Expand 10 after
1297 template VisitSpecialized<Context::kSize>); 1298 template VisitSpecialized<Context::kSize>);
1298 1299
1299 table_.Register(kVisitConsString, 1300 table_.Register(kVisitConsString,
1300 &ObjectEvacuationStrategy<POINTER_OBJECT>:: 1301 &ObjectEvacuationStrategy<POINTER_OBJECT>::
1301 template VisitSpecialized<ConsString::kSize>); 1302 template VisitSpecialized<ConsString::kSize>);
1302 1303
1303 table_.Register(kVisitSharedFunctionInfo, 1304 table_.Register(kVisitSharedFunctionInfo,
1304 &ObjectEvacuationStrategy<POINTER_OBJECT>:: 1305 &ObjectEvacuationStrategy<POINTER_OBJECT>::
1305 template VisitSpecialized<SharedFunctionInfo::kSize>); 1306 template VisitSpecialized<SharedFunctionInfo::kSize>);
1306 1307
1308 table_.Register(kVisitJSRegExp,
1309 &ObjectEvacuationStrategy<POINTER_OBJECT>::
1310 Visit);
1311
1312
1307 table_.Register(kVisitJSFunction, 1313 table_.Register(kVisitJSFunction,
1308 &ObjectEvacuationStrategy<POINTER_OBJECT>:: 1314 &ObjectEvacuationStrategy<POINTER_OBJECT>::
1309 template VisitSpecialized<JSFunction::kSize>); 1315 template VisitSpecialized<JSFunction::kSize>);
1310 1316
1311 table_.RegisterSpecializations<ObjectEvacuationStrategy<DATA_OBJECT>, 1317 table_.RegisterSpecializations<ObjectEvacuationStrategy<DATA_OBJECT>,
1312 kVisitDataObject, 1318 kVisitDataObject,
1313 kVisitDataObjectGeneric>(); 1319 kVisitDataObjectGeneric>();
1314 1320
1315 table_.RegisterSpecializations<ObjectEvacuationStrategy<POINTER_OBJECT>, 1321 table_.RegisterSpecializations<ObjectEvacuationStrategy<POINTER_OBJECT>,
1316 kVisitJSObject, 1322 kVisitJSObject,
(...skipping 4718 matching lines...) Expand 10 before | Expand all | Expand 10 after
6035 } 6041 }
6036 6042
6037 6043
6038 void ExternalStringTable::TearDown() { 6044 void ExternalStringTable::TearDown() {
6039 new_space_strings_.Free(); 6045 new_space_strings_.Free();
6040 old_space_strings_.Free(); 6046 old_space_strings_.Free();
6041 } 6047 }
6042 6048
6043 6049
6044 } } // namespace v8::internal 6050 } } // namespace v8::internal
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698