Index: src/arm/codegen-arm.cc |
diff --git a/src/arm/codegen-arm.cc b/src/arm/codegen-arm.cc |
index 5e0067716b1a3454c4948549eaf9f85fee49ae11..1d67918c50a74c64dacb61c592fa6256b9f9059d 100644 |
--- a/src/arm/codegen-arm.cc |
+++ b/src/arm/codegen-arm.cc |
@@ -7018,47 +7018,44 @@ void CallFunctionStub::Generate(MacroAssembler* masm) { |
} |
-// Unfortunately you have to run without snapshots to see most of these |
-// names in the profile since most compare stubs end up in the snapshot. |
const char* CompareStub::GetName() { |
- if (name_ != NULL) return name_; |
- const int kMaxNameLength = 100; |
- name_ = Bootstrapper::AllocateAutoDeletedArray(kMaxNameLength); |
- if (name_ == NULL) return "OOM"; |
- |
- const char* cc_name; |
switch (cc_) { |
- case lt: cc_name = "LT"; break; |
- case gt: cc_name = "GT"; break; |
- case le: cc_name = "LE"; break; |
- case ge: cc_name = "GE"; break; |
- case eq: cc_name = "EQ"; break; |
- case ne: cc_name = "NE"; break; |
- default: cc_name = "UnknownCondition"; break; |
- } |
- |
- const char* strict_name = ""; |
- if (strict_ && (cc_ == eq || cc_ == ne)) { |
- strict_name = "_STRICT"; |
- } |
- |
- const char* never_nan_nan_name = ""; |
- if (never_nan_nan_ && (cc_ == eq || cc_ == ne)) { |
- never_nan_nan_name = "_NO_NAN"; |
- } |
- |
- const char* include_number_compare_name = ""; |
- if (!include_number_compare_) { |
- include_number_compare_name = "_NO_NUMBER"; |
+ case lt: return "CompareStub_LT"; |
+ case gt: return "CompareStub_GT"; |
+ case le: return "CompareStub_LE"; |
+ case ge: return "CompareStub_GE"; |
+ case ne: { |
+ if (strict_) { |
+ if (never_nan_nan_) { |
+ return "CompareStub_NE_STRICT_NO_NAN"; |
+ } else { |
+ return "CompareStub_NE_STRICT"; |
+ } |
+ } else { |
+ if (never_nan_nan_) { |
+ return "CompareStub_NE_NO_NAN"; |
+ } else { |
+ return "CompareStub_NE"; |
+ } |
+ } |
+ } |
+ case eq: { |
+ if (strict_) { |
+ if (never_nan_nan_) { |
+ return "CompareStub_EQ_STRICT_NO_NAN"; |
+ } else { |
+ return "CompareStub_EQ_STRICT"; |
+ } |
+ } else { |
+ if (never_nan_nan_) { |
+ return "CompareStub_EQ_NO_NAN"; |
+ } else { |
+ return "CompareStub_EQ"; |
+ } |
+ } |
+ } |
+ default: return "CompareStub"; |
} |
- |
- OS::SNPrintF(Vector<char>(name_, kMaxNameLength), |
- "CompareStub_%s%s%s%s", |
- cc_name, |
- strict_name, |
- never_nan_nan_name, |
- include_number_compare_name); |
- return name_; |
} |
@@ -7066,11 +7063,10 @@ int CompareStub::MinorKey() { |
// Encode the three parameters in a unique 16 bit value. To avoid duplicate |
// stubs the never NaN NaN condition is only taken into account if the |
// condition is equals. |
- ASSERT((static_cast<unsigned>(cc_) >> 28) < (1 << 13)); |
+ ASSERT((static_cast<unsigned>(cc_) >> 28) < (1 << 14)); |
return ConditionField::encode(static_cast<unsigned>(cc_) >> 28) |
| StrictField::encode(strict_) |
- | NeverNanNanField::encode(cc_ == eq ? never_nan_nan_ : false) |
- | IncludeNumberCompareField::encode(include_number_compare_); |
+ | NeverNanNanField::encode(cc_ == eq ? never_nan_nan_ : false); |
} |