MIPS: Change more PlatformCodeStubs to encode properties in the minor key.

Port r23394 (6366610)

BUG=
R=paul.lind@imgtec.com

Review URL: https://codereview.chromium.org/511463002

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23418 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent f097880c
......@@ -1208,7 +1208,7 @@ void MathPowStub::Generate(MacroAssembler* masm) {
const Register scratch2 = t3;
Label call_runtime, done, int_exponent;
if (exponent_type_ == ON_STACK) {
if (exponent_type() == ON_STACK) {
Label base_is_smi, unpack_exponent;
// The exponent and base are supplied as arguments on the stack.
// This can only happen if the stub is called from non-optimized code.
......@@ -1236,7 +1236,7 @@ void MathPowStub::Generate(MacroAssembler* masm) {
__ Branch(&call_runtime, ne, scratch, Operand(heapnumbermap));
__ ldc1(double_exponent,
FieldMemOperand(exponent, HeapNumber::kValueOffset));
} else if (exponent_type_ == TAGGED) {
} else if (exponent_type() == TAGGED) {
// Base is already in double_base.
__ UntagAndJumpIfSmi(scratch, exponent, &int_exponent);
......@@ -1244,7 +1244,7 @@ void MathPowStub::Generate(MacroAssembler* masm) {
FieldMemOperand(exponent, HeapNumber::kValueOffset));
}
if (exponent_type_ != INTEGER) {
if (exponent_type() != INTEGER) {
Label int_exponent_convert;
// Detect integer exponents stored as double.
__ EmitFPUTruncate(kRoundToMinusInf,
......@@ -1257,7 +1257,7 @@ void MathPowStub::Generate(MacroAssembler* masm) {
// scratch2 == 0 means there was no conversion error.
__ Branch(&int_exponent_convert, eq, scratch2, Operand(zero_reg));
if (exponent_type_ == ON_STACK) {
if (exponent_type() == ON_STACK) {
// Detect square root case. Crankshaft detects constant +/-0.5 at
// compile time and uses DoMathPowHalf instead. We then skip this check
// for non-constant cases of +/-0.5 as these hardly occur.
......@@ -1326,7 +1326,7 @@ void MathPowStub::Generate(MacroAssembler* masm) {
__ bind(&int_exponent);
// Get two copies of exponent in the registers scratch and exponent.
if (exponent_type_ == INTEGER) {
if (exponent_type() == INTEGER) {
__ mov(scratch, exponent);
} else {
// Exponent has previously been stored into scratch as untagged integer.
......@@ -1374,7 +1374,7 @@ void MathPowStub::Generate(MacroAssembler* masm) {
// Returning or bailing out.
Counters* counters = isolate()->counters();
if (exponent_type_ == ON_STACK) {
if (exponent_type() == ON_STACK) {
// The arguments are still on the stack.
__ bind(&call_runtime);
__ TailCallRuntime(Runtime::kMathPowRT, 2, 1);
......@@ -3020,7 +3020,7 @@ static void CallFunctionNoFeedback(MacroAssembler* masm,
void CallFunctionStub::Generate(MacroAssembler* masm) {
CallFunctionNoFeedback(masm, argc_, NeedsChecks(), CallAsMethod());
CallFunctionNoFeedback(masm, argc(), NeedsChecks(), CallAsMethod());
}
......@@ -4787,7 +4787,7 @@ void StubFailureTrampolineStub::Generate(MacroAssembler* masm) {
int parameter_count_offset =
StubFailureTrampolineFrame::kCallerStackParameterCountFrameOffset;
__ lw(a1, MemOperand(fp, parameter_count_offset));
if (function_mode_ == JS_FUNCTION_STUB_MODE) {
if (function_mode() == JS_FUNCTION_STUB_MODE) {
__ Addu(a1, a1, Operand(1));
}
masm->LeaveFrame(StackFrame::STUB_FAILURE_TRAMPOLINE);
......@@ -5013,7 +5013,7 @@ void InternalArrayConstructorStubBase::GenerateStubsAheadOfTime(
void ArrayConstructorStub::GenerateDispatchToArrayStub(
MacroAssembler* masm,
AllocationSiteOverrideMode mode) {
if (argument_count_ == ANY) {
if (argument_count() == ANY) {
Label not_zero_case, not_one_case;
__ And(at, a0, a0);
__ Branch(&not_zero_case, ne, at, Operand(zero_reg));
......@@ -5025,11 +5025,11 @@ void ArrayConstructorStub::GenerateDispatchToArrayStub(
__ bind(&not_one_case);
CreateArrayDispatch<ArrayNArgumentsConstructorStub>(masm, mode);
} else if (argument_count_ == NONE) {
} else if (argument_count() == NONE) {
CreateArrayDispatch<ArrayNoArgumentConstructorStub>(masm, mode);
} else if (argument_count_ == ONE) {
} else if (argument_count() == ONE) {
CreateArrayDispatchOneArgument(masm, mode);
} else if (argument_count_ == MORE_THAN_ONE) {
} else if (argument_count() == MORE_THAN_ONE) {
CreateArrayDispatch<ArrayNArgumentsConstructorStub>(masm, mode);
} else {
UNREACHABLE();
......@@ -5039,7 +5039,7 @@ void ArrayConstructorStub::GenerateDispatchToArrayStub(
void ArrayConstructorStub::Generate(MacroAssembler* masm) {
// ----------- S t a t e -------------
// -- a0 : argc (only if argument_count_ == ANY)
// -- a0 : argc (only if argument_count() == ANY)
// -- a1 : constructor
// -- a2 : AllocationSite or undefined
// -- sp[0] : return address
......@@ -5174,9 +5174,9 @@ void CallApiFunctionStub::Generate(MacroAssembler* masm) {
Register api_function_address = a1;
Register context = cp;
int argc = ArgumentBits::decode(bit_field_);
bool is_store = IsStoreBits::decode(bit_field_);
bool call_data_undefined = CallDataUndefinedBits::decode(bit_field_);
int argc = this->argc();
bool is_store = this->is_store();
bool call_data_undefined = this->call_data_undefined();
typedef FunctionCallbackArguments FCA;
......
......@@ -1202,7 +1202,7 @@ void MathPowStub::Generate(MacroAssembler* masm) {
const Register scratch2 = a7;
Label call_runtime, done, int_exponent;
if (exponent_type_ == ON_STACK) {
if (exponent_type() == ON_STACK) {
Label base_is_smi, unpack_exponent;
// The exponent and base are supplied as arguments on the stack.
// This can only happen if the stub is called from non-optimized code.
......@@ -1230,7 +1230,7 @@ void MathPowStub::Generate(MacroAssembler* masm) {
__ Branch(&call_runtime, ne, scratch, Operand(heapnumbermap));
__ ldc1(double_exponent,
FieldMemOperand(exponent, HeapNumber::kValueOffset));
} else if (exponent_type_ == TAGGED) {
} else if (exponent_type() == TAGGED) {
// Base is already in double_base.
__ UntagAndJumpIfSmi(scratch, exponent, &int_exponent);
......@@ -1238,7 +1238,7 @@ void MathPowStub::Generate(MacroAssembler* masm) {
FieldMemOperand(exponent, HeapNumber::kValueOffset));
}
if (exponent_type_ != INTEGER) {
if (exponent_type() != INTEGER) {
Label int_exponent_convert;
// Detect integer exponents stored as double.
__ EmitFPUTruncate(kRoundToMinusInf,
......@@ -1251,7 +1251,7 @@ void MathPowStub::Generate(MacroAssembler* masm) {
// scratch2 == 0 means there was no conversion error.
__ Branch(&int_exponent_convert, eq, scratch2, Operand(zero_reg));
if (exponent_type_ == ON_STACK) {
if (exponent_type() == ON_STACK) {
// Detect square root case. Crankshaft detects constant +/-0.5 at
// compile time and uses DoMathPowHalf instead. We then skip this check
// for non-constant cases of +/-0.5 as these hardly occur.
......@@ -1320,7 +1320,7 @@ void MathPowStub::Generate(MacroAssembler* masm) {
__ bind(&int_exponent);
// Get two copies of exponent in the registers scratch and exponent.
if (exponent_type_ == INTEGER) {
if (exponent_type() == INTEGER) {
__ mov(scratch, exponent);
} else {
// Exponent has previously been stored into scratch as untagged integer.
......@@ -1368,7 +1368,7 @@ void MathPowStub::Generate(MacroAssembler* masm) {
// Returning or bailing out.
Counters* counters = isolate()->counters();
if (exponent_type_ == ON_STACK) {
if (exponent_type() == ON_STACK) {
// The arguments are still on the stack.
__ bind(&call_runtime);
__ TailCallRuntime(Runtime::kMathPowRT, 2, 1);
......@@ -3054,7 +3054,7 @@ static void CallFunctionNoFeedback(MacroAssembler* masm,
void CallFunctionStub::Generate(MacroAssembler* masm) {
CallFunctionNoFeedback(masm, argc_, NeedsChecks(), CallAsMethod());
CallFunctionNoFeedback(masm, argc(), NeedsChecks(), CallAsMethod());
}
......@@ -4824,7 +4824,7 @@ void StubFailureTrampolineStub::Generate(MacroAssembler* masm) {
int parameter_count_offset =
StubFailureTrampolineFrame::kCallerStackParameterCountFrameOffset;
__ ld(a1, MemOperand(fp, parameter_count_offset));
if (function_mode_ == JS_FUNCTION_STUB_MODE) {
if (function_mode() == JS_FUNCTION_STUB_MODE) {
__ Daddu(a1, a1, Operand(1));
}
masm->LeaveFrame(StackFrame::STUB_FAILURE_TRAMPOLINE);
......@@ -5050,7 +5050,7 @@ void InternalArrayConstructorStubBase::GenerateStubsAheadOfTime(
void ArrayConstructorStub::GenerateDispatchToArrayStub(
MacroAssembler* masm,
AllocationSiteOverrideMode mode) {
if (argument_count_ == ANY) {
if (argument_count() == ANY) {
Label not_zero_case, not_one_case;
__ And(at, a0, a0);
__ Branch(&not_zero_case, ne, at, Operand(zero_reg));
......@@ -5062,11 +5062,11 @@ void ArrayConstructorStub::GenerateDispatchToArrayStub(
__ bind(&not_one_case);
CreateArrayDispatch<ArrayNArgumentsConstructorStub>(masm, mode);
} else if (argument_count_ == NONE) {
} else if (argument_count() == NONE) {
CreateArrayDispatch<ArrayNoArgumentConstructorStub>(masm, mode);
} else if (argument_count_ == ONE) {
} else if (argument_count() == ONE) {
CreateArrayDispatchOneArgument(masm, mode);
} else if (argument_count_ == MORE_THAN_ONE) {
} else if (argument_count() == MORE_THAN_ONE) {
CreateArrayDispatch<ArrayNArgumentsConstructorStub>(masm, mode);
} else {
UNREACHABLE();
......@@ -5076,7 +5076,7 @@ void ArrayConstructorStub::GenerateDispatchToArrayStub(
void ArrayConstructorStub::Generate(MacroAssembler* masm) {
// ----------- S t a t e -------------
// -- a0 : argc (only if argument_count_ == ANY)
// -- a0 : argc (only if argument_count() == ANY)
// -- a1 : constructor
// -- a2 : AllocationSite or undefined
// -- sp[0] : return address
......@@ -5211,9 +5211,9 @@ void CallApiFunctionStub::Generate(MacroAssembler* masm) {
Register api_function_address = a1;
Register context = cp;
int argc = ArgumentBits::decode(bit_field_);
bool is_store = IsStoreBits::decode(bit_field_);
bool call_data_undefined = CallDataUndefinedBits::decode(bit_field_);
int argc = this->argc();
bool is_store = this->is_store();
bool call_data_undefined = this->call_data_undefined();
typedef FunctionCallbackArguments FCA;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment