From 88021e64b107cefec6b5497f13a278918b6fb564 Mon Sep 17 00:00:00 2001 From: "palfia@homejinni.com" Date: Mon, 10 Jun 2013 18:16:27 +0000 Subject: [PATCH] MIPS: Use compare nil ic only for non-strict equality. Port r15045 (cce366f) Original commit message: Strict-equality only has one check and cannot deopt. Should therefore not be part of the stub. BUG= Review URL: https://codereview.chromium.org/16690008 Patch from Balazs Kilvady . git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15050 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- src/mips/full-codegen-mips.cc | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/mips/full-codegen-mips.cc b/src/mips/full-codegen-mips.cc index 2d8c694..7368ead 100644 --- a/src/mips/full-codegen-mips.cc +++ b/src/mips/full-codegen-mips.cc @@ -4799,19 +4799,15 @@ void FullCodeGenerator::EmitLiteralCompareNil(CompareOperation* expr, VisitForAccumulatorValue(sub_expr); PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); - EqualityKind kind = expr->op() == Token::EQ_STRICT - ? kStrictEquality : kNonStrictEquality; __ mov(a0, result_register()); - if (kind == kStrictEquality) { + if (expr->op() == Token::EQ_STRICT) { Heap::RootListIndex nil_value = nil == kNullValue ? Heap::kNullValueRootIndex : Heap::kUndefinedValueRootIndex; __ LoadRoot(a1, nil_value); Split(eq, a0, Operand(a1), if_true, if_false, fall_through); } else { - Handle ic = CompareNilICStub::GetUninitialized(isolate(), - kNonStrictEquality, - nil); + Handle ic = CompareNilICStub::GetUninitialized(isolate(), nil); CallIC(ic, RelocInfo::CODE_TARGET, expr->CompareOperationFeedbackId()); Split(ne, v0, Operand(zero_reg), if_true, if_false, fall_through); } -- 2.7.4