Commit 199f1e79 authored by vegorov@chromium.org's avatar vegorov@chromium.org

Fix Win64 compilation.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5925 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 3b5abbbd
...@@ -30,6 +30,7 @@ ...@@ -30,6 +30,7 @@
#ifndef V8_ATOMICOPS_INTERNALS_X86_MSVC_H_ #ifndef V8_ATOMICOPS_INTERNALS_X86_MSVC_H_
#define V8_ATOMICOPS_INTERNALS_X86_MSVC_H_ #define V8_ATOMICOPS_INTERNALS_X86_MSVC_H_
#include "checks.h"
#include "win32-headers.h" #include "win32-headers.h"
namespace v8 { namespace v8 {
......
...@@ -288,7 +288,7 @@ int Deoptimizer::GetDeoptimizationId(Address addr, BailoutType type) { ...@@ -288,7 +288,7 @@ int Deoptimizer::GetDeoptimizationId(Address addr, BailoutType type) {
} }
ASSERT_EQ(0, ASSERT_EQ(0,
static_cast<int>(addr - base->GetStartAddress()) % table_entry_size_); static_cast<int>(addr - base->GetStartAddress()) % table_entry_size_);
return (addr - base->GetStartAddress()) / table_entry_size_; return static_cast<int>(addr - base->GetStartAddress()) / table_entry_size_;
} }
...@@ -405,7 +405,7 @@ void Deoptimizer::DoComputeOutputFrames() { ...@@ -405,7 +405,7 @@ void Deoptimizer::DoComputeOutputFrames() {
PrintF("[deoptimizing: end 0x%08" V8PRIxPTR " ", PrintF("[deoptimizing: end 0x%08" V8PRIxPTR " ",
reinterpret_cast<intptr_t>(function)); reinterpret_cast<intptr_t>(function));
function->PrintName(); function->PrintName();
PrintF(" => node=%u, pc=0x%08x, state=%s, took %0.3f ms]\n", PrintF(" => node=%u, pc=0x%08" V8PRIxPTR ", state=%s, took %0.3f ms]\n",
node_id, node_id,
output_[index]->GetPc(), output_[index]->GetPc(),
FullCodeGenerator::State2String( FullCodeGenerator::State2String(
...@@ -475,13 +475,14 @@ void Deoptimizer::DoTranslateCommand(TranslationIterator* iterator, ...@@ -475,13 +475,14 @@ void Deoptimizer::DoTranslateCommand(TranslationIterator* iterator,
case Translation::REGISTER: { case Translation::REGISTER: {
int input_reg = iterator->Next(); int input_reg = iterator->Next();
uint32_t input_value = input_->GetRegister(input_reg); intptr_t input_value = input_->GetRegister(input_reg);
if (FLAG_trace_deopt) { if (FLAG_trace_deopt) {
PrintF(" 0x%08x: [top + %d] <- 0x%08x ; %s\n", PrintF(
output_[frame_index]->GetTop() + output_offset, " 0x%08" V8PRIxPTR ": [top + %d] <- 0x%08" V8PRIxPTR " ; %s\n",
output_offset, output_[frame_index]->GetTop() + output_offset,
input_value, output_offset,
converter.NameOfCPURegister(input_reg)); input_value,
converter.NameOfCPURegister(input_reg));
} }
output_[frame_index]->SetFrameSlot(output_offset, input_value); output_[frame_index]->SetFrameSlot(output_offset, input_value);
return; return;
...@@ -489,25 +490,28 @@ void Deoptimizer::DoTranslateCommand(TranslationIterator* iterator, ...@@ -489,25 +490,28 @@ void Deoptimizer::DoTranslateCommand(TranslationIterator* iterator,
case Translation::INT32_REGISTER: { case Translation::INT32_REGISTER: {
int input_reg = iterator->Next(); int input_reg = iterator->Next();
uint32_t value = input_->GetRegister(input_reg); intptr_t value = input_->GetRegister(input_reg);
bool is_smi = Smi::IsValid(value); bool is_smi = Smi::IsValid(value);
unsigned output_index = output_offset / kPointerSize; unsigned output_index = output_offset / kPointerSize;
if (FLAG_trace_deopt) { if (FLAG_trace_deopt) {
PrintF(" 0x%08x: [top + %d] <- %d ; %s (%s)\n", PrintF(
output_[frame_index]->GetTop() + output_offset, " 0x%08" V8PRIxPTR ": [top + %d] <- %" V8PRIdPTR " ; %s (%s)\n",
output_offset, output_[frame_index]->GetTop() + output_offset,
value, output_offset,
converter.NameOfCPURegister(input_reg), value,
is_smi ? "smi" : "heap number"); converter.NameOfCPURegister(input_reg),
is_smi ? "smi" : "heap number");
} }
if (is_smi) { if (is_smi) {
intptr_t tagged_value = intptr_t tagged_value =
reinterpret_cast<intptr_t>(Smi::FromInt(value)); reinterpret_cast<intptr_t>(Smi::FromInt(static_cast<int>(value)));
output_[frame_index]->SetFrameSlot(output_offset, tagged_value); output_[frame_index]->SetFrameSlot(output_offset, tagged_value);
} else { } else {
// We save the untagged value on the side and store a GC-safe // We save the untagged value on the side and store a GC-safe
// temporary placeholder in the frame. // temporary placeholder in the frame.
AddInteger32Value(frame_index, output_index, value); AddInteger32Value(frame_index,
output_index,
static_cast<int32_t>(value));
output_[frame_index]->SetFrameSlot(output_offset, kPlaceholder); output_[frame_index]->SetFrameSlot(output_offset, kPlaceholder);
} }
return; return;
...@@ -518,7 +522,7 @@ void Deoptimizer::DoTranslateCommand(TranslationIterator* iterator, ...@@ -518,7 +522,7 @@ void Deoptimizer::DoTranslateCommand(TranslationIterator* iterator,
double value = input_->GetDoubleRegister(input_reg); double value = input_->GetDoubleRegister(input_reg);
unsigned output_index = output_offset / kPointerSize; unsigned output_index = output_offset / kPointerSize;
if (FLAG_trace_deopt) { if (FLAG_trace_deopt) {
PrintF(" 0x%08x: [top + %d] <- %e ; %s\n", PrintF(" 0x%08" V8PRIxPTR ": [top + %d] <- %e ; %s\n",
output_[frame_index]->GetTop() + output_offset, output_[frame_index]->GetTop() + output_offset,
output_offset, output_offset,
value, value,
...@@ -535,10 +539,11 @@ void Deoptimizer::DoTranslateCommand(TranslationIterator* iterator, ...@@ -535,10 +539,11 @@ void Deoptimizer::DoTranslateCommand(TranslationIterator* iterator,
int input_slot_index = iterator->Next(); int input_slot_index = iterator->Next();
unsigned input_offset = unsigned input_offset =
input_->GetOffsetFromSlotIndex(this, input_slot_index); input_->GetOffsetFromSlotIndex(this, input_slot_index);
uint32_t input_value = input_->GetFrameSlot(input_offset); intptr_t input_value = input_->GetFrameSlot(input_offset);
if (FLAG_trace_deopt) { if (FLAG_trace_deopt) {
PrintF(" 0x%08x: [top + %d] <- 0x%08x ; [esp + %d]\n", PrintF(" 0x%08" V8PRIxPTR ": ",
output_[frame_index]->GetTop() + output_offset, output_[frame_index]->GetTop() + output_offset);
PrintF("[top + %d] <- 0x%08" V8PRIxPTR " ; [esp + %d]\n",
output_offset, output_offset,
input_value, input_value,
input_offset); input_offset);
...@@ -551,12 +556,13 @@ void Deoptimizer::DoTranslateCommand(TranslationIterator* iterator, ...@@ -551,12 +556,13 @@ void Deoptimizer::DoTranslateCommand(TranslationIterator* iterator,
int input_slot_index = iterator->Next(); int input_slot_index = iterator->Next();
unsigned input_offset = unsigned input_offset =
input_->GetOffsetFromSlotIndex(this, input_slot_index); input_->GetOffsetFromSlotIndex(this, input_slot_index);
int32_t value = input_->GetFrameSlot(input_offset); intptr_t value = input_->GetFrameSlot(input_offset);
bool is_smi = Smi::IsValid(value); bool is_smi = Smi::IsValid(value);
unsigned output_index = output_offset / kPointerSize; unsigned output_index = output_offset / kPointerSize;
if (FLAG_trace_deopt) { if (FLAG_trace_deopt) {
PrintF(" 0x%08x: [top + %d] <- %d ; [esp + %d] (%s)\n", PrintF(" 0x%08" V8PRIxPTR ": ",
output_[frame_index]->GetTop() + output_offset, output_[frame_index]->GetTop() + output_offset);
PrintF("[top + %d] <- %" V8PRIdPTR " ; [esp + %d] (%s)\n",
output_offset, output_offset,
value, value,
input_offset, input_offset,
...@@ -564,12 +570,14 @@ void Deoptimizer::DoTranslateCommand(TranslationIterator* iterator, ...@@ -564,12 +570,14 @@ void Deoptimizer::DoTranslateCommand(TranslationIterator* iterator,
} }
if (is_smi) { if (is_smi) {
intptr_t tagged_value = intptr_t tagged_value =
reinterpret_cast<intptr_t>(Smi::FromInt(value)); reinterpret_cast<intptr_t>(Smi::FromInt(static_cast<int>(value)));
output_[frame_index]->SetFrameSlot(output_offset, tagged_value); output_[frame_index]->SetFrameSlot(output_offset, tagged_value);
} else { } else {
// We save the untagged value on the side and store a GC-safe // We save the untagged value on the side and store a GC-safe
// temporary placeholder in the frame. // temporary placeholder in the frame.
AddInteger32Value(frame_index, output_index, value); AddInteger32Value(frame_index,
output_index,
static_cast<int32_t>(value));
output_[frame_index]->SetFrameSlot(output_offset, kPlaceholder); output_[frame_index]->SetFrameSlot(output_offset, kPlaceholder);
} }
return; return;
...@@ -582,7 +590,7 @@ void Deoptimizer::DoTranslateCommand(TranslationIterator* iterator, ...@@ -582,7 +590,7 @@ void Deoptimizer::DoTranslateCommand(TranslationIterator* iterator,
double value = input_->GetDoubleFrameSlot(input_offset); double value = input_->GetDoubleFrameSlot(input_offset);
unsigned output_index = output_offset / kPointerSize; unsigned output_index = output_offset / kPointerSize;
if (FLAG_trace_deopt) { if (FLAG_trace_deopt) {
PrintF(" 0x%08x: [top + %d] <- %e ; [esp + %d]\n", PrintF(" 0x%08" V8PRIxPTR ": [top + %d] <- %e ; [esp + %d]\n",
output_[frame_index]->GetTop() + output_offset, output_[frame_index]->GetTop() + output_offset,
output_offset, output_offset,
value, value,
...@@ -598,7 +606,7 @@ void Deoptimizer::DoTranslateCommand(TranslationIterator* iterator, ...@@ -598,7 +606,7 @@ void Deoptimizer::DoTranslateCommand(TranslationIterator* iterator,
case Translation::LITERAL: { case Translation::LITERAL: {
Object* literal = ComputeLiteral(iterator->Next()); Object* literal = ComputeLiteral(iterator->Next());
if (FLAG_trace_deopt) { if (FLAG_trace_deopt) {
PrintF(" 0x%08x: [top + %d] <- ", PrintF(" 0x%08" V8PRIxPTR ": [top + %d] <- ",
output_[frame_index]->GetTop() + output_offset, output_[frame_index]->GetTop() + output_offset,
output_offset); output_offset);
literal->ShortPrint(); literal->ShortPrint();
...@@ -614,7 +622,7 @@ void Deoptimizer::DoTranslateCommand(TranslationIterator* iterator, ...@@ -614,7 +622,7 @@ void Deoptimizer::DoTranslateCommand(TranslationIterator* iterator,
// after the deoptimized frame is built. // after the deoptimized frame is built.
ASSERT(frame_index == 0); // Only supported for first frame. ASSERT(frame_index == 0); // Only supported for first frame.
if (FLAG_trace_deopt) { if (FLAG_trace_deopt) {
PrintF(" 0x%08x: [top + %d] <- ", PrintF(" 0x%08" V8PRIxPTR ": [top + %d] <- ",
output_[frame_index]->GetTop() + output_offset, output_[frame_index]->GetTop() + output_offset,
output_offset); output_offset);
Heap::the_hole_value()->ShortPrint(); Heap::the_hole_value()->ShortPrint();
...@@ -635,7 +643,7 @@ bool Deoptimizer::DoOsrTranslateCommand(TranslationIterator* iterator, ...@@ -635,7 +643,7 @@ bool Deoptimizer::DoOsrTranslateCommand(TranslationIterator* iterator,
// The input values are all part of the unoptimized frame so they // The input values are all part of the unoptimized frame so they
// are all tagged pointers. // are all tagged pointers.
uint32_t input_value = input_->GetFrameSlot(*input_offset); uintptr_t input_value = input_->GetFrameSlot(*input_offset);
Object* input_object = reinterpret_cast<Object*>(input_value); Object* input_object = reinterpret_cast<Object*>(input_value);
Translation::Opcode opcode = Translation::Opcode opcode =
...@@ -655,7 +663,7 @@ bool Deoptimizer::DoOsrTranslateCommand(TranslationIterator* iterator, ...@@ -655,7 +663,7 @@ bool Deoptimizer::DoOsrTranslateCommand(TranslationIterator* iterator,
case Translation::REGISTER: { case Translation::REGISTER: {
int output_reg = iterator->Next(); int output_reg = iterator->Next();
if (FLAG_trace_osr) { if (FLAG_trace_osr) {
PrintF(" %s <- 0x%08x ; [esp + %d]\n", PrintF(" %s <- 0x%08" V8PRIxPTR " ; [esp + %d]\n",
converter.NameOfCPURegister(output_reg), converter.NameOfCPURegister(output_reg),
input_value, input_value,
*input_offset); *input_offset);
...@@ -712,7 +720,7 @@ bool Deoptimizer::DoOsrTranslateCommand(TranslationIterator* iterator, ...@@ -712,7 +720,7 @@ bool Deoptimizer::DoOsrTranslateCommand(TranslationIterator* iterator,
unsigned output_offset = unsigned output_offset =
output->GetOffsetFromSlotIndex(this, output_index); output->GetOffsetFromSlotIndex(this, output_index);
if (FLAG_trace_osr) { if (FLAG_trace_osr) {
PrintF(" [esp + %d] <- 0x%08x ; [esp + %d]\n", PrintF(" [esp + %d] <- 0x%08" V8PRIxPTR " ; [esp + %d]\n",
output_offset, output_offset,
input_value, input_value,
*input_offset); *input_offset);
...@@ -954,13 +962,13 @@ unsigned FrameDescription::GetOffsetFromSlotIndex(Deoptimizer* deoptimizer, ...@@ -954,13 +962,13 @@ unsigned FrameDescription::GetOffsetFromSlotIndex(Deoptimizer* deoptimizer,
if (slot_index >= 0) { if (slot_index >= 0) {
// Local or spill slots. Skip the fixed part of the frame // Local or spill slots. Skip the fixed part of the frame
// including all arguments. // including all arguments.
unsigned base = unsigned base = static_cast<unsigned>(
GetFrameSize() - deoptimizer->ComputeFixedSize(GetFunction()); GetFrameSize() - deoptimizer->ComputeFixedSize(GetFunction()));
return base - ((slot_index + 1) * kPointerSize); return base - ((slot_index + 1) * kPointerSize);
} else { } else {
// Incoming parameter. // Incoming parameter.
unsigned base = GetFrameSize() - unsigned base = static_cast<unsigned>(GetFrameSize() -
deoptimizer->ComputeIncomingArgumentSize(GetFunction()); deoptimizer->ComputeIncomingArgumentSize(GetFunction()));
return base - ((slot_index + 1) * kPointerSize); return base - ((slot_index + 1) * kPointerSize);
} }
} }
......
...@@ -293,13 +293,13 @@ class FrameDescription { ...@@ -293,13 +293,13 @@ class FrameDescription {
free(description); free(description);
} }
uint32_t GetFrameSize() const { return frame_size_; } intptr_t GetFrameSize() const { return frame_size_; }
JSFunction* GetFunction() const { return function_; } JSFunction* GetFunction() const { return function_; }
unsigned GetOffsetFromSlotIndex(Deoptimizer* deoptimizer, int slot_index); unsigned GetOffsetFromSlotIndex(Deoptimizer* deoptimizer, int slot_index);
uint32_t GetFrameSlot(unsigned offset) { intptr_t GetFrameSlot(unsigned offset) {
return *GetFrameSlotPointer(offset); return *GetFrameSlotPointer(offset);
} }
...@@ -307,11 +307,11 @@ class FrameDescription { ...@@ -307,11 +307,11 @@ class FrameDescription {
return *reinterpret_cast<double*>(GetFrameSlotPointer(offset)); return *reinterpret_cast<double*>(GetFrameSlotPointer(offset));
} }
void SetFrameSlot(unsigned offset, uint32_t value) { void SetFrameSlot(unsigned offset, intptr_t value) {
*GetFrameSlotPointer(offset) = value; *GetFrameSlotPointer(offset) = value;
} }
uint32_t GetRegister(unsigned n) const { intptr_t GetRegister(unsigned n) const {
ASSERT(n < ARRAY_SIZE(registers_)); ASSERT(n < ARRAY_SIZE(registers_));
return registers_[n]; return registers_[n];
} }
...@@ -321,7 +321,7 @@ class FrameDescription { ...@@ -321,7 +321,7 @@ class FrameDescription {
return double_registers_[n]; return double_registers_[n];
} }
void SetRegister(unsigned n, uint32_t value) { void SetRegister(unsigned n, intptr_t value) {
ASSERT(n < ARRAY_SIZE(registers_)); ASSERT(n < ARRAY_SIZE(registers_));
registers_[n] = value; registers_[n] = value;
} }
...@@ -331,19 +331,19 @@ class FrameDescription { ...@@ -331,19 +331,19 @@ class FrameDescription {
double_registers_[n] = value; double_registers_[n] = value;
} }
uint32_t GetTop() const { return top_; } intptr_t GetTop() const { return top_; }
void SetTop(uint32_t top) { top_ = top; } void SetTop(intptr_t top) { top_ = top; }
uint32_t GetPc() const { return pc_; } intptr_t GetPc() const { return pc_; }
void SetPc(uint32_t pc) { pc_ = pc; } void SetPc(intptr_t pc) { pc_ = pc; }
uint32_t GetFp() const { return fp_; } intptr_t GetFp() const { return fp_; }
void SetFp(uint32_t fp) { fp_ = fp; } void SetFp(intptr_t fp) { fp_ = fp; }
Smi* GetState() const { return state_; } Smi* GetState() const { return state_; }
void SetState(Smi* state) { state_ = state; } void SetState(Smi* state) { state_ = state; }
void SetContinuation(uint32_t pc) { continuation_ = pc; } void SetContinuation(intptr_t pc) { continuation_ = pc; }
static int registers_offset() { static int registers_offset() {
return OFFSET_OF(FrameDescription, registers_); return OFFSET_OF(FrameDescription, registers_);
...@@ -376,22 +376,22 @@ class FrameDescription { ...@@ -376,22 +376,22 @@ class FrameDescription {
private: private:
static const uint32_t kZapUint32 = 0xbeeddead; static const uint32_t kZapUint32 = 0xbeeddead;
uint32_t frame_size_; // Number of bytes. uintptr_t frame_size_; // Number of bytes.
JSFunction* function_; JSFunction* function_;
uint32_t registers_[Register::kNumRegisters]; intptr_t registers_[Register::kNumRegisters];
double double_registers_[DoubleRegister::kNumAllocatableRegisters]; double double_registers_[DoubleRegister::kNumAllocatableRegisters];
uint32_t top_; intptr_t top_;
uint32_t pc_; intptr_t pc_;
uint32_t fp_; intptr_t fp_;
Smi* state_; Smi* state_;
// Continuation is the PC where the execution continues after // Continuation is the PC where the execution continues after
// deoptimizing. // deoptimizing.
uint32_t continuation_; intptr_t continuation_;
uint32_t* GetFrameSlotPointer(unsigned offset) { intptr_t* GetFrameSlotPointer(unsigned offset) {
ASSERT(offset < frame_size_); ASSERT(offset < frame_size_);
return reinterpret_cast<uint32_t*>( return reinterpret_cast<intptr_t*>(
reinterpret_cast<Address>(this) + frame_content_offset() + offset); reinterpret_cast<Address>(this) + frame_content_offset() + offset);
} }
}; };
......
...@@ -655,7 +655,7 @@ void JavaScriptFrame::GetFunctions(List<JSFunction*>* functions) { ...@@ -655,7 +655,7 @@ void JavaScriptFrame::GetFunctions(List<JSFunction*>* functions) {
void JavaScriptFrame::Summarize(List<FrameSummary>* functions) { void JavaScriptFrame::Summarize(List<FrameSummary>* functions) {
ASSERT(functions->length() == 0); ASSERT(functions->length() == 0);
Code* code_pointer = code(); Code* code_pointer = code();
int offset = pc() - code_pointer->address(); int offset = static_cast<int>(pc() - code_pointer->address());
FrameSummary summary(receiver(), FrameSummary summary(receiver(),
JSFunction::cast(function()), JSFunction::cast(function()),
code_pointer, code_pointer,
...@@ -779,7 +779,7 @@ DeoptimizationInputData* OptimizedFrame::GetDeoptimizationData( ...@@ -779,7 +779,7 @@ DeoptimizationInputData* OptimizedFrame::GetDeoptimizationData(
ASSERT(code->kind() == Code::OPTIMIZED_FUNCTION); ASSERT(code->kind() == Code::OPTIMIZED_FUNCTION);
SafepointTable table(code); SafepointTable table(code);
unsigned pc_offset = pc() - code->instruction_start(); unsigned pc_offset = static_cast<unsigned>(pc() - code->instruction_start());
for (unsigned i = 0; i < table.length(); i++) { for (unsigned i = 0; i < table.length(); i++) {
if (table.GetPcOffset(i) == pc_offset) { if (table.GetPcOffset(i) == pc_offset) {
*deopt_index = table.GetDeoptimizationIndex(i); *deopt_index = table.GetDeoptimizationIndex(i);
......
...@@ -1164,7 +1164,7 @@ void HValueMap::Kill(int flags) { ...@@ -1164,7 +1164,7 @@ void HValueMap::Kill(int flags) {
HValue* HValueMap::Lookup(HValue* value) const { HValue* HValueMap::Lookup(HValue* value) const {
uint32_t hash = value->Hashcode(); uint32_t hash = static_cast<uint32_t>(value->Hashcode());
uint32_t pos = Bound(hash); uint32_t pos = Bound(hash);
if (array_[pos].value != NULL) { if (array_[pos].value != NULL) {
if (array_[pos].value->Equals(value)) return array_[pos].value; if (array_[pos].value->Equals(value)) return array_[pos].value;
...@@ -1252,7 +1252,7 @@ void HValueMap::Insert(HValue* value) { ...@@ -1252,7 +1252,7 @@ void HValueMap::Insert(HValue* value) {
if (count_ >= array_size_ >> 1) Resize(array_size_ << 1); if (count_ >= array_size_ >> 1) Resize(array_size_ << 1);
ASSERT(count_ < array_size_); ASSERT(count_ < array_size_);
count_++; count_++;
uint32_t pos = Bound(value->Hashcode()); uint32_t pos = Bound(static_cast<uint32_t>(value->Hashcode()));
if (array_[pos].value == NULL) { if (array_[pos].value == NULL) {
array_[pos].value = value; array_[pos].value = value;
array_[pos].next = kNil; array_[pos].next = kNil;
......
...@@ -352,7 +352,7 @@ void Deoptimizer::DoComputeFrame(TranslationIterator* iterator, ...@@ -352,7 +352,7 @@ void Deoptimizer::DoComputeFrame(TranslationIterator* iterator,
// function code and AST id of the bailout. // function code and AST id of the bailout.
output_offset -= kPointerSize; output_offset -= kPointerSize;
input_offset -= kPointerSize; input_offset -= kPointerSize;
uint32_t value; intptr_t value;
if (is_bottommost) { if (is_bottommost) {
value = input_->GetFrameSlot(input_offset); value = input_->GetFrameSlot(input_offset);
} else { } else {
...@@ -376,7 +376,7 @@ void Deoptimizer::DoComputeFrame(TranslationIterator* iterator, ...@@ -376,7 +376,7 @@ void Deoptimizer::DoComputeFrame(TranslationIterator* iterator,
value = output_[frame_index - 1]->GetFp(); value = output_[frame_index - 1]->GetFp();
} }
output_frame->SetFrameSlot(output_offset, value); output_frame->SetFrameSlot(output_offset, value);
unsigned fp_value = top_address + output_offset; intptr_t fp_value = top_address + output_offset;
ASSERT(!is_bottommost || input_->GetRegister(ebp.code()) == fp_value); ASSERT(!is_bottommost || input_->GetRegister(ebp.code()) == fp_value);
output_frame->SetFp(fp_value); output_frame->SetFp(fp_value);
if (is_topmost) output_frame->SetRegister(ebp.code(), fp_value); if (is_topmost) output_frame->SetRegister(ebp.code(), fp_value);
......
...@@ -5967,7 +5967,7 @@ int Code::SourceStatementPosition(Address pc) { ...@@ -5967,7 +5967,7 @@ int Code::SourceStatementPosition(Address pc) {
uint8_t* Code::GetSafepointEntry(Address pc) { uint8_t* Code::GetSafepointEntry(Address pc) {
SafepointTable table(this); SafepointTable table(this);
unsigned pc_offset = pc - instruction_start(); unsigned pc_offset = static_cast<unsigned>(pc - instruction_start());
for (unsigned i = 0; i < table.length(); i++) { for (unsigned i = 0; i < table.length(); i++) {
// TODO(kasperl): Replace the linear search with binary search. // TODO(kasperl): Replace the linear search with binary search.
if (table.GetPcOffset(i) == pc_offset) return table.GetEntry(i); if (table.GetPcOffset(i) == pc_offset) return table.GetEntry(i);
......
...@@ -6865,7 +6865,7 @@ static MaybeObject* Runtime_CompileForOnStackReplacement(Arguments args) { ...@@ -6865,7 +6865,7 @@ static MaybeObject* Runtime_CompileForOnStackReplacement(Arguments args) {
// Use linear search of the unoptimized code's stack check table to find // Use linear search of the unoptimized code's stack check table to find
// the AST id matching the PC. // the AST id matching the PC.
Address start = unoptimized->instruction_start(); Address start = unoptimized->instruction_start();
unsigned target_pc_offset = frame->pc() - start; unsigned target_pc_offset = static_cast<unsigned>(frame->pc() - start);
Address table_cursor = start + unoptimized->stack_check_table_start(); Address table_cursor = start + unoptimized->stack_check_table_start();
uint32_t table_length = Memory::uint32_at(table_cursor); uint32_t table_length = Memory::uint32_at(table_cursor);
table_cursor += kIntSize; table_cursor += kIntSize;
......
...@@ -337,12 +337,13 @@ void TypeFeedbackOracle::CollectPositions(Code* code, ...@@ -337,12 +337,13 @@ void TypeFeedbackOracle::CollectPositions(Code* code,
target->check_type() != RECEIVER_MAP_CHECK) continue; target->check_type() != RECEIVER_MAP_CHECK) continue;
if (state != MONOMORPHIC && state != MEGAMORPHIC) continue; if (state != MONOMORPHIC && state != MEGAMORPHIC) continue;
} }
code_positions->Add(info->pc() - code->instruction_start()); code_positions->Add(
static_cast<int>(info->pc() - code->instruction_start()));
source_positions->Add(position); source_positions->Add(position);
} }
} else { } else {
ASSERT(RelocInfo::IsPosition(mode)); ASSERT(RelocInfo::IsPosition(mode));
position = info->data(); position = static_cast<int>(info->data());
} }
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment