Reviewers: dcarney,

Description:
Make V8 compile with Win64 dbg

BUG=chromium:420538
[email protected]
LOG=n

Please review this at https://codereview.chromium.org/634493002/

SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge

Affected files (+18, -15 lines):
  M src/allocation.cc
  M src/compiler/instruction-selector.cc
  M src/compiler/x64/code-generator-x64.cc
  M src/compiler/x64/instruction-selector-x64.cc


Index: src/allocation.cc
diff --git a/src/allocation.cc b/src/allocation.cc
index cae1c102515c1bdcf9b2ef253907e3000d475680..96fd71f11bd3d55be11d7f157ee885e838c430be 100644
--- a/src/allocation.cc
+++ b/src/allocation.cc
@@ -85,7 +85,7 @@ char* StrNDup(const char* str, int n) {

 void* AlignedAlloc(size_t size, size_t alignment) {
   DCHECK_LE(V8_ALIGNOF(void*), alignment);
-  DCHECK(base::bits::IsPowerOfTwo32(alignment));
+  DCHECK(base::bits::IsPowerOfTwo64(alignment));
   void* ptr;
 #if V8_OS_WIN
   ptr = _aligned_malloc(size, alignment);
Index: src/compiler/instruction-selector.cc
diff --git a/src/compiler/instruction-selector.cc b/src/compiler/instruction-selector.cc index 09a8e018eb20a309e93bce003b0cd8ddfaf5a2d6..1b2ea04acac7b573548c15db34544cfd0890a852 100644
--- a/src/compiler/instruction-selector.cc
+++ b/src/compiler/instruction-selector.cc
@@ -32,8 +32,8 @@ void InstructionSelector::SelectInstructions() {
   for (BasicBlockVectorIter i = blocks->begin(); i != blocks->end(); ++i) {
     BasicBlock* block = *i;
     if (!block->IsLoopHeader()) continue;
-    DCHECK_NE(0, block->PredecessorCount());
-    DCHECK_NE(1, block->PredecessorCount());
+    DCHECK_NE(0, static_cast<int>(block->PredecessorCount()));
+    DCHECK_NE(1, static_cast<int>(block->PredecessorCount()));
     for (BasicBlock::const_iterator j = block->begin(); j != block->end();
          ++j) {
       Node* phi = *j;
@@ -253,9 +253,11 @@ void InstructionSelector::InitializeCallBuffer(Node* call, CallBuffer* buffer,
                                                bool call_code_immediate,
bool call_address_immediate) {
   OperandGenerator g(this);
-  DCHECK_EQ(call->op()->OutputCount(), buffer->descriptor->ReturnCount());
-  DCHECK_EQ(OperatorProperties::GetValueInputCount(call->op()),
-            buffer->input_count() + buffer->frame_state_count());
+  DCHECK_EQ(call->op()->OutputCount(),
+            static_cast<int>(buffer->descriptor->ReturnCount()));
+  DCHECK_EQ(
+      OperatorProperties::GetValueInputCount(call->op()),
+ static_cast<int>(buffer->input_count() + buffer->frame_state_count()));

   if (buffer->descriptor->ReturnCount() > 0) {
// Collect the projections that represent multiple outputs from this call. @@ -303,7 +305,7 @@ void InstructionSelector::InitializeCallBuffer(Node* call, CallBuffer* buffer,
                         buffer->descriptor->GetInputType(0)));
       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
   // follows (n is the number of value inputs to the frame state):
@@ -1059,9 +1061,10 @@ void InstructionSelector::AddFrameStateInputs(
   DCHECK_EQ(IrOpcode::kStateValues, locals->op()->opcode());
   DCHECK_EQ(IrOpcode::kStateValues, stack->op()->opcode());

-  DCHECK_EQ(descriptor->parameters_count(), parameters->InputCount());
-  DCHECK_EQ(descriptor->locals_count(), locals->InputCount());
-  DCHECK_EQ(descriptor->stack_count(), stack->InputCount());
+  DCHECK_EQ(static_cast<int>(descriptor->parameters_count()),
+            parameters->InputCount());
+ DCHECK_EQ(static_cast<int>(descriptor->locals_count()), locals->InputCount()); + DCHECK_EQ(static_cast<int>(descriptor->stack_count()), stack->InputCount());

   OperandGenerator g(this);
for (int i = 0; i < static_cast<int>(descriptor->parameters_count()); i++) {
Index: src/compiler/x64/code-generator-x64.cc
diff --git a/src/compiler/x64/code-generator-x64.cc b/src/compiler/x64/code-generator-x64.cc index 6f9d68f2496c45140d0cfe7f38c3aab9bdbcf259..de8956e01d248a1ce47b76b297fae2aee4e5080f 100644
--- a/src/compiler/x64/code-generator-x64.cc
+++ b/src/compiler/x64/code-generator-x64.cc
@@ -651,7 +651,7 @@ void CodeGenerator::AssembleArchBoolean(Instruction* instr, // Materialize a full 64-bit 1 or 0 value. The result register is always the
   // last output of the instruction.
   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));
   Condition cc = no_condition;
   switch (condition) {
Index: src/compiler/x64/instruction-selector-x64.cc
diff --git a/src/compiler/x64/instruction-selector-x64.cc b/src/compiler/x64/instruction-selector-x64.cc index f744a2c939b2f1ff34512eb87d272aa10c927449..7f9e40afe2c4a2209b929b7d71440968b84576e1 100644
--- a/src/compiler/x64/instruction-selector-x64.cc
+++ b/src/compiler/x64/instruction-selector-x64.cc
@@ -105,10 +105,10 @@ class AddressingModeMatcher {
     }
     if (displacement_operand_ != NULL) {
       // 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_;
     }
-    DCHECK_NE(input_count, 0);
+    DCHECK_NE(static_cast<int>(input_count), 0);
     return input_count;
   }

@@ -262,8 +262,8 @@ static void VisitBinop(InstructionSelector* selector, Node* node,
     outputs[output_count++] = g.DefineAsRegister(cont->result());
   }

-  DCHECK_NE(0, input_count);
-  DCHECK_NE(0, output_count);
+  DCHECK_NE(0, static_cast<int>(input_count));
+  DCHECK_NE(0, static_cast<int>(output_count));
   DCHECK_GE(arraysize(inputs), input_count);
   DCHECK_GE(arraysize(outputs), output_count);



--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to