summaryrefslogtreecommitdiff
path: root/Source/JavaScriptCore/dfg/DFGArrayifySlowPathGenerator.h
diff options
context:
space:
mode:
authorLorry Tar Creator <lorry-tar-importer@lorry>2017-06-27 06:07:23 +0000
committerLorry Tar Creator <lorry-tar-importer@lorry>2017-06-27 06:07:23 +0000
commit1bf1084f2b10c3b47fd1a588d85d21ed0eb41d0c (patch)
tree46dcd36c86e7fbc6e5df36deb463b33e9967a6f7 /Source/JavaScriptCore/dfg/DFGArrayifySlowPathGenerator.h
parent32761a6cee1d0dee366b885b7b9c777e67885688 (diff)
downloadWebKitGtk-tarball-master.tar.gz
Diffstat (limited to 'Source/JavaScriptCore/dfg/DFGArrayifySlowPathGenerator.h')
-rw-r--r--Source/JavaScriptCore/dfg/DFGArrayifySlowPathGenerator.h36
1 files changed, 10 insertions, 26 deletions
diff --git a/Source/JavaScriptCore/dfg/DFGArrayifySlowPathGenerator.h b/Source/JavaScriptCore/dfg/DFGArrayifySlowPathGenerator.h
index 9c7d47a42..ba4d5fe58 100644
--- a/Source/JavaScriptCore/dfg/DFGArrayifySlowPathGenerator.h
+++ b/Source/JavaScriptCore/dfg/DFGArrayifySlowPathGenerator.h
@@ -23,10 +23,7 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef DFGArrayifySlowPathGenerator_h
-#define DFGArrayifySlowPathGenerator_h
-
-#include <wtf/Platform.h>
+#pragma once
#if ENABLE(DFG_JIT)
@@ -48,7 +45,7 @@ public:
: JumpingSlowPathGenerator<MacroAssembler::JumpList>(from, jit)
, m_op(node->op())
, m_arrayMode(node->arrayMode())
- , m_structure(node->op() == ArrayifyToStructure ? node->structure() : 0)
+ , m_structure(node->op() == ArrayifyToStructure ? node->structure() : RegisteredStructure())
, m_baseGPR(baseGPR)
, m_propertyGPR(propertyGPR)
, m_tempGPR(tempGPR)
@@ -73,7 +70,7 @@ public:
}
protected:
- virtual void generateInternal(SpeculativeJIT* jit) override
+ void generateInternal(SpeculativeJIT* jit) override
{
linkFrom(jit);
@@ -103,10 +100,7 @@ protected:
jit->callOperation(operationEnsureDouble, m_tempGPR, m_baseGPR);
break;
case Array::Contiguous:
- if (m_arrayMode.conversion() == Array::RageConvert)
- jit->callOperation(operationRageEnsureContiguous, m_tempGPR, m_baseGPR);
- else
- jit->callOperation(operationEnsureContiguous, m_tempGPR, m_baseGPR);
+ jit->callOperation(operationEnsureContiguous, m_tempGPR, m_baseGPR);
break;
case Array::ArrayStorage:
case Array::SlowPutArrayStorage:
@@ -118,27 +112,20 @@ protected:
}
for (unsigned i = m_plans.size(); i--;)
jit->silentFill(m_plans[i], GPRInfo::regT0);
+ jit->m_jit.exceptionCheck();
if (m_op == ArrayifyToStructure) {
- ASSERT(m_structure);
+ ASSERT(m_structure.get());
m_badIndexingTypeJump.fill(
- jit, jit->m_jit.branchWeakPtr(
- MacroAssembler::NotEqual,
- MacroAssembler::Address(m_baseGPR, JSCell::structureOffset()),
- m_structure));
+ jit, jit->m_jit.branchWeakStructure(MacroAssembler::NotEqual, MacroAssembler::Address(m_baseGPR, JSCell::structureIDOffset()), m_structure));
} else {
- // Alas, we need to reload the structure because silent spilling does not save
- // temporaries. Nor would it be useful for it to do so. Either way we're talking
- // about a load.
- jit->m_jit.loadPtr(
- MacroAssembler::Address(m_baseGPR, JSCell::structureOffset()), m_structureGPR);
-
// Finally, check that we have the kind of array storage that we wanted to get.
// Note that this is a backwards speculation check, which will result in the
// bytecode operation corresponding to this arrayification being reexecuted.
// That's fine, since arrayification is not user-visible.
jit->m_jit.load8(
- MacroAssembler::Address(m_structureGPR, Structure::indexingTypeOffset()), m_structureGPR);
+ MacroAssembler::Address(m_baseGPR, JSCell::indexingTypeAndMiscOffset()),
+ m_structureGPR);
m_badIndexingTypeJump.fill(
jit, jit->jumpSlowForUnwantedArrayMode(m_structureGPR, m_arrayMode));
}
@@ -149,7 +136,7 @@ protected:
private:
NodeType m_op;
ArrayMode m_arrayMode;
- Structure* m_structure;
+ RegisteredStructure m_structure;
GPRReg m_baseGPR;
GPRReg m_propertyGPR;
GPRReg m_tempGPR;
@@ -162,6 +149,3 @@ private:
} } // namespace JSC::DFG
#endif // ENABLE(DFG_JIT)
-
-#endif // DFGArrayifySlowPathGenerator_h
-