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

Unified Diff: src/mark-compact.cc

Issue 12225099: Remove prototype checks for leaf maps in optimized code. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Address comments. Created 7 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: src/mark-compact.cc
diff --git a/src/mark-compact.cc b/src/mark-compact.cc
index 32516845dfdef73a30032fdf179127097a71ca52..83cbe78d871efdab599db89e788d863524c3d5b4 100644
--- a/src/mark-compact.cc
+++ b/src/mark-compact.cc
@@ -2369,9 +2369,8 @@ void MarkCompactCollector::ClearNonLiveMapTransitions(Map* map,
void MarkCompactCollector::ClearAndDeoptimizeDependentCodes(Map* map) {
AssertNoAllocation no_allocation_scope;
DependentCodes* codes = map->dependent_codes();
- DependentCodes::GroupStartIndexes starts;
- codes->ComputeGroupStartIndexes(starts);
- int number_of_codes = starts[DependentCodes::kGroupCount];
+ DependentCodes::GroupStartIndexes starts(codes);
+ int number_of_codes = starts.at(DependentCodes::kGroupCount);
if (number_of_codes == 0) return;
for (int i = 0; i < number_of_codes; i++) {
Code* code = codes->code_at(i);
@@ -2387,15 +2386,14 @@ void MarkCompactCollector::ClearAndDeoptimizeDependentCodes(Map* map) {
void MarkCompactCollector::ClearNonLiveDependentCodes(Map* map) {
AssertNoAllocation no_allocation_scope;
DependentCodes* codes = map->dependent_codes();
- DependentCodes::GroupStartIndexes starts;
- codes->ComputeGroupStartIndexes(starts);
- int number_of_codes = starts[DependentCodes::kGroupCount];
+ DependentCodes::GroupStartIndexes starts(codes);
+ int number_of_codes = starts.at(DependentCodes::kGroupCount);
if (number_of_codes == 0) return;
int new_number_of_codes = 0;
// Go through all groups, remove dead codes and compact.
for (int g = 0; g < DependentCodes::kGroupCount; g++) {
int group_number_of_codes = 0;
- for (int i = starts[g]; i < starts[g + 1]; i++) {
+ for (int i = starts.at(g); i < starts.at(g + 1); i++) {
Code* code = codes->code_at(i);
if (IsMarked(code) && !code->marked_for_deoptimization()) {
if (new_number_of_codes + group_number_of_codes != i) {

Powered by Google App Engine
This is Rietveld 408576698