| Index: src/mips/ic-mips.cc
|
| ===================================================================
|
| --- src/mips/ic-mips.cc (revision 9808)
|
| +++ src/mips/ic-mips.cc (working copy)
|
| @@ -384,10 +384,10 @@
|
|
|
| // The generated code does not accept smi keys.
|
| // The generated code falls through if both probes miss.
|
| -static void GenerateMonomorphicCacheProbe(MacroAssembler* masm,
|
| - int argc,
|
| - Code::Kind kind,
|
| - Code::ExtraICState extra_ic_state) {
|
| +void CallICBase::GenerateMonomorphicCacheProbe(MacroAssembler* masm,
|
| + int argc,
|
| + Code::Kind kind,
|
| + Code::ExtraICState extra_state) {
|
| // ----------- S t a t e -------------
|
| // -- a1 : receiver
|
| // -- a2 : name
|
| @@ -397,7 +397,7 @@
|
| // Probe the stub cache.
|
| Code::Flags flags = Code::ComputeFlags(kind,
|
| MONOMORPHIC,
|
| - extra_ic_state,
|
| + extra_state,
|
| NORMAL,
|
| argc);
|
| Isolate::Current()->stub_cache()->GenerateProbe(
|
| @@ -463,7 +463,7 @@
|
| }
|
|
|
|
|
| -static void GenerateCallNormal(MacroAssembler* masm, int argc) {
|
| +void CallICBase::GenerateNormal(MacroAssembler* masm, int argc) {
|
| // ----------- S t a t e -------------
|
| // -- a2 : name
|
| // -- ra : return address
|
| @@ -486,10 +486,10 @@
|
| }
|
|
|
|
|
| -static void GenerateCallMiss(MacroAssembler* masm,
|
| - int argc,
|
| - IC::UtilityId id,
|
| - Code::ExtraICState extra_ic_state) {
|
| +void CallICBase::GenerateMiss(MacroAssembler* masm,
|
| + int argc,
|
| + IC::UtilityId id,
|
| + Code::ExtraICState extra_state) {
|
| // ----------- S t a t e -------------
|
| // -- a2 : name
|
| // -- ra : return address
|
| @@ -540,7 +540,7 @@
|
| __ bind(&invoke);
|
| }
|
| // Invoke the function.
|
| - CallKind call_kind = CallICBase::Contextual::decode(extra_ic_state)
|
| + CallKind call_kind = CallICBase::Contextual::decode(extra_state)
|
| ? CALL_AS_FUNCTION
|
| : CALL_AS_METHOD;
|
| ParameterCount actual(argc);
|
| @@ -552,18 +552,6 @@
|
| }
|
|
|
|
|
| -void CallIC::GenerateMiss(MacroAssembler* masm,
|
| - int argc,
|
| - Code::ExtraICState extra_ic_state) {
|
| - // ----------- S t a t e -------------
|
| - // -- a2 : name
|
| - // -- ra : return address
|
| - // -----------------------------------
|
| -
|
| - GenerateCallMiss(masm, argc, IC::kCallIC_Miss, extra_ic_state);
|
| -}
|
| -
|
| -
|
| void CallIC::GenerateMegamorphic(MacroAssembler* masm,
|
| int argc,
|
| Code::ExtraICState extra_ic_state) {
|
| @@ -579,27 +567,6 @@
|
| }
|
|
|
|
|
| -void CallIC::GenerateNormal(MacroAssembler* masm, int argc) {
|
| - // ----------- S t a t e -------------
|
| - // -- a2 : name
|
| - // -- ra : return address
|
| - // -----------------------------------
|
| -
|
| - GenerateCallNormal(masm, argc);
|
| - GenerateMiss(masm, argc, Code::kNoExtraICState);
|
| -}
|
| -
|
| -
|
| -void KeyedCallIC::GenerateMiss(MacroAssembler* masm, int argc) {
|
| - // ----------- S t a t e -------------
|
| - // -- a2 : name
|
| - // -- ra : return address
|
| - // -----------------------------------
|
| -
|
| - GenerateCallMiss(masm, argc, IC::kKeyedCallIC_Miss, Code::kNoExtraICState);
|
| -}
|
| -
|
| -
|
| void KeyedCallIC::GenerateMegamorphic(MacroAssembler* masm, int argc) {
|
| // ----------- S t a t e -------------
|
| // -- a2 : name
|
| @@ -716,7 +683,7 @@
|
| __ JumpIfSmi(a2, &miss);
|
| __ IsObjectJSStringType(a2, a0, &miss);
|
|
|
| - GenerateCallNormal(masm, argc);
|
| + CallICBase::GenerateNormal(masm, argc);
|
| __ bind(&miss);
|
| GenerateMiss(masm, argc);
|
| }
|
| @@ -1421,6 +1388,47 @@
|
| }
|
|
|
|
|
| +void KeyedStoreIC::GenerateTransitionElementsSmiToDouble(MacroAssembler* masm) {
|
| + // ---------- S t a t e --------------
|
| + // -- a2 : receiver
|
| + // -- a3 : target map
|
| + // -- ra : return address
|
| + // -----------------------------------
|
| + // Must return the modified receiver in v0.
|
| + if (!FLAG_trace_elements_transitions) {
|
| + Label fail;
|
| + ElementsTransitionGenerator::GenerateSmiOnlyToDouble(masm, &fail);
|
| + __ Ret(USE_DELAY_SLOT);
|
| + __ mov(v0, a2);
|
| + __ bind(&fail);
|
| + }
|
| +
|
| + __ push(a2);
|
| + __ TailCallRuntime(Runtime::kTransitionElementsSmiToDouble, 1, 1);
|
| +}
|
| +
|
| +
|
| +void KeyedStoreIC::GenerateTransitionElementsDoubleToObject(
|
| + MacroAssembler* masm) {
|
| + // ---------- S t a t e --------------
|
| + // -- a2 : receiver
|
| + // -- a3 : target map
|
| + // -- ra : return address
|
| + // -----------------------------------
|
| + // Must return the modified receiver in v0.
|
| + if (!FLAG_trace_elements_transitions) {
|
| + Label fail;
|
| + ElementsTransitionGenerator::GenerateDoubleToObject(masm, &fail);
|
| + __ Ret(USE_DELAY_SLOT);
|
| + __ mov(v0, a2);
|
| + __ bind(&fail);
|
| + }
|
| +
|
| + __ push(a2);
|
| + __ TailCallRuntime(Runtime::kTransitionElementsDoubleToObject, 1, 1);
|
| +}
|
| +
|
| +
|
| void StoreIC::GenerateMegamorphic(MacroAssembler* masm,
|
| StrictModeFlag strict_mode) {
|
| // ----------- S t a t e -------------
|
| @@ -1560,11 +1568,9 @@
|
| case Token::LT:
|
| return lt;
|
| case Token::GT:
|
| - // Reverse left and right operands to obtain ECMA-262 conversion order.
|
| - return lt;
|
| + return gt;
|
| case Token::LTE:
|
| - // Reverse left and right operands to obtain ECMA-262 conversion order.
|
| - return ge;
|
| + return le;
|
| case Token::GTE:
|
| return ge;
|
| default:
|
|
|