Title: [157546] trunk/Source/_javascript_Core
Revision
157546
Author
[email protected]
Date
2013-10-16 18:23:56 -0700 (Wed, 16 Oct 2013)

Log Message

transition void cti_op_put_by_val* stubs to JIT operations
https://bugs.webkit.org/show_bug.cgi?id=122903

Reviewed by Geoffrey Garen.

Transitioned cti_op_put_by_val and cti_op_put_by_val_generic to operationPutByVal and
operationPutByValGeneric.

* jit/CCallHelpers.h:
(JSC::CCallHelpers::setupArgumentsWithExecState):
* jit/JIT.h:
* jit/JITInlines.h:
(JSC::JIT::callOperation):
* jit/JITOperations.cpp:
* jit/JITOperations.h:
* jit/JITPropertyAccess.cpp:
(JSC::JIT::emitSlow_op_put_by_val):
(JSC::JIT::privateCompilePutByVal):
* jit/JITPropertyAccess32_64.cpp:
(JSC::JIT::emitSlow_op_put_by_val):
* jit/JITStubs.cpp:
* jit/JITStubs.h:
* jit/JSInterfaceJIT.h:

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (157545 => 157546)


--- trunk/Source/_javascript_Core/ChangeLog	2013-10-17 01:02:34 UTC (rev 157545)
+++ trunk/Source/_javascript_Core/ChangeLog	2013-10-17 01:23:56 UTC (rev 157546)
@@ -1,3 +1,29 @@
+2013-10-16  Michael Saboff  <[email protected]>
+
+        transition void cti_op_put_by_val* stubs to JIT operations
+        https://bugs.webkit.org/show_bug.cgi?id=122903
+
+        Reviewed by Geoffrey Garen.
+
+        Transitioned cti_op_put_by_val and cti_op_put_by_val_generic to operationPutByVal and
+        operationPutByValGeneric.
+
+        * jit/CCallHelpers.h:
+        (JSC::CCallHelpers::setupArgumentsWithExecState):
+        * jit/JIT.h:
+        * jit/JITInlines.h:
+        (JSC::JIT::callOperation):
+        * jit/JITOperations.cpp:
+        * jit/JITOperations.h:
+        * jit/JITPropertyAccess.cpp:
+        (JSC::JIT::emitSlow_op_put_by_val):
+        (JSC::JIT::privateCompilePutByVal):
+        * jit/JITPropertyAccess32_64.cpp:
+        (JSC::JIT::emitSlow_op_put_by_val):
+        * jit/JITStubs.cpp:
+        * jit/JITStubs.h:
+        * jit/JSInterfaceJIT.h:
+
 2013-10-16  Oliver Hunt  <[email protected]>
 
         Implement ES6 spread operator

Modified: trunk/Source/_javascript_Core/jit/CCallHelpers.h (157545 => 157546)


--- trunk/Source/_javascript_Core/jit/CCallHelpers.h	2013-10-17 01:02:34 UTC (rev 157545)
+++ trunk/Source/_javascript_Core/jit/CCallHelpers.h	2013-10-17 01:23:56 UTC (rev 157546)
@@ -401,7 +401,7 @@
         addCallArgument(arg4);
     }
 
-ALWAYS_INLINE void setupArgumentsWithExecState(GPRReg arg1, GPRReg arg2, GPRReg arg3, GPRReg arg4, GPRReg arg5)
+    ALWAYS_INLINE void setupArgumentsWithExecState(GPRReg arg1, GPRReg arg2, GPRReg arg3, GPRReg arg4, GPRReg arg5)
     {
         resetCallArguments();
         addCallArgument(GPRInfo::callFrameRegister);
@@ -456,6 +456,18 @@
         addCallArgument(arg5);
     }
 
+    ALWAYS_INLINE void setupArgumentsWithExecState(GPRReg arg1, GPRReg arg2, GPRReg arg3, GPRReg arg4, GPRReg arg5, GPRReg arg6)
+    {
+        resetCallArguments();
+        addCallArgument(GPRInfo::callFrameRegister);
+        addCallArgument(arg1);
+        addCallArgument(arg2);
+        addCallArgument(arg3);
+        addCallArgument(arg4);
+        addCallArgument(arg5);
+        addCallArgument(arg6);
+    }
+
     ALWAYS_INLINE void setupArgumentsWithExecState(FPRReg arg1, GPRReg arg2)
     {
         resetCallArguments();
@@ -1231,6 +1243,14 @@
         setupArgumentsWithExecState(arg1, arg2, arg3);
     }
 
