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

Side by Side Diff: src/lithium-allocator.cc

Issue 12040052: Fix bug in edge case in populating PointerMaps (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 11 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 1400 matching lines...) Expand 10 before | Expand all | Expand 10 after
1411 int safe_point = map->lithium_position(); 1411 int safe_point = map->lithium_position();
1412 1412
1413 // The safe points are sorted so we can stop searching here. 1413 // The safe points are sorted so we can stop searching here.
1414 if (safe_point - 1 > end) break; 1414 if (safe_point - 1 > end) break;
1415 1415
1416 // Advance to the next active range that covers the current 1416 // Advance to the next active range that covers the current
1417 // safe point position. 1417 // safe point position.
1418 LifetimePosition safe_point_pos = 1418 LifetimePosition safe_point_pos =
1419 LifetimePosition::FromInstructionIndex(safe_point); 1419 LifetimePosition::FromInstructionIndex(safe_point);
1420 LiveRange* cur = range; 1420 LiveRange* cur = range;
1421 while (cur != NULL && !cur->Covers(safe_point_pos.PrevInstruction())) { 1421 while (cur != NULL && !cur->Covers(safe_point_pos)) {
1422 cur = cur->next(); 1422 cur = cur->next();
1423 } 1423 }
1424 if (cur == NULL) continue; 1424 if (cur == NULL) continue;
1425 1425
1426 // Check if the live range is spilled and the safe point is after 1426 // Check if the live range is spilled and the safe point is after
1427 // the spill position. 1427 // the spill position.
1428 if (range->HasAllocatedSpillOperand() && 1428 if (range->HasAllocatedSpillOperand() &&
1429 safe_point >= range->spill_start_index()) { 1429 safe_point >= range->spill_start_index()) {
1430 TraceAlloc("Pointer for range %d (spilled at %d) at safe point %d\n", 1430 TraceAlloc("Pointer for range %d (spilled at %d) at safe point %d\n",
1431 range->id(), range->spill_start_index(), safe_point); 1431 range->id(), range->spill_start_index(), safe_point);
(...skipping 685 matching lines...) Expand 10 before | Expand all | Expand 10 after
2117 LiveRange* current = live_ranges()->at(i); 2117 LiveRange* current = live_ranges()->at(i);
2118 if (current != NULL) current->Verify(); 2118 if (current != NULL) current->Verify();
2119 } 2119 }
2120 } 2120 }
2121 2121
2122 2122
2123 #endif 2123 #endif
2124 2124
2125 2125
2126 } } // namespace v8::internal 2126 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698