Index: src/mips/code-stubs-mips.cc |
diff --git a/src/mips/code-stubs-mips.cc b/src/mips/code-stubs-mips.cc |
index 8a03a9a31a592faa84ce21f1e77625e5481719ea..0e1b224eadfcec1f4a0df8e2568b348a263cbeb6 100644 |
--- a/src/mips/code-stubs-mips.cc |
+++ b/src/mips/code-stubs-mips.cc |
@@ -247,6 +247,17 @@ void InternalArrayNArgumentsConstructorStub::InitializeInterfaceDescriptor( |
} |
+void UnaryOpStub::InitializeInterfaceDescriptor( |
+ Isolate* isolate, |
+ CodeStubInterfaceDescriptor* descriptor) { |
+ static Register registers[] = { a0 }; |
+ descriptor->register_param_count_ = 1; |
+ descriptor->register_params_ = registers; |
+ descriptor->deoptimization_handler_ = |
+ FUNCTION_ADDR(UnaryOpIC_Miss); |
+} |
+ |
+ |
void StoreGlobalStub::InitializeInterfaceDescriptor( |
Isolate* isolate, |
CodeStubInterfaceDescriptor* descriptor) { |
@@ -509,7 +520,8 @@ void FastNewBlockContextStub::Generate(MacroAssembler* masm) { |
Label after_sentinel; |
__ JumpIfNotSmi(a3, &after_sentinel); |
if (FLAG_debug_code) { |
- __ Assert(eq, kExpected0AsASmiSentinel, a3, Operand(zero_reg)); |
+ const char* message = "Expected 0 as a Smi sentinel"; |
+ __ Assert(eq, message, a3, Operand(zero_reg)); |
} |
__ lw(a3, GlobalObjectOperand()); |
__ lw(a3, FieldMemOperand(a3, GlobalObject::kNativeContextOffset)); |
@@ -667,7 +679,7 @@ void FloatingPointHelper::LoadNumber(MacroAssembler* masm, |
Label* not_number) { |
__ AssertRootValue(heap_number_map, |
Heap::kHeapNumberMapRootIndex, |
- kHeapNumberMapRegisterClobbered); |
+ "HeapNumberMap register clobbered."); |
Label is_smi, done; |
@@ -717,7 +729,7 @@ void FloatingPointHelper::ConvertNumberToInt32(MacroAssembler* masm, |
Label* not_number) { |
__ AssertRootValue(heap_number_map, |
Heap::kHeapNumberMapRootIndex, |
- kHeapNumberMapRegisterClobbered); |
+ "HeapNumberMap register clobbered."); |
Label done; |
Label not_in_int32_range; |
@@ -794,7 +806,7 @@ void FloatingPointHelper::LoadNumberAsInt32Double(MacroAssembler* masm, |
__ bind(&obj_is_not_smi); |
__ AssertRootValue(heap_number_map, |
Heap::kHeapNumberMapRootIndex, |
- kHeapNumberMapRegisterClobbered); |
+ "HeapNumberMap register clobbered."); |
__ JumpIfNotHeapNumber(object, heap_number_map, scratch1, not_int32); |
// Load the number. |
@@ -841,7 +853,7 @@ void FloatingPointHelper::LoadNumberAsInt32(MacroAssembler* masm, |
__ AssertRootValue(heap_number_map, |
Heap::kHeapNumberMapRootIndex, |
- kHeapNumberMapRegisterClobbered); |
+ "HeapNumberMap register clobbered."); |
__ JumpIfNotHeapNumber(object, heap_number_map, scratch1, &maybe_undefined); |
@@ -4267,12 +4279,12 @@ void RegExpExecStub::Generate(MacroAssembler* masm) { |
if (FLAG_debug_code) { |
__ And(t0, regexp_data, Operand(kSmiTagMask)); |
__ Check(nz, |
- kUnexpectedTypeForRegExpDataFixedArrayExpected, |
+ "Unexpected type for RegExp data, FixedArray expected", |
t0, |
Operand(zero_reg)); |
__ GetObjectType(regexp_data, a0, a0); |
__ Check(eq, |
- kUnexpectedTypeForRegExpDataFixedArrayExpected, |
+ "Unexpected type for RegExp data, FixedArray expected", |
a0, |
Operand(FIXED_ARRAY_TYPE)); |
} |
@@ -4627,7 +4639,7 @@ void RegExpExecStub::Generate(MacroAssembler* masm) { |
// Sequential strings have already been ruled out. |
__ And(at, a0, Operand(kIsIndirectStringMask)); |
__ Assert(eq, |
- kExternalStringExpectedButNotFound, |
+ "external string expected, but not found", |
at, |
Operand(zero_reg)); |
} |
@@ -5008,7 +5020,7 @@ void StringCharCodeAtGenerator::GenerateFast(MacroAssembler* masm) { |
void StringCharCodeAtGenerator::GenerateSlow( |
MacroAssembler* masm, |
const RuntimeCallHelper& call_helper) { |
- __ Abort(kUnexpectedFallthroughToCharCodeAtSlowCase); |
+ __ Abort("Unexpected fallthrough to CharCodeAt slow case"); |
// Index is not a smi. |
__ bind(&index_not_smi_); |
@@ -5057,7 +5069,7 @@ void StringCharCodeAtGenerator::GenerateSlow( |
call_helper.AfterCall(masm); |
__ jmp(&exit_); |
- __ Abort(kUnexpectedFallthroughFromCharCodeAtSlowCase); |
+ __ Abort("Unexpected fallthrough from CharCodeAt slow case"); |
} |
@@ -5094,7 +5106,7 @@ void StringCharFromCodeGenerator::GenerateFast(MacroAssembler* masm) { |
void StringCharFromCodeGenerator::GenerateSlow( |
MacroAssembler* masm, |
const RuntimeCallHelper& call_helper) { |
- __ Abort(kUnexpectedFallthroughToCharFromCodeSlowCase); |
+ __ Abort("Unexpected fallthrough to CharFromCode slow case"); |
__ bind(&slow_case_); |
call_helper.BeforeCall(masm); |
@@ -5105,7 +5117,7 @@ void StringCharFromCodeGenerator::GenerateSlow( |
call_helper.AfterCall(masm); |
__ Branch(&exit_); |
- __ Abort(kUnexpectedFallthroughFromCharFromCodeSlowCase); |
+ __ Abort("Unexpected fallthrough from CharFromCode slow case"); |
} |
@@ -5160,7 +5172,7 @@ void StringHelper::GenerateCopyCharactersLong(MacroAssembler* masm, |
// that it is. |
__ And(scratch4, dest, Operand(kPointerAlignmentMask)); |
__ Check(eq, |
- kDestinationOfCopyNotAligned, |
+ "Destination of copy not aligned.", |
scratch4, |
Operand(zero_reg)); |
} |
@@ -5360,7 +5372,7 @@ void StringHelper::GenerateTwoCharacterStringTableProbe(MacroAssembler* masm, |
// Must be the hole (deleted entry). |
if (FLAG_debug_code) { |
__ LoadRoot(scratch, Heap::kTheHoleValueRootIndex); |
- __ Assert(eq, kOddballInStringTableIsNotUndefinedOrTheHole, |
+ __ Assert(eq, "oddball in string table is not undefined or the hole", |
scratch, Operand(candidate)); |
} |
__ jmp(&next_probe[i]); |
@@ -6568,7 +6580,7 @@ void DirectCEntryStub::Generate(MacroAssembler* masm) { |
// filled with kZapValue by the GC. |
// Dereference the address and check for this. |
__ lw(t0, MemOperand(t9)); |
- __ Assert(ne, kReceivedInvalidReturnAddress, t0, |
+ __ Assert(ne, "Received invalid return address.", t0, |
Operand(reinterpret_cast<uint32_t>(kZapValue))); |
} |
__ Jump(t9); |
@@ -7319,7 +7331,7 @@ static void CreateArrayDispatch(MacroAssembler* masm) { |
} |
// If we reached this point there is a problem. |
- __ Abort(kUnexpectedElementsKindInArrayConstructor); |
+ __ Abort("Unexpected ElementsKind in array constructor"); |
} |
@@ -7374,7 +7386,7 @@ static void CreateArrayDispatchOneArgument(MacroAssembler* masm) { |
} |
// If we reached this point there is a problem. |
- __ Abort(kUnexpectedElementsKindInArrayConstructor); |
+ __ Abort("Unexpected ElementsKind in array constructor"); |
} |
@@ -7435,10 +7447,10 @@ void ArrayConstructorStub::Generate(MacroAssembler* masm) { |
__ lw(a3, FieldMemOperand(a1, JSFunction::kPrototypeOrInitialMapOffset)); |
// Will both indicate a NULL and a Smi. |
__ And(at, a3, Operand(kSmiTagMask)); |
- __ Assert(ne, kUnexpectedInitialMapForArrayFunction, |
+ __ Assert(ne, "Unexpected initial map for Array function", |
at, Operand(zero_reg)); |
__ GetObjectType(a3, a3, t0); |
- __ Assert(eq, kUnexpectedInitialMapForArrayFunction, |
+ __ Assert(eq, "Unexpected initial map for Array function", |
t0, Operand(MAP_TYPE)); |
// We should either have undefined in a2 or a valid cell. |
@@ -7447,7 +7459,7 @@ void ArrayConstructorStub::Generate(MacroAssembler* masm) { |
__ LoadRoot(at, Heap::kUndefinedValueRootIndex); |
__ Branch(&okay_here, eq, a2, Operand(at)); |
__ lw(a3, FieldMemOperand(a2, 0)); |
- __ Assert(eq, kExpectedPropertyCellInRegisterA2, |
+ __ Assert(eq, "Expected property cell in register a2", |
a3, Operand(cell_map)); |
__ bind(&okay_here); |
} |
@@ -7547,10 +7559,10 @@ void InternalArrayConstructorStub::Generate(MacroAssembler* masm) { |
__ lw(a3, FieldMemOperand(a1, JSFunction::kPrototypeOrInitialMapOffset)); |
// Will both indicate a NULL and a Smi. |
__ And(at, a3, Operand(kSmiTagMask)); |
- __ Assert(ne, kUnexpectedInitialMapForArrayFunction, |
+ __ Assert(ne, "Unexpected initial map for Array function", |
at, Operand(zero_reg)); |
__ GetObjectType(a3, a3, t0); |
- __ Assert(eq, kUnexpectedInitialMapForArrayFunction, |
+ __ Assert(eq, "Unexpected initial map for Array function", |
t0, Operand(MAP_TYPE)); |
} |
@@ -7567,7 +7579,7 @@ void InternalArrayConstructorStub::Generate(MacroAssembler* masm) { |
Label done; |
__ Branch(&done, eq, a3, Operand(FAST_ELEMENTS)); |
__ Assert( |
- eq, kInvalidElementsKindForInternalArrayOrInternalPackedArray, |
+ eq, "Invalid ElementsKind for InternalArray or InternalPackedArray", |
a3, Operand(FAST_HOLEY_ELEMENTS)); |
__ bind(&done); |
} |