summaryrefslogtreecommitdiffstats
path: root/js/src/frontend/BytecodeEmitter.cpp
diff options
context:
space:
mode:
authorGaming4JC <g4jc@hyperbola.info>2019-07-14 16:37:57 -0400
committerGaming4JC <g4jc@hyperbola.info>2019-07-18 22:38:47 -0400
commit091d00f1bd22f821d3926c46dd1d6cf7fbc746f4 (patch)
treec68c6e96a4104ed0a78807c79f3601cd6f3eee4e /js/src/frontend/BytecodeEmitter.cpp
parent638a904d0dbe4bcc5a625ea472c7e65ac75dbc06 (diff)
downloadUXP-091d00f1bd22f821d3926c46dd1d6cf7fbc746f4.tar
UXP-091d00f1bd22f821d3926c46dd1d6cf7fbc746f4.tar.gz
UXP-091d00f1bd22f821d3926c46dd1d6cf7fbc746f4.tar.lz
UXP-091d00f1bd22f821d3926c46dd1d6cf7fbc746f4.tar.xz
UXP-091d00f1bd22f821d3926c46dd1d6cf7fbc746f4.zip
1339395 - Part 2: Add parser support for rest and spread object properties.
Diffstat (limited to 'js/src/frontend/BytecodeEmitter.cpp')
-rw-r--r--js/src/frontend/BytecodeEmitter.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/js/src/frontend/BytecodeEmitter.cpp b/js/src/frontend/BytecodeEmitter.cpp
index c2eae4344..f9a1f8675 100644
--- a/js/src/frontend/BytecodeEmitter.cpp
+++ b/js/src/frontend/BytecodeEmitter.cpp
@@ -5815,6 +5815,11 @@ BytecodeEmitter::emitDestructuringOpsObject(ParseNode* pattern, DestructuringFla
return false;
for (ParseNode* member = pattern->pn_head; member; member = member->pn_next) {
+ if (member->isKind(PNK_SPREAD)) {
+ // FIXME: Implement
+ continue;
+ }
+
ParseNode* subpattern;
if (member->isKind(PNK_MUTATEPROTO))
subpattern = member->pn_kid;
@@ -9449,6 +9454,13 @@ BytecodeEmitter::emitPropertyList(ParseNode* pn, MutableHandlePlainObject objp,
continue;
}
+ if (propdef->isKind(PNK_SPREAD)) {
+ MOZ_ASSERT(type == ObjectLiteral);
+ objp.set(nullptr);
+ // FIXME: implement
+ continue;
+ }
+
bool extraPop = false;
if (type == ClassBody && propdef->as<ClassMethod>().isStatic()) {
extraPop = true;