| Index: src/x64/code-stubs-x64.cc
|
| ===================================================================
|
| --- src/x64/code-stubs-x64.cc (revision 8632)
|
| +++ src/x64/code-stubs-x64.cc (working copy)
|
| @@ -642,25 +642,17 @@
|
| }
|
|
|
|
|
| -const char* UnaryOpStub::GetName() {
|
| - if (name_ != NULL) return name_;
|
| - const int kMaxNameLength = 100;
|
| - name_ = Isolate::Current()->bootstrapper()->AllocateAutoDeletedArray(
|
| - kMaxNameLength);
|
| - if (name_ == NULL) return "OOM";
|
| +void UnaryOpStub::PrintName(StringStream* stream) {
|
| const char* op_name = Token::Name(op_);
|
| const char* overwrite_name = NULL; // Make g++ happy.
|
| switch (mode_) {
|
| case UNARY_NO_OVERWRITE: overwrite_name = "Alloc"; break;
|
| case UNARY_OVERWRITE: overwrite_name = "Overwrite"; break;
|
| }
|
| -
|
| - OS::SNPrintF(Vector<char>(name_, kMaxNameLength),
|
| - "UnaryOpStub_%s_%s_%s",
|
| - op_name,
|
| - overwrite_name,
|
| - UnaryOpIC::GetName(operand_type_));
|
| - return name_;
|
| + stream->Add("UnaryOpStub_%s_%s_%s",
|
| + op_name,
|
| + overwrite_name,
|
| + UnaryOpIC::GetName(operand_type_));
|
| }
|
|
|
|
|
| @@ -721,12 +713,7 @@
|
| }
|
|
|
|
|
| -const char* BinaryOpStub::GetName() {
|
| - if (name_ != NULL) return name_;
|
| - const int kMaxNameLength = 100;
|
| - name_ = Isolate::Current()->bootstrapper()->AllocateAutoDeletedArray(
|
| - kMaxNameLength);
|
| - if (name_ == NULL) return "OOM";
|
| +void BinaryOpStub::PrintName(StringStream* stream) {
|
| const char* op_name = Token::Name(op_);
|
| const char* overwrite_name;
|
| switch (mode_) {
|
| @@ -735,13 +722,10 @@
|
| case OVERWRITE_LEFT: overwrite_name = "OverwriteLeft"; break;
|
| default: overwrite_name = "UnknownOverwrite"; break;
|
| }
|
| -
|
| - OS::SNPrintF(Vector<char>(name_, kMaxNameLength),
|
| - "BinaryOpStub_%s_%s_%s",
|
| - op_name,
|
| - overwrite_name,
|
| - BinaryOpIC::GetName(operands_type_));
|
| - return name_;
|
| + stream->Add("BinaryOpStub_%s_%s_%s",
|
| + op_name,
|
| + overwrite_name,
|
| + BinaryOpIC::GetName(operands_type_));
|
| }
|
|
|
|
|
| @@ -3450,9 +3434,7 @@
|
|
|
| void JSEntryStub::GenerateBody(MacroAssembler* masm, bool is_construct) {
|
| Label invoke, exit;
|
| -#ifdef ENABLE_LOGGING_AND_PROFILING
|
| Label not_outermost_js, not_outermost_js_2;
|
| -#endif
|
| { // NOLINT. Scope block confuses linter.
|
| MacroAssembler::NoRootArrayScope uninitialized_root_register(masm);
|
| // Setup frame.
|
| @@ -3497,7 +3479,6 @@
|
| __ push(c_entry_fp_operand);
|
| }
|
|
|
| -#ifdef ENABLE_LOGGING_AND_PROFILING
|
| // If this is the outermost JS call, set js_entry_sp value.
|
| ExternalReference js_entry_sp(Isolate::k_js_entry_sp_address, isolate);
|
| __ Load(rax, js_entry_sp);
|
| @@ -3511,7 +3492,6 @@
|
| __ bind(¬_outermost_js);
|
| __ Push(Smi::FromInt(StackFrame::INNER_JSENTRY_FRAME));
|
| __ bind(&cont);
|
| -#endif
|
|
|
| // Call a faked try-block that does the invoke.
|
| __ call(&invoke);
|
| @@ -3555,7 +3535,6 @@
|
| __ PopTryHandler();
|
|
|
| __ bind(&exit);
|
| -#ifdef ENABLE_LOGGING_AND_PROFILING
|
| // Check if the current stack frame is marked as the outermost JS frame.
|
| __ pop(rbx);
|
| __ Cmp(rbx, Smi::FromInt(StackFrame::OUTERMOST_JSENTRY_FRAME));
|
| @@ -3563,7 +3542,6 @@
|
| __ movq(kScratchRegister, js_entry_sp);
|
| __ movq(Operand(kScratchRegister, 0), Immediate(0));
|
| __ bind(¬_outermost_js_2);
|
| -#endif
|
|
|
| // Restore the top frame descriptor from the stack.
|
| { Operand c_entry_fp_operand = masm->ExternalOperand(c_entry_fp);
|
| @@ -3772,15 +3750,8 @@
|
|
|
| // 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() {
|
| +void CompareStub::PrintName(StringStream* stream) {
|
| ASSERT(lhs_.is(no_reg) && rhs_.is(no_reg));
|
| -
|
| - if (name_ != NULL) return name_;
|
| - const int kMaxNameLength = 100;
|
| - name_ = Isolate::Current()->bootstrapper()->AllocateAutoDeletedArray(
|
| - kMaxNameLength);
|
| - if (name_ == NULL) return "OOM";
|
| -
|
| const char* cc_name;
|
| switch (cc_) {
|
| case less: cc_name = "LT"; break;
|
| @@ -3791,35 +3762,12 @@
|
| case not_equal: cc_name = "NE"; break;
|
| default: cc_name = "UnknownCondition"; break;
|
| }
|
| -
|
| - const char* strict_name = "";
|
| - if (strict_ && (cc_ == equal || cc_ == not_equal)) {
|
| - strict_name = "_STRICT";
|
| - }
|
| -
|
| - const char* never_nan_nan_name = "";
|
| - if (never_nan_nan_ && (cc_ == equal || cc_ == not_equal)) {
|
| - never_nan_nan_name = "_NO_NAN";
|
| - }
|
| -
|
| - const char* include_number_compare_name = "";
|
| - if (!include_number_compare_) {
|
| - include_number_compare_name = "_NO_NUMBER";
|
| - }
|
| -
|
| - const char* include_smi_compare_name = "";
|
| - if (!include_smi_compare_) {
|
| - include_smi_compare_name = "_NO_SMI";
|
| - }
|
| -
|
| - OS::SNPrintF(Vector<char>(name_, kMaxNameLength),
|
| - "CompareStub_%s%s%s%s",
|
| - cc_name,
|
| - strict_name,
|
| - never_nan_nan_name,
|
| - include_number_compare_name,
|
| - include_smi_compare_name);
|
| - return name_;
|
| + bool is_equality = cc_ == equal || cc_ == not_equal;
|
| + stream->Add("CompareStub_%s", cc_name);
|
| + if (strict_ && is_equality) stream->Add("_STRICT");
|
| + if (never_nan_nan_ && is_equality) stream->Add("_NO_NAN");
|
| + if (!include_number_compare_) stream->Add("_NO_NUMBER");
|
| + if (!include_smi_compare_) stream->Add("_NO_SMI");
|
| }
|
|
|
|
|
|
|