+    ALWAYS_INLINE void setupArgumentsWithExecState(GRPReg arg1, GPRReg arg2, GPRReg arg3, GPRReg arg4, GPRReg arg5 GPRReg arg6)
+    {
+        poke(arg6, POKE_ARGUMENT_OFFSET + 2);
+        poke(arg5, POKE_ARGUMENT_OFFSET + 1);
+        poke(arg4, POKE_ARGUMENT_OFFSET);
+        setupArgumentsWithExecState(arg1, arg2, arg3);
+    }
+
     ALWAYS_INLINE void setupArgumentsWithExecState(GPRReg arg1, GPRReg arg2, TrustedImm32 arg3, GPRReg arg4, GPRReg arg5, TrustedImm32 arg6)
     {
         poke(arg6, POKE_ARGUMENT_OFFSET + 2);
@@ -1254,6 +1274,23 @@
         setupArgumentsWithExecState(arg1, arg2, arg3);
     }
 
+    ALWAYS_INLINE void setupArgumentsWithExecState(TrustedImm32 arg1, GPRReg arg2, GPRReg arg3, GPRReg arg4, GPRReg arg5 GPRReg arg6, GRPReg arg7)
+    {
+        poke(arg7, POKE_ARGUMENT_OFFSET + 3);
+        poke(arg6, POKE_ARGUMENT_OFFSET + 2);
+        poke(arg5, POKE_ARGUMENT_OFFSET + 1);
+        poke(arg4, POKE_ARGUMENT_OFFSET);
+        setupArgumentsWithExecState(arg1, arg2, arg3);
+    }
+
+    ALWAYS_INLINE void setupArgumentsWithExecState(GPRReg arg1, GPRReg arg2, TrustedImm32 arg3, GPRReg arg4, GPRReg arg5 GPRReg arg6, GRPReg arg7)
+    {
+        poke(arg7, POKE_ARGUMENT_OFFSET + 3);
+        poke(arg6, POKE_ARGUMENT_OFFSET + 2);
+        poke(arg5, POKE_ARGUMENT_OFFSET + 1);
+        poke(arg4, POKE_ARGUMENT_OFFSET);
+        setupArgumentsWithExecState(arg1, arg2, arg3);
+    }
 #endif // NUMBER_OF_ARGUMENT_REGISTERS == 4
 
 #if NUMBER_OF_ARGUMENT_REGISTERS >= 5

Modified: trunk/Source/_javascript_Core/jit/JIT.h (157545 => 157546)


--- trunk/Source/_javascript_Core/jit/JIT.h	2013-10-17 01:02:34 UTC (rev 157545)
+++ trunk/Source/_javascript_Core/jit/JIT.h	2013-10-17 01:23:56 UTC (rev 157546)
@@ -803,6 +803,7 @@
 #else
         MacroAssembler::Call callOperation(V_JITOperation_EJJI, RegisterID, RegisterID, RegisterID, RegisterID, StringImpl*);
 #endif
+        MacroAssembler::Call callOperation(V_JITOperation_EJJJ, RegisterID, RegisterID, RegisterID);
         MacroAssembler::Call callOperation(V_JITOperation_EJZJ, RegisterID, int32_t, RegisterID);
         MacroAssembler::Call callOperation(V_JITOperation_EJZ, RegisterID, int32_t);
         MacroAssembler::Call callOperation(V_JITOperation_EPc, Instruction*);
@@ -821,6 +822,7 @@
         MacroAssembler::Call callOperation(S_JITOperation_EJJ, RegisterID, RegisterID, RegisterID, RegisterID);
         MacroAssembler::Call callOperation(V_JITOperation_EIdJZ, const Identifier*, RegisterID, RegisterID, int32_t);
         MacroAssembler::Call callOperation(V_JITOperation_EJ, RegisterID, RegisterID);
