diff options
author | Simon Hausmann <simon.hausmann@digia.com> | 2012-11-09 12:15:52 +0100 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@digia.com> | 2012-11-09 12:16:06 +0100 |
commit | de4f791e30be4e4239b381c11745ffa4d87ddb8b (patch) | |
tree | 885e3a5d6670828b454cf676b4d42f78e28b1f0e /Source/JavaScriptCore/jit/JITPropertyAccess.cpp | |
parent | b022df48697d40cdabdeafb2c29bb14fe489b6fe (diff) | |
download | qtwebkit-de4f791e30be4e4239b381c11745ffa4d87ddb8b.tar.gz |
Imported WebKit commit e2c32e2f53e02d388e70b9db88b91d8d9d28fc84 (http://svn.webkit.org/repository/webkit/trunk@133952)
Revert back to an older snapshot that should build on ARM
Diffstat (limited to 'Source/JavaScriptCore/jit/JITPropertyAccess.cpp')
-rw-r--r-- | Source/JavaScriptCore/jit/JITPropertyAccess.cpp | 91 |
1 files changed, 8 insertions, 83 deletions
diff --git a/Source/JavaScriptCore/jit/JITPropertyAccess.cpp b/Source/JavaScriptCore/jit/JITPropertyAccess.cpp index 3110be38c..6362598f4 100644 --- a/Source/JavaScriptCore/jit/JITPropertyAccess.cpp +++ b/Source/JavaScriptCore/jit/JITPropertyAccess.cpp @@ -32,7 +32,7 @@ #include "GCAwareJITStubRoutine.h" #include "GetterSetter.h" #include "Interpreter.h" -#include "JITInlines.h" +#include "JITInlineMethods.h" #include "JITStubCall.h" #include "JSArray.h" #include "JSFunction.h" @@ -98,7 +98,7 @@ void JIT::emit_op_get_by_val(Instruction* currentInstruction) unsigned base = currentInstruction[2].u.operand; unsigned property = currentInstruction[3].u.operand; ArrayProfile* profile = currentInstruction[4].u.arrayProfile; - + emitGetVirtualRegisters(base, regT0, property, regT1); emitJumpSlowCaseIfNotImmediateInteger(regT1); @@ -120,12 +120,6 @@ void JIT::emit_op_get_by_val(Instruction* currentInstruction) JITArrayMode mode = chooseArrayMode(profile); switch (mode) { - case JITInt32: - slowCases = emitInt32GetByVal(currentInstruction, badType); - break; - case JITDouble: - slowCases = emitDoubleGetByVal(currentInstruction, badType); - break; case JITContiguous: slowCases = emitContiguousGetByVal(currentInstruction, badType); break; @@ -154,26 +148,11 @@ void JIT::emit_op_get_by_val(Instruction* currentInstruction) m_byValCompilationInfo.append(ByValCompilationInfo(m_bytecodeOffset, badType, mode, done)); } -JIT::JumpList JIT::emitDoubleGetByVal(Instruction*, PatchableJump& badType) +JIT::JumpList JIT::emitContiguousGetByVal(Instruction*, PatchableJump& badType) { JumpList slowCases; - badType = patchableBranch32(NotEqual, regT2, TrustedImm32(DoubleShape)); - loadPtr(Address(regT0, JSObject::butterflyOffset()), regT2); - slowCases.append(branch32(AboveOrEqual, regT1, Address(regT2, Butterfly::offsetOfPublicLength()))); - loadDouble(BaseIndex(regT2, regT1, TimesEight), fpRegT0); - slowCases.append(branchDouble(DoubleNotEqualOrUnordered, fpRegT0, fpRegT0)); - moveDoubleTo64(fpRegT0, regT0); - sub64(tagTypeNumberRegister, regT0); - - return slowCases; -} - -JIT::JumpList JIT::emitContiguousGetByVal(Instruction*, PatchableJump& badType, IndexingType expectedShape) -{ - JumpList slowCases; - - badType = patchableBranch32(NotEqual, regT2, TrustedImm32(expectedShape)); + badType = patchableBranch32(NotEqual, regT2, TrustedImm32(ContiguousShape)); loadPtr(Address(regT0, JSObject::butterflyOffset()), regT2); slowCases.append(branch32(AboveOrEqual, regT1, Address(regT2, Butterfly::offsetOfPublicLength()))); load64(BaseIndex(regT2, regT1, TimesEight), regT0); @@ -325,12 +304,6 @@ void JIT::emit_op_put_by_val(Instruction* currentInstruction) JITArrayMode mode = chooseArrayMode(profile); switch (mode) { - case JITInt32: - slowCases = emitInt32PutByVal(currentInstruction, badType); - break; - case JITDouble: - slowCases = emitDoublePutByVal(currentInstruction, badType); - break; case JITContiguous: slowCases = emitContiguousPutByVal(currentInstruction, badType); break; @@ -352,49 +325,24 @@ void JIT::emit_op_put_by_val(Instruction* currentInstruction) emitWriteBarrier(regT0, regT3, regT1, regT3, ShouldFilterImmediates, WriteBarrierForPropertyAccess); } -template<IndexingType indexingShape> -JIT::JumpList JIT::emitGenericContiguousPutByVal(Instruction* currentInstruction, PatchableJump& badType) +JIT::JumpList JIT::emitContiguousPutByVal(Instruction* currentInstruction, PatchableJump& badType) { unsigned value = currentInstruction[3].u.operand; ArrayProfile* profile = currentInstruction[4].u.arrayProfile; - JumpList slowCases; - - badType = patchableBranch32(NotEqual, regT2, TrustedImm32(indexingShape)); + badType = patchableBranch32(NotEqual, regT2, TrustedImm32(ContiguousShape)); loadPtr(Address(regT0, JSObject::butterflyOffset()), regT2); Jump outOfBounds = branch32(AboveOrEqual, regT1, Address(regT2, Butterfly::offsetOfPublicLength())); Label storeResult = label(); emitGetVirtualRegister(value, regT3); - switch (indexingShape) { - case Int32Shape: - slowCases.append(emitJumpIfNotImmediateInteger(regT3)); - store64(regT3, BaseIndex(regT2, regT1, TimesEight)); - break; - case DoubleShape: { - Jump notInt = emitJumpIfNotImmediateInteger(regT3); - convertInt32ToDouble(regT3, fpRegT0); - Jump ready = jump(); - notInt.link(this); - add64(tagTypeNumberRegister, regT3); - move64ToDouble(regT3, fpRegT0); - slowCases.append(branchDouble(DoubleNotEqualOrUnordered, fpRegT0, fpRegT0)); - ready.link(this); - storeDouble(fpRegT0, BaseIndex(regT2, regT1, TimesEight)); - break; - } - case ContiguousShape: - store64(regT3, BaseIndex(regT2, regT1, TimesEight)); - break; - default: - CRASH(); - break; - } + store64(regT3, BaseIndex(regT2, regT1, TimesEight)); Jump done = jump(); outOfBounds.link(this); + JumpList slowCases; slowCases.append(branch32(AboveOrEqual, regT1, Address(regT2, Butterfly::offsetOfVectorLength()))); emitArrayProfileStoreToHoleSpecialCase(profile); @@ -446,23 +394,12 @@ void JIT::emitSlow_op_put_by_val(Instruction* currentInstruction, Vector<SlowCas unsigned base = currentInstruction[1].u.operand; unsigned property = currentInstruction[2].u.operand; unsigned value = currentInstruction[3].u.operand; - ArrayProfile* profile = currentInstruction[4].u.arrayProfile; linkSlowCase(iter); // property int32 check linkSlowCaseIfNotJSCell(iter, base); // base cell check linkSlowCase(iter); // base not array check linkSlowCase(iter); // out of bounds - JITArrayMode mode = chooseArrayMode(profile); - switch (mode) { - case JITInt32: - case JITDouble: - linkSlowCase(iter); // value type check - break; - default: - break; - } - Label slowPath = label(); JITStubCall stubPutByValCall(this, cti_op_put_by_val); @@ -1375,12 +1312,6 @@ void JIT::privateCompileGetByVal(ByValInfo* byValInfo, ReturnAddressPtr returnAd JumpList slowCases; switch (arrayMode) { - case JITInt32: - slowCases = emitInt32GetByVal(currentInstruction, badType); - break; - case JITDouble: - slowCases = emitDoubleGetByVal(currentInstruction, badType); - break; case JITContiguous: slowCases = emitContiguousGetByVal(currentInstruction, badType); break; @@ -1444,12 +1375,6 @@ void JIT::privateCompilePutByVal(ByValInfo* byValInfo, ReturnAddressPtr returnAd JumpList slowCases; switch (arrayMode) { - case JITInt32: - slowCases = emitInt32PutByVal(currentInstruction, badType); - break; - case JITDouble: - slowCases = emitDoublePutByVal(currentInstruction, badType); - break; case JITContiguous: slowCases = emitContiguousPutByVal(currentInstruction, badType); break; |