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

Unified Diff: src/mips64/code-stubs-mips64.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/mips64/code-stubs-mips64.cc
diff --git a/src/mips64/code-stubs-mips64.cc b/src/mips64/code-stubs-mips64.cc
index 78a169c8ea1521cded35e98a4886c4e0426a1348..ba3ee622f07f1f74ae9a55d690f22790300a2b2c 100644
--- a/src/mips64/code-stubs-mips64.cc
+++ b/src/mips64/code-stubs-mips64.cc
@@ -23,7 +23,7 @@ void FastNewClosureStub::InitializeInterfaceDescriptor(
CodeStubInterfaceDescriptor* descriptor) {
Register registers[] = { cp, a2 };
descriptor->Initialize(
- MajorKey(), ARRAY_SIZE(registers), registers,
+ MajorKey(), arraysize(registers), registers,
Runtime::FunctionForId(Runtime::kNewClosureFromStubFailure)->entry);
}
@@ -31,14 +31,14 @@ void FastNewClosureStub::InitializeInterfaceDescriptor(
void FastNewContextStub::InitializeInterfaceDescriptor(
CodeStubInterfaceDescriptor* descriptor) {
Register registers[] = { cp, a1 };
- descriptor->Initialize(MajorKey(), ARRAY_SIZE(registers), registers);
+ descriptor->Initialize(MajorKey(), arraysize(registers), registers);
}
void ToNumberStub::InitializeInterfaceDescriptor(
CodeStubInterfaceDescriptor* descriptor) {
Register registers[] = { cp, a0 };
- descriptor->Initialize(MajorKey(), ARRAY_SIZE(registers), registers);
+ descriptor->Initialize(MajorKey(), arraysize(registers), registers);
}
@@ -46,7 +46,7 @@ void NumberToStringStub::InitializeInterfaceDescriptor(
CodeStubInterfaceDescriptor* descriptor) {
Register registers[] = { cp, a0 };
descriptor->Initialize(
- MajorKey(), ARRAY_SIZE(registers), registers,
+ MajorKey(), arraysize(registers), registers,
Runtime::FunctionForId(Runtime::kNumberToStringRT)->entry);
}
@@ -60,7 +60,7 @@ void FastCloneShallowArrayStub::InitializeInterfaceDescriptor(
Representation::Smi(),
Representation::Tagged() };
descriptor->Initialize(
- MajorKey(), ARRAY_SIZE(registers), registers,
+ MajorKey(), arraysize(registers), registers,
Runtime::FunctionForId(Runtime::kCreateArrayLiteralStubBailout)->entry,
representations);
}
@@ -70,7 +70,7 @@ void FastCloneShallowObjectStub::InitializeInterfaceDescriptor(
CodeStubInterfaceDescriptor* descriptor) {
Register registers[] = { cp, a3, a2, a1, a0 };
descriptor->Initialize(
- MajorKey(), ARRAY_SIZE(registers), registers,
+ MajorKey(), arraysize(registers), registers,
Runtime::FunctionForId(Runtime::kCreateObjectLiteral)->entry);
}
@@ -90,7 +90,7 @@ void CallConstructStub::InitializeInterfaceDescriptor(
void CreateAllocationSiteStub::InitializeInterfaceDescriptor(
CodeStubInterfaceDescriptor* descriptor) {
Register registers[] = { cp, a2, a3 };
- descriptor->Initialize(MajorKey(), ARRAY_SIZE(registers), registers);
+ descriptor->Initialize(MajorKey(), arraysize(registers), registers);
}
@@ -98,7 +98,7 @@ void RegExpConstructResultStub::InitializeInterfaceDescriptor(
CodeStubInterfaceDescriptor* descriptor) {
Register registers[] = { cp, a2, a1, a0 };
descriptor->Initialize(
- MajorKey(), ARRAY_SIZE(registers), registers,
+ MajorKey(), arraysize(registers), registers,
Runtime::FunctionForId(Runtime::kRegExpConstructResult)->entry);
}
@@ -108,7 +108,7 @@ void TransitionElementsKindStub::InitializeInterfaceDescriptor(
Register registers[] = { cp, a0, a1 };
Address entry =
Runtime::FunctionForId(Runtime::kTransitionElementsKind)->entry;
- descriptor->Initialize(MajorKey(), ARRAY_SIZE(registers), registers,
+ descriptor->Initialize(MajorKey(), arraysize(registers), registers,
FUNCTION_ADDR(entry));
}
@@ -116,7 +116,7 @@ void TransitionElementsKindStub::InitializeInterfaceDescriptor(
void CompareNilICStub::InitializeInterfaceDescriptor(
CodeStubInterfaceDescriptor* descriptor) {
Register registers[] = { cp, a0 };
- descriptor->Initialize(MajorKey(), ARRAY_SIZE(registers), registers,
+ descriptor->Initialize(MajorKey(), arraysize(registers), registers,
FUNCTION_ADDR(CompareNilIC_Miss));
descriptor->SetMissHandler(
ExternalReference(IC_Utility(IC::kCompareNilIC_Miss), isolate()));
@@ -139,7 +139,7 @@ static void InitializeArrayConstructorDescriptor(
if (constant_stack_parameter_count == 0) {
Register registers[] = { cp, a1, a2 };
- descriptor->Initialize(major, ARRAY_SIZE(registers), registers,
+ descriptor->Initialize(major, arraysize(registers), registers,
deopt_handler, NULL, constant_stack_parameter_count,
JS_FUNCTION_STUB_MODE);
} else {
@@ -150,7 +150,7 @@ static void InitializeArrayConstructorDescriptor(
Representation::Tagged(),
Representation::Tagged(),
Representation::Integer32() };
- descriptor->Initialize(major, ARRAY_SIZE(registers), registers, a0,
+ descriptor->Initialize(major, arraysize(registers), registers, a0,
deopt_handler, representations,
constant_stack_parameter_count,
JS_FUNCTION_STUB_MODE, PASS_ARGUMENTS);
@@ -170,7 +170,7 @@ static void InitializeInternalArrayConstructorDescriptor(
if (constant_stack_parameter_count == 0) {
Register registers[] = { cp, a1 };
- descriptor->Initialize(major, ARRAY_SIZE(registers), registers,
+ descriptor->Initialize(major, arraysize(registers), registers,
deopt_handler, NULL, constant_stack_parameter_count,
JS_FUNCTION_STUB_MODE);
} else {
@@ -180,7 +180,7 @@ static void InitializeInternalArrayConstructorDescriptor(
Representation::Tagged(),
Representation::Tagged(),
Representation::Integer32() };
- descriptor->Initialize(major, ARRAY_SIZE(registers), registers, a0,
+ descriptor->Initialize(major, arraysize(registers), registers, a0,
deopt_handler, representations,
constant_stack_parameter_count,
JS_FUNCTION_STUB_MODE, PASS_ARGUMENTS);
@@ -209,7 +209,7 @@ void ArrayNArgumentsConstructorStub::InitializeInterfaceDescriptor(
void ToBooleanStub::InitializeInterfaceDescriptor(
CodeStubInterfaceDescriptor* descriptor) {
Register registers[] = { cp, a0 };
- descriptor->Initialize(MajorKey(), ARRAY_SIZE(registers), registers,
+ descriptor->Initialize(MajorKey(), arraysize(registers), registers,
FUNCTION_ADDR(ToBooleanIC_Miss));
descriptor->SetMissHandler(
ExternalReference(IC_Utility(IC::kToBooleanIC_Miss), isolate()));
@@ -237,7 +237,7 @@ void InternalArrayNArgumentsConstructorStub::InitializeInterfaceDescriptor(
void BinaryOpICStub::InitializeInterfaceDescriptor(
CodeStubInterfaceDescriptor* descriptor) {
Register registers[] = { cp, a1, a0 };
- descriptor->Initialize(MajorKey(), ARRAY_SIZE(registers), registers,
+ descriptor->Initialize(MajorKey(), arraysize(registers), registers,
FUNCTION_ADDR(BinaryOpIC_Miss));
descriptor->SetMissHandler(
ExternalReference(IC_Utility(IC::kBinaryOpIC_Miss), isolate()));
@@ -247,7 +247,7 @@ void BinaryOpICStub::InitializeInterfaceDescriptor(
void BinaryOpWithAllocationSiteStub::InitializeInterfaceDescriptor(
CodeStubInterfaceDescriptor* descriptor) {
Register registers[] = { cp, a2, a1, a0 };
- descriptor->Initialize(MajorKey(), ARRAY_SIZE(registers), registers,
+ descriptor->Initialize(MajorKey(), arraysize(registers), registers,
FUNCTION_ADDR(BinaryOpIC_MissWithAllocationSite));
}
@@ -255,7 +255,7 @@ void BinaryOpWithAllocationSiteStub::InitializeInterfaceDescriptor(
void StringAddStub::InitializeInterfaceDescriptor(
CodeStubInterfaceDescriptor* descriptor) {
Register registers[] = { cp, a1, a0 };
- descriptor->Initialize(MajorKey(), ARRAY_SIZE(registers), registers,
+ descriptor->Initialize(MajorKey(), arraysize(registers), registers,
Runtime::FunctionForId(Runtime::kStringAdd)->entry);
}
@@ -275,7 +275,7 @@ void CallDescriptors::InitializeForIsolate(Isolate* isolate) {
Representation::Integer32(), // actual number of arguments
Representation::Integer32(), // expected number of arguments
};
- descriptor->Initialize(ARRAY_SIZE(registers), registers, representations);
+ descriptor->Initialize(arraysize(registers), registers, representations);
}
{
CallInterfaceDescriptor* descriptor =
@@ -287,7 +287,7 @@ void CallDescriptors::InitializeForIsolate(Isolate* isolate) {
Representation::Tagged(), // context
Representation::Tagged(), // key
};
- descriptor->Initialize(ARRAY_SIZE(registers), registers, representations);
+ descriptor->Initialize(arraysize(registers), registers, representations);
}
{
CallInterfaceDescriptor* descriptor =
@@ -299,7 +299,7 @@ void CallDescriptors::InitializeForIsolate(Isolate* isolate) {
Representation::Tagged(), // context
Representation::Tagged(), // name
};
- descriptor->Initialize(ARRAY_SIZE(registers), registers, representations);
+ descriptor->Initialize(arraysize(registers), registers, representations);
}
{
CallInterfaceDescriptor* descriptor =
@@ -311,7 +311,7 @@ void CallDescriptors::InitializeForIsolate(Isolate* isolate) {
Representation::Tagged(), // context
Representation::Tagged(), // receiver
};
- descriptor->Initialize(ARRAY_SIZE(registers), registers, representations);
+ descriptor->Initialize(arraysize(registers), registers, representations);
}
{
CallInterfaceDescriptor* descriptor =
@@ -329,7 +329,7 @@ void CallDescriptors::InitializeForIsolate(Isolate* isolate) {
Representation::Tagged(), // holder
Representation::External(), // api_function_address
};
- descriptor->Initialize(ARRAY_SIZE(registers), registers, representations);
+ descriptor->Initialize(arraysize(registers), registers, representations);
}
}
« src/base/macros.h ('K') | « src/mips/code-stubs-mips.cc ('k') | src/mksnapshot.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698