diff options
author | trav90 <travawine@palemoon.org> | 2018-09-19 20:31:28 -0500 |
---|---|---|
committer | trav90 <travawine@palemoon.org> | 2018-09-19 20:31:28 -0500 |
commit | 3b362e9ded0e79c86db239bed536465745c2278a (patch) | |
tree | dbbfcfd0a8b9cd960a541c2d904e3764932ea126 /js/src/vm/TypeInference.h | |
parent | a0737572d41efaf6faaac5e0d92f623b3292aa8e (diff) | |
download | UXP-3b362e9ded0e79c86db239bed536465745c2278a.tar UXP-3b362e9ded0e79c86db239bed536465745c2278a.tar.gz UXP-3b362e9ded0e79c86db239bed536465745c2278a.tar.lz UXP-3b362e9ded0e79c86db239bed536465745c2278a.tar.xz UXP-3b362e9ded0e79c86db239bed536465745c2278a.zip |
Rename TypeSet::clone to TypeSet::cloneIntoUninitialized to indicate that it freshly initializes the TemporaryTypeSet* provided to it.
Also removes existing code that, quite unnecessarily, partly initialized that argument.
Diffstat (limited to 'js/src/vm/TypeInference.h')
-rw-r--r-- | js/src/vm/TypeInference.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/js/src/vm/TypeInference.h b/js/src/vm/TypeInference.h index 0e737bad7..0f1cd4936 100644 --- a/js/src/vm/TypeInference.h +++ b/js/src/vm/TypeInference.h @@ -498,7 +498,10 @@ class TypeSet // Clone a type set into an arbitrary allocator. TemporaryTypeSet* clone(LifoAlloc* alloc) const; - bool clone(LifoAlloc* alloc, TemporaryTypeSet* result) const; + + // |*result| is not even partly initialized when this function is called: + // this function placement-new's its contents into existence. + bool cloneIntoUninitialized(LifoAlloc* alloc, TemporaryTypeSet* result) const; // Create a new TemporaryTypeSet where undefined and/or null has been filtered out. TemporaryTypeSet* filter(LifoAlloc* alloc, bool filterUndefined, bool filterNull) const; |