summaryrefslogtreecommitdiff
path: root/js/src/frontend/SyntaxParseHandler.h
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/frontend/SyntaxParseHandler.h')
-rw-r--r--js/src/frontend/SyntaxParseHandler.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/js/src/frontend/SyntaxParseHandler.h b/js/src/frontend/SyntaxParseHandler.h
index c55db41086..85c8061162 100644
--- a/js/src/frontend/SyntaxParseHandler.h
+++ b/js/src/frontend/SyntaxParseHandler.h
@@ -149,6 +149,10 @@ class SyntaxParseHandler
return node == NodeDottedProperty || node == NodeElement;
}
+ bool isOptionalPropertyAccess(Node node) {
+ return node == NodeOptionalDottedProperty || node == NodeOptionalElement;
+ }
+
bool isFunctionCall(Node node) {
// Note: super() is a special form, *not* a function call.
return node == NodeFunctionCall;
@@ -603,7 +607,7 @@ class SyntaxParseHandler
// |this|. It's not really eligible for the funapply/funcall
// optimizations as they're currently implemented (assuming a single
// value is used for both retrieval and |this|).
- if (node != NodeDottedProperty)
+ if (node != NodeDottedProperty && node != NodeOptionalDottedProperty)
return nullptr;
return lastAtom->asPropertyName();
}