+        MacroAssembler::Call callOperation(V_JITOperation_EJJJ, RegisterID, RegisterID, RegisterID, RegisterID, RegisterID, RegisterID);
         MacroAssembler::Call callOperation(V_JITOperation_EJZ, RegisterID, RegisterID, int32_t);
         MacroAssembler::Call callOperation(V_JITOperation_EJZJ, RegisterID, RegisterID, int32_t, RegisterID, RegisterID);
 #endif

Modified: trunk/Source/_javascript_Core/jit/JITInlines.h (157545 => 157546)


--- trunk/Source/_javascript_Core/jit/JITInlines.h	2013-10-17 01:02:34 UTC (rev 157545)
+++ trunk/Source/_javascript_Core/jit/JITInlines.h	2013-10-17 01:23:56 UTC (rev 157546)
@@ -206,6 +206,12 @@
     return appendCallWithExceptionCheck(operation);
 }
 
+ALWAYS_INLINE MacroAssembler::Call JIT::callOperation(V_JITOperation_EJJJ operation, RegisterID regOp1, RegisterID regOp2, RegisterID regOp3)
+{
+    setupArgumentsWithExecState(regOp1, regOp2, regOp3);
+    return appendCallWithExceptionCheck(operation);
+}
+
 ALWAYS_INLINE MacroAssembler::Call JIT::callOperation(JIT::WithProfileTag, J_JITOperation_EJI operation, int dst, GPRReg arg1, StringImpl* uid)
 {
     setupArgumentsWithExecState(arg1, TrustedImmPtr(uid));
@@ -500,6 +506,12 @@
     return appendCallWithExceptionCheck(operation);
 }
 
