| Index: src/mips/full-codegen-mips.cc
|
| diff --git a/src/mips/full-codegen-mips.cc b/src/mips/full-codegen-mips.cc
|
| index caa7352eae8bb60b771e6c475ecb2727d568f8b7..a9cf791d91867ea6fa7f8c5e669e281ac888fb5b 100644
|
| --- a/src/mips/full-codegen-mips.cc
|
| +++ b/src/mips/full-codegen-mips.cc
|
| @@ -3133,6 +3133,36 @@ void FullCodeGenerator::EmitIsFunction(CallRuntime* expr) {
|
| }
|
|
|
|
|
| +void FullCodeGenerator::EmitIsMinusZero(CallRuntime* expr) {
|
| + ZoneList<Expression*>* args = expr->arguments();
|
| + ASSERT(args->length() == 1);
|
| +
|
| + VisitForAccumulatorValue(args->at(0));
|
| +
|
| + Label materialize_true, materialize_false;
|
| + Label* if_true = NULL;
|
| + Label* if_false = NULL;
|
| + Label* fall_through = NULL;
|
| + context()->PrepareTest(&materialize_true, &materialize_false,
|
| + &if_true, &if_false, &fall_through);
|
| +
|
| + __ CheckMap(v0, a1, Heap::kHeapNumberMapRootIndex, if_false, DO_SMI_CHECK);
|
| + __ lw(a2, FieldMemOperand(v0, HeapNumber::kExponentOffset));
|
| + __ lw(a1, FieldMemOperand(v0, HeapNumber::kMantissaOffset));
|
| + __ li(t0, 0x80000000);
|
| + Label not_nan;
|
| + __ Branch(¬_nan, ne, a2, Operand(t0));
|
| + __ mov(t0, zero_reg);
|
| + __ mov(a2, a1);
|
| + __ bind(¬_nan);
|
| +
|
| + PrepareForBailoutBeforeSplit(expr, true, if_true, if_false);
|
| + Split(eq, a2, Operand(t0), if_true, if_false, fall_through);
|
| +
|
| + context()->Plug(if_true, if_false);
|
| +}
|
| +
|
| +
|
| void FullCodeGenerator::EmitIsArray(CallRuntime* expr) {
|
| ZoneList<Expression*>* args = expr->arguments();
|
| ASSERT(args->length() == 1);
|
| @@ -3740,11 +3770,20 @@ void FullCodeGenerator::EmitStringCharAt(CallRuntime* expr) {
|
| void FullCodeGenerator::EmitStringAdd(CallRuntime* expr) {
|
| ZoneList<Expression*>* args = expr->arguments();
|
| ASSERT_EQ(2, args->length());
|
| - VisitForStackValue(args->at(0));
|
| - VisitForStackValue(args->at(1));
|
| + if (FLAG_new_string_add) {
|
| + VisitForStackValue(args->at(0));
|
| + VisitForAccumulatorValue(args->at(1));
|
|
|
| - StringAddStub stub(STRING_ADD_CHECK_BOTH);
|
| - __ CallStub(&stub);
|
| + __ pop(a1);
|
| + NewStringAddStub stub(STRING_ADD_CHECK_BOTH, NOT_TENURED);
|
| + __ CallStub(&stub);
|
| + } else {
|
| + VisitForStackValue(args->at(0));
|
| + VisitForStackValue(args->at(1));
|
| +
|
| + StringAddStub stub(STRING_ADD_CHECK_BOTH);
|
| + __ CallStub(&stub);
|
| + }
|
| context()->Plug(v0);
|
| }
|
|
|
| @@ -3762,45 +3801,6 @@ void FullCodeGenerator::EmitStringCompare(CallRuntime* expr) {
|
| }
|
|
|
|
|
| -void FullCodeGenerator::EmitMathSin(CallRuntime* expr) {
|
| - // Load the argument on the stack and call the stub.
|
| - TranscendentalCacheStub stub(TranscendentalCache::SIN,
|
| - TranscendentalCacheStub::TAGGED);
|
| - ZoneList<Expression*>* args = expr->arguments();
|
| - ASSERT(args->length() == 1);
|
| - VisitForStackValue(args->at(0));
|
| - __ mov(a0, result_register()); // Stub requires parameter in a0 and on tos.
|
| - __ CallStub(&stub);
|
| - context()->Plug(v0);
|
| -}
|
| -
|
| -
|
| -void FullCodeGenerator::EmitMathCos(CallRuntime* expr) {
|
| - // Load the argument on the stack and call the stub.
|
| - TranscendentalCacheStub stub(TranscendentalCache::COS,
|
| - TranscendentalCacheStub::TAGGED);
|
| - ZoneList<Expression*>* args = expr->arguments();
|
| - ASSERT(args->length() == 1);
|
| - VisitForStackValue(args->at(0));
|
| - __ mov(a0, result_register()); // Stub requires parameter in a0 and on tos.
|
| - __ CallStub(&stub);
|
| - context()->Plug(v0);
|
| -}
|
| -
|
| -
|
| -void FullCodeGenerator::EmitMathTan(CallRuntime* expr) {
|
| - // Load the argument on the stack and call the stub.
|
| - TranscendentalCacheStub stub(TranscendentalCache::TAN,
|
| - TranscendentalCacheStub::TAGGED);
|
| - ZoneList<Expression*>* args = expr->arguments();
|
| - ASSERT(args->length() == 1);
|
| - VisitForStackValue(args->at(0));
|
| - __ mov(a0, result_register()); // Stub requires parameter in a0 and on tos.
|
| - __ CallStub(&stub);
|
| - context()->Plug(v0);
|
| -}
|
| -
|
| -
|
| void FullCodeGenerator::EmitMathLog(CallRuntime* expr) {
|
| // Load the argument on the stack and call the stub.
|
| TranscendentalCacheStub stub(TranscendentalCache::LOG,
|
|
|