Bug 739512 - Patch 6: improving naming of PCCount-related stuff. r=bhackett.

This commit is contained in:
Nicholas Nethercote
2012-04-01 13:24:56 -07:00
parent 19b4952593
commit 5ddd4b259e
16 changed files with 293 additions and 293 deletions

View File

@@ -521,10 +521,10 @@ FlowsIntoNext(JSOp op)
/*
* Counts accumulated for a single opcode in a script. The counts tracked vary
* between opcodes, and this structure ensures that counts are accessed in
* a coherent fashion.
* between opcodes, and this structure ensures that counts are accessed in a
* coherent fashion.
*/
class OpcodeCounts
class PCCounts
{
friend struct ::JSScript;
double *counts;
@@ -542,11 +542,11 @@ class OpcodeCounts
BASE_METHODJIT_CODE,
BASE_METHODJIT_PICS,
BASE_COUNT
BASE_LIMIT
};
enum AccessCounts {
ACCESS_MONOMORPHIC = BASE_COUNT,
ACCESS_MONOMORPHIC = BASE_LIMIT,
ACCESS_DIMORPHIC,
ACCESS_POLYMORPHIC,
@@ -561,7 +561,7 @@ class OpcodeCounts
ACCESS_STRING,
ACCESS_OBJECT,
ACCESS_COUNT
ACCESS_LIMIT
};
static bool accessOp(JSOp op) {
@@ -577,7 +577,7 @@ class OpcodeCounts
}
enum ElementCounts {
ELEM_ID_INT = ACCESS_COUNT,
ELEM_ID_INT = ACCESS_LIMIT,
ELEM_ID_DOUBLE,
ELEM_ID_OTHER,
ELEM_ID_UNKNOWN,
@@ -587,7 +587,7 @@ class OpcodeCounts
ELEM_OBJECT_DENSE,
ELEM_OBJECT_OTHER,
ELEM_COUNT
ELEM_LIMIT
};
static bool elementOp(JSOp op) {
@@ -595,11 +595,11 @@ class OpcodeCounts
}
enum PropertyCounts {
PROP_STATIC = ACCESS_COUNT,
PROP_STATIC = ACCESS_LIMIT,
PROP_DEFINITE,
PROP_OTHER,
PROP_COUNT
PROP_LIMIT
};
static bool propertyOp(JSOp op) {
@@ -607,12 +607,12 @@ class OpcodeCounts
}
enum ArithCounts {
ARITH_INT = BASE_COUNT,
ARITH_INT = BASE_LIMIT,
ARITH_DOUBLE,
ARITH_OTHER,
ARITH_UNKNOWN,
ARITH_COUNT
ARITH_LIMIT
};
static bool arithOp(JSOp op) {
@@ -623,14 +623,14 @@ class OpcodeCounts
{
if (accessOp(op)) {
if (elementOp(op))
return ELEM_COUNT;
return ELEM_LIMIT;
if (propertyOp(op))
return PROP_COUNT;
return ACCESS_COUNT;
return PROP_LIMIT;
return ACCESS_LIMIT;
}
if (arithOp(op))
return ARITH_COUNT;
return BASE_COUNT;
return ARITH_LIMIT;
return BASE_LIMIT;
}
static const char *countName(JSOp op, size_t which);