summaryrefslogtreecommitdiffstats
path: root/js/src/frontend/BytecodeEmitter.cpp
diff options
context:
space:
mode:
authortrav90 <travawine@palemoon.org>2018-09-02 18:45:56 -0500
committertrav90 <travawine@palemoon.org>2018-09-02 18:45:56 -0500
commitb4aed63f5758b955e84840c5871b1301ccb6968f (patch)
tree27fce408c3ad0c2aae3cb27b747e1527735c7910 /js/src/frontend/BytecodeEmitter.cpp
parentd79c4750211d2626ce95594f7ee4f5013dd36910 (diff)
downloadUXP-b4aed63f5758b955e84840c5871b1301ccb6968f.tar
UXP-b4aed63f5758b955e84840c5871b1301ccb6968f.tar.gz
UXP-b4aed63f5758b955e84840c5871b1301ccb6968f.tar.lz
UXP-b4aed63f5758b955e84840c5871b1301ccb6968f.tar.xz
UXP-b4aed63f5758b955e84840c5871b1301ccb6968f.zip
Convert the trailing array of BindingNames at the end of the various kinds of scope data into raw unsigned chars into which those BindingNames are placement-new'd, rather than memcpy-ing non-trivial classes around and failing to comply with the C++ object model
Diffstat (limited to 'js/src/frontend/BytecodeEmitter.cpp')
-rw-r--r--js/src/frontend/BytecodeEmitter.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/js/src/frontend/BytecodeEmitter.cpp b/js/src/frontend/BytecodeEmitter.cpp
index c7c615ccf..4eb7bf880 100644
--- a/js/src/frontend/BytecodeEmitter.cpp
+++ b/js/src/frontend/BytecodeEmitter.cpp
@@ -319,7 +319,7 @@ ScopeKindIsInBody(ScopeKind kind)
static inline void
MarkAllBindingsClosedOver(LexicalScope::Data& data)
{
- BindingName* names = data.names;
+ TrailingNamesArray& names = data.trailingNames;
for (uint32_t i = 0; i < data.length; i++)
names[i] = BindingName(names[i].name(), true);
}
@@ -8978,7 +8978,8 @@ BytecodeEmitter::isRestParameter(ParseNode* pn, bool* result)
if (bindings->nonPositionalFormalStart > 0) {
// |paramName| can be nullptr when the rest destructuring syntax is
// used: `function f(...[]) {}`.
- JSAtom* paramName = bindings->names[bindings->nonPositionalFormalStart - 1].name();
+ JSAtom* paramName =
+ bindings->trailingNames[bindings->nonPositionalFormalStart - 1].name();
*result = paramName && name == paramName;
return true;
}