Fix compilation errors on X64. Error from r5080 is constructor Operand(register) with too few arguments, while constructing a dummy return value in unreachable code to avoid compiler errors. Also added explicit cast from intptr_t to int in profile-generator.cc to avoid compiler warnings, introduced in r5078.

Review URL: http://codereview.chromium.org/3030002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5084 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
whesse@chromium.org 2010-07-16 08:20:39 +00:00
parent f2cf990de2
commit 1f85eccb24
2 changed files with 6 additions and 4 deletions

View 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());

View 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);
}