diff options
author | Moonchild <moonchild@palemoon.org> | 2019-06-28 11:25:09 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-06-28 11:25:09 +0000 |
commit | 31a02a022e1e3f01463672af71a5c4296f672bfb (patch) | |
tree | 041ebdd049d68aaa30caaee6c53260fe9116755b /js/src/jit/ScalarReplacement.cpp | |
parent | 610c5fc6cee6346b5333077c29029e3e90e0c4cb (diff) | |
parent | b8ff1df2c96270c481a645947390c4cdae93e3cc (diff) | |
download | UXP-31a02a022e1e3f01463672af71a5c4296f672bfb.tar UXP-31a02a022e1e3f01463672af71a5c4296f672bfb.tar.gz UXP-31a02a022e1e3f01463672af71a5c4296f672bfb.tar.lz UXP-31a02a022e1e3f01463672af71a5c4296f672bfb.tar.xz UXP-31a02a022e1e3f01463672af71a5c4296f672bfb.zip |
Merge pull request #1142 from MoonchildProductions/remove-unboxed
Remove unboxed objects
Diffstat (limited to 'js/src/jit/ScalarReplacement.cpp')
-rw-r--r-- | js/src/jit/ScalarReplacement.cpp | 33 |
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) { |