+ALWAYS_INLINE MacroAssembler::Call JIT::callOperation(V_JITOperation_EJJJ operation, RegisterID regOp1Payload, RegisterID regOp1Tag, RegisterID regOp2Payload, RegisterID regOp2Tag, RegisterID regOp3Payload, RegisterID regOp3Tag)
+{
+    setupArgumentsWithExecState(EABI_32BIT_DUMMY_ARG regOp1Payload, regOp1Tag, SH4_32BIT_DUMMY_ARG regOp2Payload, regOp2Tag, regOp3Payload, regOp3Tag);
+    return appendCallWithExceptionCheck(operation);
+}
+
 ALWAYS_INLINE MacroAssembler::Call JIT::callOperation(V_JITOperation_EJZ operation, RegisterID regOp1Tag, RegisterID regOp1Payload, int32_t op2)
 {
     setupArgumentsWithExecState(EABI_32BIT_DUMMY_ARG regOp1Payload, regOp1Tag, TrustedImm32(op2));

Modified: trunk/Source/_javascript_Core/jit/JITOperations.cpp (157545 => 157546)


--- trunk/Source/_javascript_Core/jit/JITOperations.cpp	2013-10-17 01:02:34 UTC (rev 157545)
+++ trunk/Source/_javascript_Core/jit/JITOperations.cpp	2013-10-17 01:23:56 UTC (rev 157546)
@@ -29,6 +29,7 @@
 
 #include "Arguments.h"
 #include "ArrayConstructor.h"
+#include "CallFrameInlines.h"
 #include "CommonSlowPaths.h"
 #include "DFGCompilationMode.h"
 #include "DFGDriver.h"
@@ -37,6 +38,7 @@
 #include "Error.h"
 #include "GetterSetter.h"
 #include "HostCallReturnValue.h"
+#include "JIT.h"
 #include "JITOperationWrappers.h"
 #include "JITToDFGDeferredCompilationCallback.h"
 #include "JSGlobalObjectFunctions.h"
@@ -46,6 +48,7 @@
 #include "ObjectConstructor.h"
 #include "Operations.h"
 #include "Repatch.h"
+#include "RepatchBuffer.h"
 
 namespace JSC {
 
@@ -471,6 +474,88 @@
     base->putDirect(vm, offset, JSValue::decode(value));
 }
 
+static void putByVal(CallFrame* callFrame, JSValue baseValue, JSValue subscript, JSValue value)
+{
+    if (LIKELY(subscript.isUInt32())) {
+        uint32_t i = subscript.asUInt32();
+        if (baseValue.isObject()) {
+            JSObject* object = asObject(baseValue);
+            if (object->canSetIndexQuickly(i))
+                object->setIndexQuickly(callFrame->vm(), i, value);
+            else
+                object->methodTable()->putByIndex(object, callFrame, i, value, callFrame->codeBlock()->isStrictMode());
+        } else
+            baseValue.putByIndex(callFrame, i, value, callFrame->codeBlock()->isStrictMode());
+    } else if (isName(subscript)) {
+        PutPropertySlot slot(callFrame->codeBlock()->isStrictMode());
+        baseValue.put(callFrame, jsCast<NameInstance*>(subscript.asCell())->privateName(), value, slot);
+    } else {
+        Identifier property(callFrame, subscript.toString(callFrame)->value(callFrame));
+        if (!callFrame->vm().exception()) { // Don't put to an object if toString threw an exception.
+            PutPropertySlot slot(callFrame->codeBlock()->isStrictMode());
+            baseValue.put(callFrame, property, value, slot);
+        }
+    }
+}
+
+void JIT_OPERATION operationPutByVal(ExecState* exec, EncodedJSValue encodedBaseValue, EncodedJSValue encodedSubscript, EncodedJSValue encodedValue)
+{
+    VM& vm = exec->vm();
+    NativeCallFrameTracer tracer(&vm, exec);
+
+    JSValue baseValue = JSValue::decode(encodedBaseValue);
+    JSValue subscript = JSValue::decode(encodedSubscript);
+    JSValue value = JSValue::decode(encodedValue);
+
+    if (baseValue.isObject() && subscript.isInt32()) {
+        // See if it's worth optimizing at all.
+        JSObject* object = asObject(baseValue);
+        bool didOptimize = false;
+
+        unsigned bytecodeOffset = exec->locationAsBytecodeOffset();
+        ASSERT(bytecodeOffset);
+        ByValInfo& byValInfo = exec->codeBlock()->getByValInfo(bytecodeOffset - 1);
+        ASSERT(!byValInfo.stubRoutine);
+
+        if (hasOptimizableIndexing(object->structure())) {
+            // Attempt to optimize.
+            JITArrayMode arrayMode = jitArrayModeForStructure(object->structure());
+            if (arrayMode != byValInfo.arrayMode) {
+                JIT::compilePutByVal(&vm, exec->codeBlock(), &byValInfo, ReturnAddressPtr(OUR_RETURN_ADDRESS), arrayMode);
+                didOptimize = true;
+            }
+        }
+
+        if (!didOptimize) {
+            // If we take slow path more than 10 times without patching then make sure we
+            // never make that mistake again. Or, if we failed to patch and we have some object
+            // that intercepts indexed get, then don't even wait until 10 times. For cases
+            // where we see non-index-intercepting objects, this gives 10 iterations worth of
+            // opportunity for us to observe that the get_by_val may be polymorphic.
+            if (++byValInfo.slowPathCount >= 10
+                || object->structure()->typeInfo().interceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero()) {
+                // Don't ever try to optimize.
+                RepatchBuffer repatchBuffer(exec->codeBlock());
+                repatchBuffer.relinkCallerToFunction(ReturnAddressPtr(OUR_RETURN_ADDRESS), FunctionPtr(operationPutByValGeneric));
+            }
+        }
+    }
+
+    putByVal(exec, baseValue, subscript, value);
+}
+
+void JIT_OPERATION operationPutByValGeneric(ExecState* exec, EncodedJSValue encodedBaseValue, EncodedJSValue encodedSubscript, EncodedJSValue encodedValue)
+{
+    VM& vm = exec->vm();
+    NativeCallFrameTracer tracer(&vm, exec);
+    
+    JSValue baseValue = JSValue::decode(encodedBaseValue);
+    JSValue subscript = JSValue::decode(encodedSubscript);
+    JSValue value = JSValue::decode(encodedValue);
+
+    putByVal(exec, baseValue, subscript, value);
+}
+
 EncodedJSValue JIT_OPERATION operationCallEval(ExecState* execCallee)
 {
     CallFrame* callerFrame = execCallee->callerFrame();

Modified: trunk/Source/_javascript_Core/jit/JITOperations.h (157545 => 157546)


--- trunk/Source/_javascript_Core/jit/JITOperations.h	2013-10-17 01:02:34 UTC (rev 157545)
+++ trunk/Source/_javascript_Core/jit/JITOperations.h	2013-10-17 01:23:56 UTC (rev 157546)
@@ -232,6 +232,8 @@
 void JIT_OPERATION operationPutByIdDirectStrictBuildList(ExecState*, EncodedJSValue encodedValue, EncodedJSValue encodedBase, StringImpl*) WTF_INTERNAL;
 void JIT_OPERATION operationPutByIdDirectNonStrictBuildList(ExecState*, EncodedJSValue encodedValue, EncodedJSValue encodedBase, StringImpl*) WTF_INTERNAL;
 void JIT_OPERATION operationReallocateStorageAndFinishPut(ExecState*, JSObject*, Structure*, PropertyOffset, EncodedJSValue) WTF_INTERNAL;
+void JIT_OPERATION operationPutByVal(ExecState*, EncodedJSValue, EncodedJSValue, EncodedJSValue) WTF_INTERNAL;
+void JIT_OPERATION operationPutByValGeneric(ExecState*, EncodedJSValue, EncodedJSValue, EncodedJSValue) WTF_INTERNAL;
 EncodedJSValue JIT_OPERATION operationCallEval(ExecState*) WTF_INTERNAL;
 char* JIT_OPERATION operationVirtualCall(ExecState*) WTF_INTERNAL;
 char* JIT_OPERATION operationLinkCall(ExecState*) WTF_INTERNAL;

Modified: trunk/Source/_javascript_Core/jit/JITPropertyAccess.cpp (157545 => 157546)


--- trunk/Source/_javascript_Core/jit/JITPropertyAccess.cpp	2013-10-17 01:02:34 UTC (rev 157545)
+++ trunk/Source/_javascript_Core/jit/JITPropertyAccess.cpp	2013-10-17 01:23:56 UTC (rev 157546)
@@ -476,11 +476,9 @@
     
     Label slowPath = label();
 
-    JITStubCall stubPutByValCall(this, cti_op_put_by_val);
-    stubPutByValCall.addArgument(regT0);
-    stubPutByValCall.addArgument(property, regT2);
-    stubPutByValCall.addArgument(value, regT2);
-    Call call = stubPutByValCall.call();
+    emitGetVirtualRegister(property, regT1);
+    emitGetVirtualRegister(value, regT2);
+    Call call = callOperation(operationPutByVal, regT0, regT1, regT2);
 
     m_byValCompilationInfo[m_byValInstructionIndex].slowPathTarget = slowPath;
     m_byValCompilationInfo[m_byValInstructionIndex].returnAddress = call;
@@ -1041,7 +1039,7 @@
     
     RepatchBuffer repatchBuffer(m_codeBlock);
     repatchBuffer.relink(byValInfo->badTypeJump, CodeLocationLabel(byValInfo->stubRoutine->code().code()));
-    repatchBuffer.relinkCallerToFunction(returnAddress, FunctionPtr(cti_op_put_by_val_generic));
+    repatchBuffer.relinkCallerToFunction(returnAddress, FunctionPtr(operationPutByValGeneric));
 }
 
 JIT::JumpList JIT::emitIntTypedArrayGetByVal(Instruction*, PatchableJump& badType, TypedArrayType type)

Modified: trunk/Source/_javascript_Core/jit/JITPropertyAccess32_64.cpp (157545 => 157546)


--- trunk/Source/_javascript_Core/jit/JITPropertyAccess32_64.cpp	2013-10-17 01:02:34 UTC (rev 157545)
+++ trunk/Source/_javascript_Core/jit/JITPropertyAccess32_64.cpp	2013-10-17 01:23:56 UTC (rev 157546)
@@ -437,13 +437,32 @@
     skipProfiling.link(this);
 
     Label slowPath = label();
-    
-    JITStubCall stubPutByValCall(this, cti_op_put_by_val);
-    stubPutByValCall.addArgument(base);
-    stubPutByValCall.addArgument(property);
-    stubPutByValCall.addArgument(value);
-    Call call = stubPutByValCall.call();
-    
+
+#if CPU(X86)
+    // FIXME: We only have 5 temp registers, but need 6 to make this call, therefore we materialize
+    // our own call. When we finish moving JSC to the C call stack, we'll get another register so
+    // we can use the normal case.
+    resetCallArguments();
+    addCallArgument(GPRInfo::callFrameRegister);
+    emitLoad(base, regT0, regT1);
+    addCallArgument(regT1);
+    addCallArgument(regT0);
+    emitLoad(property, regT0, regT1);
+    addCallArgument(regT1);
+    addCallArgument(regT0);
+    emitLoad(value, regT0, regT1);
+    addCallArgument(regT1);
+    addCallArgument(regT0);
+    Call call = appendCallWithExceptionCheck(operationPutByVal);
+#else
+    // The register selection below is chosen to reduce register swapping on ARM.
+    // Swapping shouldn't happen on other platforms.
+    emitLoad(base, regT2, regT1);
+    emitLoad(property, regT3, regT0);
+    emitLoad(value, regT5, regT4);
+    Call call = callOperation(operationPutByVal, regT2, regT1, regT3, regT0, regT5, regT4);
+#endif
+
     m_byValCompilationInfo[m_byValInstructionIndex].slowPathTarget = slowPath;
     m_byValCompilationInfo[m_byValInstructionIndex].returnAddress = call;
     m_byValInstructionIndex++;

Modified: trunk/Source/_javascript_Core/jit/JITStubs.cpp (157545 => 157546)


--- trunk/Source/_javascript_Core/jit/JITStubs.cpp	2013-10-17 01:02:34 UTC (rev 157545)
+++ trunk/Source/_javascript_Core/jit/JITStubs.cpp	2013-10-17 01:23:56 UTC (rev 157546)
@@ -405,94 +405,6 @@
     return JSValue::encode(result);
 }
 
