Commit 548428d9 authored by jochen@chromium.org's avatar jochen@chromium.org

Make V8 compile with Win64 dbg

BUG=chromium:420538
R=dcarney@chromium.org
LOG=n

Review URL: https://codereview.chromium.org/634493002

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24408 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent b662e754
...@@ -85,7 +85,7 @@ char* StrNDup(const char* str, int n) { ...@@ -85,7 +85,7 @@ char* StrNDup(const char* str, int n) {
void* AlignedAlloc(size_t size, size_t alignment) { void* AlignedAlloc(size_t size, size_t alignment) {
DCHECK_LE(V8_ALIGNOF(void*), alignment); DCHECK_LE(V8_ALIGNOF(void*), alignment);
DCHECK(base::bits::IsPowerOfTwo32(alignment)); DCHECK(base::bits::IsPowerOfTwo64(alignment));
void* ptr; void* ptr;
#if V8_OS_WIN #if V8_OS_WIN
ptr = _aligned_malloc(size, alignment); ptr = _aligned_malloc(size, alignment);
......
...@@ -32,8 +32,8 @@ void InstructionSelector::SelectInstructions() { ...@@ -32,8 +32,8 @@ void InstructionSelector::SelectInstructions() {
for (BasicBlockVectorIter i = blocks->begin(); i != blocks->end(); ++i) { for (BasicBlockVectorIter i = blocks->begin(); i != blocks->end(); ++i) {
BasicBlock* block = *i; BasicBlock* block = *i;
if (!block->IsLoopHeader()) continue; if (!block->IsLoopHeader()) continue;
DCHECK_NE(0, block->PredecessorCount()); DCHECK_NE(0, static_cast<int>(block->PredecessorCount()));
DCHECK_NE(1, block->PredecessorCount()); DCHECK_NE(1, static_cast<int>(block->PredecessorCount()));
for (BasicBlock::const_iterator j = block->begin(); j != block->end(); for (BasicBlock::const_iterator j = block->begin(); j != block->end();
++j) { ++j) {
Node* phi = *j; Node* phi = *j;
...@@ -253,9 +253,11 @@ void InstructionSelector::InitializeCallBuffer(Node* call, CallBuffer* buffer, ...@@ -253,9 +253,11 @@ void InstructionSelector::InitializeCallBuffer(Node* call, CallBuffer* buffer,
bool call_code_immediate, bool call_code_immediate,
bool call_address_immediate) { bool call_address_immediate) {
OperandGenerator g(this); OperandGenerator g(this);
DCHECK_EQ(call->op()->OutputCount(), buffer->descriptor->ReturnCount()); DCHECK_EQ(call->op()->OutputCount(),
DCHECK_EQ(OperatorProperties::GetValueInputCount(call->op()), static_cast<int>(buffer->descriptor->ReturnCount()));
buffer->input_count() + buffer->frame_state_count()); DCHECK_EQ(
OperatorProperties::GetValueInputCount(call->op()),
static_cast<int>(buffer->input_count() + buffer->frame_state_count()));
if (buffer->descriptor->ReturnCount() > 0) { if (buffer->descriptor->ReturnCount() > 0) {
// Collect the projections that represent multiple outputs from this call. // Collect the projections that represent multiple outputs from this call.
...@@ -303,7 +305,7 @@ void InstructionSelector::InitializeCallBuffer(Node* call, CallBuffer* buffer, ...@@ -303,7 +305,7 @@ void InstructionSelector::InitializeCallBuffer(Node* call, CallBuffer* buffer,
buffer->descriptor->GetInputType(0))); buffer->descriptor->GetInputType(0)));
break; break;
} }
DCHECK_EQ(1, buffer->instruction_args.size()); DCHECK_EQ(1, static_cast<int>(buffer->instruction_args.size()));
// If the call needs a frame state, we insert the state information as // If the call needs a frame state, we insert the state information as
// follows (n is the number of value inputs to the frame state): // follows (n is the number of value inputs to the frame state):
...@@ -1059,9 +1061,10 @@ void InstructionSelector::AddFrameStateInputs( ...@@ -1059,9 +1061,10 @@ void InstructionSelector::AddFrameStateInputs(
DCHECK_EQ(IrOpcode::kStateValues, locals->op()->opcode()); DCHECK_EQ(IrOpcode::kStateValues, locals->op()->opcode());
DCHECK_EQ(IrOpcode::kStateValues, stack->op()->opcode()); DCHECK_EQ(IrOpcode::kStateValues, stack->op()->opcode());
DCHECK_EQ(descriptor->parameters_count(), parameters->InputCount()); DCHECK_EQ(static_cast<int>(descriptor->parameters_count()),
DCHECK_EQ(descriptor->locals_count(), locals->InputCount()); parameters->InputCount());
DCHECK_EQ(descriptor->stack_count(), stack->InputCount()); DCHECK_EQ(static_cast<int>(descriptor->locals_count()), locals->InputCount());
DCHECK_EQ(static_cast<int>(descriptor->stack_count()), stack->InputCount());
OperandGenerator g(this); OperandGenerator g(this);
for (int i = 0; i < static_cast<int>(descriptor->parameters_count()); i++) { for (int i = 0; i < static_cast<int>(descriptor->parameters_count()); i++) {
......
...@@ -651,7 +651,7 @@ void CodeGenerator::AssembleArchBoolean(Instruction* instr, ...@@ -651,7 +651,7 @@ void CodeGenerator::AssembleArchBoolean(Instruction* instr,
// Materialize a full 64-bit 1 or 0 value. The result register is always the // Materialize a full 64-bit 1 or 0 value. The result register is always the
// last output of the instruction. // last output of the instruction.
Label check; Label check;
DCHECK_NE(0, instr->OutputCount()); DCHECK_NE(0, static_cast<int>(instr->OutputCount()));
Register reg = i.OutputRegister(static_cast<int>(instr->OutputCount() - 1)); Register reg = i.OutputRegister(static_cast<int>(instr->OutputCount() - 1));
Condition cc = no_condition; Condition cc = no_condition;
switch (condition) { switch (condition) {
......
...@@ -105,10 +105,10 @@ class AddressingModeMatcher { ...@@ -105,10 +105,10 @@ class AddressingModeMatcher {
} }
if (displacement_operand_ != NULL) { if (displacement_operand_ != NULL) {
// Pure displacement mode not supported by x64. // Pure displacement mode not supported by x64.
DCHECK_NE(input_count, 0); DCHECK_NE(static_cast<int>(input_count), 0);
inputs[input_count++] = displacement_operand_; inputs[input_count++] = displacement_operand_;
} }
DCHECK_NE(input_count, 0); DCHECK_NE(static_cast<int>(input_count), 0);
return input_count; return input_count;
} }
...@@ -262,8 +262,8 @@ static void VisitBinop(InstructionSelector* selector, Node* node, ...@@ -262,8 +262,8 @@ static void VisitBinop(InstructionSelector* selector, Node* node,
outputs[output_count++] = g.DefineAsRegister(cont->result()); outputs[output_count++] = g.DefineAsRegister(cont->result());
} }
DCHECK_NE(0, input_count); DCHECK_NE(0, static_cast<int>(input_count));
DCHECK_NE(0, output_count); DCHECK_NE(0, static_cast<int>(output_count));
DCHECK_GE(arraysize(inputs), input_count); DCHECK_GE(arraysize(inputs), input_count);
DCHECK_GE(arraysize(outputs), output_count); DCHECK_GE(arraysize(outputs), output_count);
......
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