Fix compilation errors on X64. Error from r5080 is constructor Operand(register)...
authorwhesse@chromium.org <whesse@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Fri, 16 Jul 2010 08:20:39 +0000 (08:20 +0000)
committerwhesse@chromium.org <whesse@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Fri, 16 Jul 2010 08:20:39 +0000 (08:20 +0000)
Review URL: http://codereview.chromium.org/3030002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5084 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

src/profile-generator.cc
src/x64/codegen-x64.cc

index 9ec6b7d2d0b90eca556853ceec787d4036e5324d..5315bfbde4fac5bf307d7e614db513afbb8cec9e 100644 (file)
@@ -1557,7 +1557,8 @@ void HeapObjectsMap::AddEntry(Address addr, uint64_t id) {
 uint64_t HeapObjectsMap::FindEntry(Address addr) {
   HashMap::Entry* entry = entries_map_.Lookup(addr, AddressHash(addr), false);
   if (entry != NULL) {
-    int entry_index = reinterpret_cast<intptr_t>(entry->value);
+    int entry_index =
+        static_cast<int>(reinterpret_cast<intptr_t>(entry->value));
     EntryInfo& entry_info = entries_->at(entry_index);
     entry_info.accessed = true;
     return entry_info.id;
@@ -1572,7 +1573,8 @@ void HeapObjectsMap::RemoveDeadEntries() {
   for (HashMap::Entry* entry = entries_map_.Start();
        entry != NULL;
        entry = entries_map_.Next(entry)) {
-    int entry_index = reinterpret_cast<intptr_t>(entry->value);
+    int entry_index =
+        static_cast<int>(reinterpret_cast<intptr_t>(entry->value));
     EntryInfo& entry_info = entries_->at(entry_index);
     if (entry_info.accessed) {
       entry->value = reinterpret_cast<void*>(new_entries->length());
index d8277e62ac7f758f21ba06965cd03bd06c6ed0b6..1614ff4c76c8b300b798769ac614edcc7a1c5dea 100644 (file)
@@ -438,7 +438,7 @@ Operand CodeGenerator::SlotOperand(Slot* slot, Register tmp) {
 
     default:
       UNREACHABLE();
-      return Operand(rax);
+      return Operand(rsp, 0);
   }
 }
 
@@ -11526,7 +11526,7 @@ void StringHelper::GenerateCopyCharactersREP(MacroAssembler* masm,
 
   // Make count the number of bytes to copy.
   if (!ascii) {
-    ASSERT_EQ(2, sizeof(uc16));  // NOLINT
+    ASSERT_EQ(2, static_cast<int>(sizeof(uc16)));  // NOLINT
     __ addl(count, count);
   }