-static void putByVal(CallFrame* callFrame, JSValue baseValue, JSValue subscript, JSValue value)
-{
-    if (LIKELY(subscript.isUInt32())) {
-        uint32_t i = subscript.asUInt32();
-        if (baseValue.isObject()) {
-            JSObject* object = asObject(baseValue);
-            if (object->canSetIndexQuickly(i))
-                object->setIndexQuickly(callFrame->vm(), i, value);
-            else
-                object->methodTable()->putByIndex(object, callFrame, i, value, callFrame->codeBlock()->isStrictMode());
-        } else
-            baseValue.putByIndex(callFrame, i, value, callFrame->codeBlock()->isStrictMode());
-    } else if (isName(subscript)) {
-        PutPropertySlot slot(callFrame->codeBlock()->isStrictMode());
-        baseValue.put(callFrame, jsCast<NameInstance*>(subscript.asCell())->privateName(), value, slot);
-    } else {
-        Identifier property(callFrame, subscript.toString(callFrame)->value(callFrame));
-        if (!callFrame->vm().exception()) { // Don't put to an object if toString threw an exception.
-            PutPropertySlot slot(callFrame->codeBlock()->isStrictMode());
-            baseValue.put(callFrame, property, value, slot);
-        }
-    }
-}
-
-DEFINE_STUB_FUNCTION(void, op_put_by_val)
-{
-    STUB_INIT_STACK_FRAME(stackFrame);
-
-    CallFrame* callFrame = stackFrame.callFrame;
-
-    JSValue baseValue = stackFrame.args[0].jsValue();
-    JSValue subscript = stackFrame.args[1].jsValue();
-    JSValue value = stackFrame.args[2].jsValue();
-    
-    if (baseValue.isObject() && subscript.isInt32()) {
-        // See if it's worth optimizing at all.
-        JSObject* object = asObject(baseValue);
-        bool didOptimize = false;
-
-        unsigned bytecodeOffset = callFrame->locationAsBytecodeOffset();
-        ASSERT(bytecodeOffset);
-        ByValInfo& byValInfo = callFrame->codeBlock()->getByValInfo(bytecodeOffset - 1);
-        ASSERT(!byValInfo.stubRoutine);
-        
-        if (hasOptimizableIndexing(object->structure())) {
-            // Attempt to optimize.
-            JITArrayMode arrayMode = jitArrayModeForStructure(object->structure());
-            if (arrayMode != byValInfo.arrayMode) {
-                JIT::compilePutByVal(&callFrame->vm(), callFrame->codeBlock(), &byValInfo, STUB_RETURN_ADDRESS, arrayMode);
-                didOptimize = true;
-            }
-        }
-
-        if (!didOptimize) {
-            // If we take slow path more than 10 times without patching then make sure we
-            // never make that mistake again. Or, if we failed to patch and we have some object
-            // that intercepts indexed get, then don't even wait until 10 times. For cases
-            // where we see non-index-intercepting objects, this gives 10 iterations worth of
-            // opportunity for us to observe that the get_by_val may be polymorphic.
-            if (++byValInfo.slowPathCount >= 10
-                || object->structure()->typeInfo().interceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero()) {
-                // Don't ever try to optimize.
-                RepatchBuffer repatchBuffer(callFrame->codeBlock());
-                repatchBuffer.relinkCallerToFunction(STUB_RETURN_ADDRESS, FunctionPtr(cti_op_put_by_val_generic));
-            }
-        }
-    }
-    
-    putByVal(callFrame, baseValue, subscript, value);
-
-    CHECK_FOR_EXCEPTION_AT_END();
-}
-
-DEFINE_STUB_FUNCTION(void, op_put_by_val_generic)
-{
-    STUB_INIT_STACK_FRAME(stackFrame);
-
-    CallFrame* callFrame = stackFrame.callFrame;
-
-    JSValue baseValue = stackFrame.args[0].jsValue();
-    JSValue subscript = stackFrame.args[1].jsValue();
-    JSValue value = stackFrame.args[2].jsValue();
-    
-    putByVal(callFrame, baseValue, subscript, value);
-
-    CHECK_FOR_EXCEPTION_AT_END();
-}
-
 DEFINE_STUB_FUNCTION(void*, op_throw)
 {
     STUB_INIT_STACK_FRAME(stackFrame);

Modified: trunk/Source/_javascript_Core/jit/JITStubs.h (157545 => 157546)


--- trunk/Source/_javascript_Core/jit/JITStubs.h	2013-10-17 01:02:34 UTC (rev 157545)
+++ trunk/Source/_javascript_Core/jit/JITStubs.h	2013-10-17 01:23:56 UTC (rev 157546)
@@ -359,8 +359,6 @@
 EncodedJSValue JIT_STUB cti_op_get_by_val(STUB_ARGS_DECLARATION) WTF_INTERNAL;
 EncodedJSValue JIT_STUB cti_op_get_by_val_generic(STUB_ARGS_DECLARATION) WTF_INTERNAL;
 EncodedJSValue JIT_STUB cti_op_get_by_val_string(STUB_ARGS_DECLARATION) WTF_INTERNAL;
-void JIT_STUB cti_op_put_by_val(STUB_ARGS_DECLARATION) WTF_INTERNAL;
-void JIT_STUB cti_op_put_by_val_generic(STUB_ARGS_DECLARATION) WTF_INTERNAL;
 void JIT_STUB cti_op_throw_static_error(STUB_ARGS_DECLARATION) WTF_INTERNAL;
 void* JIT_STUB cti_op_throw(STUB_ARGS_DECLARATION) WTF_INTERNAL;
 void* JIT_STUB cti_vm_throw(STUB_ARGS_DECLARATION) REFERENCED_FROM_ASM WTF_INTERNAL;

Modified: trunk/Source/_javascript_Core/jit/JSInterfaceJIT.h (157545 => 157546)


--- trunk/Source/_javascript_Core/jit/JSInterfaceJIT.h	2013-10-17 01:02:34 UTC (rev 157545)
+++ trunk/Source/_javascript_Core/jit/JSInterfaceJIT.h	2013-10-17 01:23:56 UTC (rev 157546)
@@ -124,6 +124,7 @@
         static const RegisterID regT2 = ARMRegisters::r2;
         static const RegisterID regT3 = ARMRegisters::r4;
         static const RegisterID regT4 = ARMRegisters::r7;
+        static const RegisterID regT5 = ARMRegisters::r8;
 
         // Update ctiTrampoline in JITStubs.cpp if these values are changed!
         static const RegisterID callFrameRegister = ARMRegisters::r5;
@@ -178,6 +179,7 @@
         static const RegisterID regT3 = MIPSRegisters::s2;
         
         static const RegisterID regT4 = MIPSRegisters::s3;
+        static const RegisterID regT5 = MIPSRegisters::s4;
 
         static const RegisterID callFrameRegister = MIPSRegisters::s0;
         
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to