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

Unified Diff: src/x64/register-allocator-x64.cc

Issue 140068: Implement code generation for conditional expressions and regexp... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 11 years, 6 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/x64/register-allocator-x64.cc
===================================================================
--- src/x64/register-allocator-x64.cc (revision 2241)
+++ src/x64/register-allocator-x64.cc (working copy)
@@ -39,19 +39,23 @@
void Result::ToRegister() {
ASSERT(is_valid());
if (is_constant()) {
- // TODO(X64): Handle constant results.
- /*
Result fresh = CodeGeneratorScope::Current()->allocator()->Allocate();
ASSERT(fresh.is_valid());
- if (CodeGeneratorScope::Current()->IsUnsafeSmi(handle())) {
- CodeGeneratorScope::Current()->LoadUnsafeSmi(fresh.reg(), handle());
+ if (handle()->IsSmi()) {
+ if (CodeGeneratorScope::Current()->IsUnsafeSmi(handle())) {
+ CodeGeneratorScope::Current()->LoadUnsafeSmi(fresh.reg(), handle());
+ } else {
+ CodeGeneratorScope::Current()->masm()->movq(fresh.reg(),
+ handle(),
+ RelocInfo::NONE);
William Hesse 2009/06/22 19:14:23 Could you say CodeGeneratorScope::Current()->masm(
Mads Ager (chromium) 2009/06/22 19:25:00 Done. And also done for the same piece of code be
+ }
} else {
- CodeGeneratorScope::Current()->masm()->Set(fresh.reg(),
- Immediate(handle()));
+ CodeGeneratorScope::Current()->masm()->movq(fresh.reg(),
+ handle(),
+ RelocInfo::EMBEDDED_OBJECT);
}
// This result becomes a copy of the fresh one.
*this = fresh;
- */
}
ASSERT(is_register());
}

Powered by Google App Engine
This is Rietveld 408576698