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

Unified Diff: src/register-allocator.cc

Issue 1961004: First step towards making JumpTarget work on ARM. Instead... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 10 years, 8 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/register-allocator.cc
===================================================================
--- src/register-allocator.cc (revision 4592)
+++ src/register-allocator.cc (working copy)
@@ -84,15 +84,15 @@
Result RegisterAllocator::Allocate(Register target) {
// If the target is not referenced, it can simply be allocated.
- if (!is_used(target)) {
+ if (!is_used(RegisterAllocator::ToNumber(target))) {
return Result(target);
}
// If the target is only referenced in the frame, it can be spilled and
// then allocated.
ASSERT(cgen_->has_valid_frame());
- if (cgen_->frame()->is_used(target) && count(target) == 1) {
+ if (cgen_->frame()->is_used(RegisterAllocator::ToNumber(target)) && count(target) == 1) {
cgen_->frame()->Spill(target);
- ASSERT(!is_used(target));
+ ASSERT(!is_used(RegisterAllocator::ToNumber(target)));
return Result(target);
}
// Otherwise (if it's referenced outside the frame) we cannot allocate it.

Powered by Google App Engine
This is Rietveld 408576698