| Index: src/mips/full-codegen-mips.cc
|
| diff --git a/src/mips/full-codegen-mips.cc b/src/mips/full-codegen-mips.cc
|
| index b60502c9a5bffa8bdb23daa3ea27fe425b5ab123..1084af09298306195675662f0a42dfcdd574e16a 100644
|
| --- a/src/mips/full-codegen-mips.cc
|
| +++ b/src/mips/full-codegen-mips.cc
|
| @@ -786,10 +786,10 @@ void FullCodeGenerator::EmitDebugCheckDeclarationContext(Variable* variable) {
|
| // Check that we're not inside a with or catch context.
|
| __ lw(a1, FieldMemOperand(cp, HeapObject::kMapOffset));
|
| __ LoadRoot(t0, Heap::kWithContextMapRootIndex);
|
| - __ Check(ne, kDeclarationInWithContext,
|
| + __ Check(ne, "Declaration in with context.",
|
| a1, Operand(t0));
|
| __ LoadRoot(t0, Heap::kCatchContextMapRootIndex);
|
| - __ Check(ne, kDeclarationInCatchContext,
|
| + __ Check(ne, "Declaration in catch context.",
|
| a1, Operand(t0));
|
| }
|
| }
|
| @@ -2529,7 +2529,7 @@ void FullCodeGenerator::EmitVariableAssignment(Variable* var,
|
| // Check for an uninitialized let binding.
|
| __ lw(a2, location);
|
| __ LoadRoot(t0, Heap::kTheHoleValueRootIndex);
|
| - __ Check(eq, kLetBindingReInitialization, a2, Operand(t0));
|
| + __ Check(eq, "Let binding re-initialization.", a2, Operand(t0));
|
| }
|
| // Perform the assignment.
|
| __ sw(v0, location);
|
| @@ -3492,21 +3492,21 @@ void FullCodeGenerator::EmitSeqStringSetCharCheck(Register string,
|
| Register value,
|
| uint32_t encoding_mask) {
|
| __ And(at, index, Operand(kSmiTagMask));
|
| - __ Check(eq, kNonSmiIndex, at, Operand(zero_reg));
|
| + __ Check(eq, "Non-smi index", at, Operand(zero_reg));
|
| __ And(at, value, Operand(kSmiTagMask));
|
| - __ Check(eq, kNonSmiValue, at, Operand(zero_reg));
|
| + __ Check(eq, "Non-smi value", at, Operand(zero_reg));
|
|
|
| __ lw(at, FieldMemOperand(string, String::kLengthOffset));
|
| - __ Check(lt, kIndexIsTooLarge, index, Operand(at));
|
| + __ Check(lt, "Index is too large", index, Operand(at));
|
|
|
| - __ Check(ge, kIndexIsNegative, index, Operand(zero_reg));
|
| + __ Check(ge, "Index is negative", index, Operand(zero_reg));
|
|
|
| __ lw(at, FieldMemOperand(string, HeapObject::kMapOffset));
|
| __ lbu(at, FieldMemOperand(at, Map::kInstanceTypeOffset));
|
|
|
| __ And(at, at, Operand(kStringRepresentationMask | kStringEncodingMask));
|
| __ Subu(at, at, Operand(encoding_mask));
|
| - __ Check(eq, kUnexpectedStringType, at, Operand(zero_reg));
|
| + __ Check(eq, "Unexpected string type", at, Operand(zero_reg));
|
| }
|
|
|
|
|
| @@ -3881,7 +3881,7 @@ void FullCodeGenerator::EmitGetFromCache(CallRuntime* expr) {
|
| Handle<FixedArray> jsfunction_result_caches(
|
| isolate()->native_context()->jsfunction_result_caches());
|
| if (jsfunction_result_caches->length() <= cache_id) {
|
| - __ Abort(kAttemptToUseUndefinedCache);
|
| + __ Abort("Attempt to use undefined cache.");
|
| __ LoadRoot(v0, Heap::kUndefinedValueRootIndex);
|
| context()->Plug(v0);
|
| return;
|
| @@ -4063,7 +4063,7 @@ void FullCodeGenerator::EmitFastAsciiArrayJoin(CallRuntime* expr) {
|
| // element: Current array element.
|
| // elements_end: Array end.
|
| if (generate_debug_code_) {
|
| - __ Assert(gt, kNoEmptyArraysHereInEmitFastAsciiArrayJoin,
|
| + __ Assert(gt, "No empty arrays here in EmitFastAsciiArrayJoin",
|
| array_length, Operand(zero_reg));
|
| }
|
| __ bind(&loop);
|
| @@ -4382,12 +4382,35 @@ void FullCodeGenerator::VisitUnaryOperation(UnaryOperation* expr) {
|
| break;
|
| }
|
|
|
| + case Token::SUB:
|
| + EmitUnaryOperation(expr, "[ UnaryOperation (SUB)");
|
| + break;
|
| +
|
| + case Token::BIT_NOT:
|
| + EmitUnaryOperation(expr, "[ UnaryOperation (BIT_NOT)");
|
| + break;
|
| +
|
| default:
|
| UNREACHABLE();
|
| }
|
| }
|
|
|
|
|
| +void FullCodeGenerator::EmitUnaryOperation(UnaryOperation* expr,
|
| + const char* comment) {
|
| + // TODO(svenpanne): Allowing format strings in Comment would be nice here...
|
| + Comment cmt(masm_, comment);
|
| + UnaryOpStub stub(expr->op());
|
| + // GenericUnaryOpStub expects the argument to be in a0.
|
| + VisitForAccumulatorValue(expr->expression());
|
| + SetSourcePosition(expr->position());
|
| + __ mov(a0, result_register());
|
| + CallIC(stub.GetCode(isolate()), RelocInfo::CODE_TARGET,
|
| + expr->UnaryOperationFeedbackId());
|
| + context()->Plug(v0);
|
| +}
|
| +
|
| +
|
| void FullCodeGenerator::VisitCountOperation(CountOperation* expr) {
|
| Comment cmnt(masm_, "[ CountOperation");
|
| SetSourcePosition(expr->position());
|
|
|