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

Unified Diff: src/codegen-ia32.cc

Issue 15037: Experimental: use the Result class to manage the lifetime of registers... (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/toiger/
Patch Set: '' Created 12 years 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
« no previous file with comments | « no previous file | src/register-allocator-ia32.h » ('j') | src/register-allocator-ia32.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/codegen-ia32.cc
===================================================================
--- src/codegen-ia32.cc (revision 999)
+++ src/codegen-ia32.cc (working copy)
@@ -2664,13 +2664,12 @@
if (node->handle()->IsSmi() && !IsInlineSmi(node)) {
// To prevent long attacker-controlled byte sequences in code, larger
// Smis are loaded in two steps via a temporary register.
- Register temp = allocator_->Allocate();
+ Result temp = allocator_->Allocate();
+ ASSERT(temp.is_valid());
int bits = reinterpret_cast<int>(*node->handle());
- ASSERT(!temp.is(no_reg));
- __ mov(temp, bits & 0x0000FFFF);
- __ xor_(temp, bits & 0xFFFF0000);
- frame_->Push(temp);
- allocator_->Unuse(temp);
+ __ mov(temp.reg(), bits & 0x0000FFFF);
+ __ xor_(temp.reg(), bits & 0xFFFF0000);
+ frame_->Push(&temp);
William Hesse 2008/12/19 08:41:03 I thought this was in the assembler's Set() functi
Kevin Millikin (Chromium) 2008/12/19 08:48:11 Possibly, but there's probably a better way. Idea
} else {
frame_->Push(node->handle());
}
« no previous file with comments | « no previous file | src/register-allocator-ia32.h » ('j') | src/register-allocator-ia32.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698