Commit 5b955fb4 authored by oliver@apple.com's avatar oliver@apple.com

GetByteArrayLength is incorrect

https://bugs.webkit.org/show_bug.cgi?id=75735

Reviewed by Filip Pizlo.

Load the byte array length from the correct location.
This stops an existing test from hanging.

* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::compile):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@104330 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 34a3d9f3
2012-01-06 Oliver Hunt <oliver@apple.com>
GetByteArrayLength is incorrect
https://bugs.webkit.org/show_bug.cgi?id=75735
Reviewed by Filip Pizlo.
Load the byte array length from the correct location.
This stops an existing test from hanging.
* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
2012-01-06 Filip Pizlo <fpizlo@apple.com>
Fix build.
......@@ -3203,7 +3203,7 @@ void SpeculativeJIT::compile(Node& node)
GPRReg resultGPR = result.gpr();
m_jit.loadPtr(MacroAssembler::Address(baseGPR, JSByteArray::offsetOfStorage()), resultGPR);
m_jit.load32(MacroAssembler::Address(baseGPR, ByteArray::offsetOfSize()), resultGPR);
m_jit.load32(MacroAssembler::Address(resultGPR, ByteArray::offsetOfSize()), resultGPR);
integerResult(resultGPR, m_compileIndex);
break;
......
......@@ -3198,7 +3198,7 @@ void SpeculativeJIT::compile(Node& node)
speculationCheck(BadType, JSValueRegs(baseGPR), node.child1(), m_jit.branchPtr(MacroAssembler::NotEqual, MacroAssembler::Address(baseGPR, JSCell::classInfoOffset()), MacroAssembler::TrustedImmPtr(&JSByteArray::s_info)));
m_jit.loadPtr(MacroAssembler::Address(baseGPR, JSByteArray::offsetOfStorage()), resultGPR);
m_jit.load32(MacroAssembler::Address(baseGPR, ByteArray::offsetOfSize()), resultGPR);
m_jit.load32(MacroAssembler::Address(resultGPR, ByteArray::offsetOfSize()), resultGPR);
integerResult(resultGPR, m_compileIndex);
break;
......
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