Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(48)

Unified Diff: src/compiler/arm/instruction-selector-arm.cc

Issue 501323002: Replace our homegrown ARRAY_SIZE() with Chrome's arraysize(). (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/compiler/arm/instruction-selector-arm.cc
diff --git a/src/compiler/arm/instruction-selector-arm.cc b/src/compiler/arm/instruction-selector-arm.cc
index a234e5accf5b37bdd164318b51200a94f3bc8667..96f95e95bfa123849595d408ccfa1f50143288c1 100644
--- a/src/compiler/arm/instruction-selector-arm.cc
+++ b/src/compiler/arm/instruction-selector-arm.cc
@@ -272,8 +272,8 @@ static void VisitBinop(InstructionSelector* selector, Node* node,
DCHECK_NE(0, input_count);
DCHECK_NE(0, output_count);
- DCHECK_GE(ARRAY_SIZE(inputs), input_count);
- DCHECK_GE(ARRAY_SIZE(outputs), output_count);
+ DCHECK_GE(arraysize(inputs), input_count);
+ DCHECK_GE(arraysize(outputs), output_count);
DCHECK_NE(kMode_None, AddressingModeField::decode(opcode));
Instruction* instr = selector->Emit(cont->Encode(opcode), output_count,
@@ -345,7 +345,7 @@ void InstructionSelector::VisitStore(Node* node) {
// TODO(dcarney): handle immediate indices.
InstructionOperand* temps[] = {g.TempRegister(r5), g.TempRegister(r6)};
Emit(kArmStoreWriteBarrier, NULL, g.UseFixed(base, r4),
- g.UseFixed(index, r5), g.UseFixed(value, r6), ARRAY_SIZE(temps),
+ g.UseFixed(index, r5), g.UseFixed(value, r6), arraysize(temps),
temps);
return;
}
@@ -502,8 +502,8 @@ static inline void VisitShift(InstructionSelector* selector, Node* node,
DCHECK_NE(0, input_count);
DCHECK_NE(0, output_count);
- DCHECK_GE(ARRAY_SIZE(inputs), input_count);
- DCHECK_GE(ARRAY_SIZE(outputs), output_count);
+ DCHECK_GE(arraysize(inputs), input_count);
+ DCHECK_GE(arraysize(outputs), output_count);
DCHECK_NE(kMode_None, AddressingModeField::decode(opcode));
Instruction* instr = selector->Emit(cont->Encode(opcode), output_count,
@@ -890,8 +890,8 @@ static void VisitWordCompare(InstructionSelector* selector, Node* node,
}
DCHECK_NE(0, input_count);
- DCHECK_GE(ARRAY_SIZE(inputs), input_count);
- DCHECK_GE(ARRAY_SIZE(outputs), output_count);
+ DCHECK_GE(arraysize(inputs), input_count);
+ DCHECK_GE(arraysize(outputs), output_count);
Instruction* instr = selector->Emit(cont->Encode(opcode), output_count,
outputs, input_count, inputs);

Powered by Google App Engine
This is Rietveld 408576698