summaryrefslogtreecommitdiffstats
path: root/js/src/jit/ScalarReplacement.cpp
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@wolfbeast.com>2019-06-26 11:44:03 +0000
committerwolfbeast <mcwerewolf@wolfbeast.com>2019-06-26 11:44:03 +0000
commit06bf5d769f33d72441825fa39e00baf9eaaac179 (patch)
tree1493e4c3bc9a80ee04f3178613a4750d621ae782 /js/src/jit/ScalarReplacement.cpp
parent3264f3b73802f016777d090d0372749356f3a291 (diff)
downloadUXP-06bf5d769f33d72441825fa39e00baf9eaaac179.tar
UXP-06bf5d769f33d72441825fa39e00baf9eaaac179.tar.gz
UXP-06bf5d769f33d72441825fa39e00baf9eaaac179.tar.lz
UXP-06bf5d769f33d72441825fa39e00baf9eaaac179.tar.xz
UXP-06bf5d769f33d72441825fa39e00baf9eaaac179.zip
Clean up MObjectState
Diffstat (limited to 'js/src/jit/ScalarReplacement.cpp')
-rw-r--r--js/src/jit/ScalarReplacement.cpp33
1 files changed, 0 insertions, 33 deletions
diff --git a/js/src/jit/ScalarReplacement.cpp b/js/src/jit/ScalarReplacement.cpp
index be9ceee2e..97ba52349 100644
--- a/js/src/jit/ScalarReplacement.cpp
+++ b/js/src/jit/ScalarReplacement.cpp
@@ -285,10 +285,6 @@ class ObjectMemoryView : public MDefinitionVisitorDefaultNoop
void visitGuardShape(MGuardShape* ins);
void visitFunctionEnvironment(MFunctionEnvironment* ins);
void visitLambda(MLambda* ins);
-
- private:
- void storeOffset(MInstruction* ins, size_t offset, MDefinition* value);
- void loadOffset(MInstruction* ins, size_t offset);
};
const char* ObjectMemoryView::phaseName = "Scalar Replacement of Object";
@@ -630,35 +626,6 @@ ObjectMemoryView::visitLambda(MLambda* ins)
ins->setIncompleteObject();
}
-void
-ObjectMemoryView::storeOffset(MInstruction* ins, size_t offset, MDefinition* value)
-{
- // Clone the state and update the slot value.
- MOZ_ASSERT(state_->hasOffset(offset));
- state_ = BlockState::Copy(alloc_, state_);
- if (!state_) {
- oom_ = true;
- return;
- }
-
- state_->setOffset(offset, value);
- ins->block()->insertBefore(ins, state_);
-
- // Remove original instruction.
- ins->block()->discard(ins);
-}
-
-void
-ObjectMemoryView::loadOffset(MInstruction* ins, size_t offset)
-{
- // Replace load by the slot value.
- MOZ_ASSERT(state_->hasOffset(offset));
- ins->replaceAllUsesWith(state_->getOffset(offset));
-
- // Remove original instruction.
- ins->block()->discard(ins);
-}
-
static bool
IndexOf(MDefinition* ins, int32_t* res)
{