Ignore:
Timestamp:
Jul 2, 2015, 4:53:10 PM (10 years ago)
Author:
[email protected]
Message:

Rename "Deconstruction" to "Destructuring" throughout JSC
https://bugs.webkit.org/show_bug.cgi?id=146100

Reviewed by Mark Lam.

Source/JavaScriptCore:

It is good to use the same naming conventions as the ES6
spec because it is the de facto way of speaking about these
language features. This also has the benefit of improving JSC's
hackability because it improves code readability for newcomers
to JSC or newcomers to this part of the code base.

  • bytecompiler/BytecodeGenerator.cpp:

(JSC::BytecodeGenerator::generate):
(JSC::BytecodeGenerator::BytecodeGenerator):
(JSC::BytecodeGenerator::initializeNextParameter):
(JSC::BytecodeGenerator::visibleNameForParameter):

  • bytecompiler/BytecodeGenerator.h:

(JSC::BytecodeGenerator::registerFor):

  • bytecompiler/NodesCodegen.cpp:

(JSC::ForInNode::tryGetBoundLocal):
(JSC::ForInNode::emitLoopHeader):
(JSC::ForOfNode::emitBytecode):
(JSC::ClassExprNode::emitBytecode):
(JSC::DestructuringAssignmentNode::emitBytecode):
(JSC::DestructuringPatternNode::~DestructuringPatternNode):
(JSC::ArrayPatternNode::collectBoundIdentifiers):
(JSC::DeconstructingAssignmentNode::emitBytecode): Deleted.
(JSC::DeconstructionPatternNode::~DeconstructionPatternNode): Deleted.

  • parser/ASTBuilder.h:

(JSC::ASTBuilder::createElementList):
(JSC::ASTBuilder::createFormalParameterList):
(JSC::ASTBuilder::createClause):
(JSC::ASTBuilder::createClauseList):
(JSC::ASTBuilder::createForInLoop):
(JSC::ASTBuilder::createForOfLoop):
(JSC::ASTBuilder::isBindingNode):
(JSC::ASTBuilder::isResolve):
(JSC::ASTBuilder::createDestructuringAssignment):
(JSC::ASTBuilder::createArrayPattern):
(JSC::ASTBuilder::appendArrayPatternSkipEntry):
(JSC::ASTBuilder::appendArrayPatternEntry):
(JSC::ASTBuilder::appendArrayPatternRestEntry):
(JSC::ASTBuilder::createObjectPattern):
(JSC::ASTBuilder::appendObjectPatternEntry):
(JSC::ASTBuilder::createDeconstructingAssignment): Deleted.

  • parser/NodeConstructors.h:

(JSC::TryNode::TryNode):
(JSC::ParameterNode::ParameterNode):
(JSC::ForOfNode::ForOfNode):
(JSC::DestructuringPatternNode::DestructuringPatternNode):
(JSC::ArrayPatternNode::ArrayPatternNode):
(JSC::ArrayPatternNode::create):
(JSC::ObjectPatternNode::ObjectPatternNode):
(JSC::BindingNode::create):
(JSC::BindingNode::BindingNode):
(JSC::DestructuringAssignmentNode::DestructuringAssignmentNode):
(JSC::DeconstructionPatternNode::DeconstructionPatternNode): Deleted.
(JSC::DeconstructingAssignmentNode::DeconstructingAssignmentNode): Deleted.

  • parser/Nodes.cpp:

(JSC::FunctionParameters::create):

  • parser/Nodes.h:

(JSC::ExpressionNode::isResolveNode):
(JSC::ExpressionNode::isBracketAccessorNode):
(JSC::ExpressionNode::isDotAccessorNode):
(JSC::ExpressionNode::isDestructuringNode):
(JSC::ExpressionNode::isFuncExprNode):
(JSC::ExpressionNode::isCommaNode):
(JSC::ExpressionNode::isSimpleArray):
(JSC::ParameterNode::pattern):
(JSC::ParameterNode::nextParam):
(JSC::FunctionParameters::size):
(JSC::FunctionParameters::at):
(JSC::FunctionParameters::patterns):
(JSC::DestructuringPatternNode::isBindingNode):
(JSC::DestructuringPatternNode::emitDirectBinding):
(JSC::ArrayPatternNode::appendIndex):
(JSC::ObjectPatternNode::appendEntry):
(JSC::BindingNode::boundProperty):
(JSC::DestructuringAssignmentNode::bindings):
(JSC::ExpressionNode::isDeconstructionNode): Deleted.
(JSC::DeconstructionPatternNode::isBindingNode): Deleted.
(JSC::DeconstructionPatternNode::emitDirectBinding): Deleted.
(JSC::DeconstructingAssignmentNode::bindings): Deleted.

  • parser/Parser.cpp:

(JSC::Parser<LexerType>::parseVarDeclaration):
(JSC::Parser<LexerType>::parseWhileStatement):
(JSC::Parser<LexerType>::parseVarDeclarationList):
(JSC::Parser<LexerType>::createBindingPattern):
(JSC::Parser<LexerType>::tryParseDestructuringPatternExpression):
(JSC::Parser<LexerType>::parseDestructuringPattern):
(JSC::Parser<LexerType>::parseDefaultValueForDestructuringPattern):
(JSC::Parser<LexerType>::parseForStatement):
(JSC::Parser<LexerType>::parseFormalParameters):
(JSC::Parser<LexerType>::parseFunctionParameters):
(JSC::Parser<LexerType>::parseAssignmentExpression):
(JSC::Parser<LexerType>::tryParseDeconstructionPatternExpression): Deleted.
(JSC::Parser<LexerType>::parseDeconstructionPattern): Deleted.
(JSC::Parser<LexerType>::parseDefaultValueForDeconstructionPattern): Deleted.

  • parser/Parser.h:

(JSC::isEvalNode):

  • parser/SyntaxChecker.h:

(JSC::SyntaxChecker::createPropertyList):
(JSC::SyntaxChecker::createElementList):
(JSC::SyntaxChecker::createFormalParameterList):
(JSC::SyntaxChecker::createClause):
(JSC::SyntaxChecker::createClauseList):
(JSC::SyntaxChecker::operatorStackPop):

  • tests/stress/reserved-word-with-escape.js:
  • tests/stress/rest-elements.js:

LayoutTests:

  • js/deconstructing-parameters-should-be-locals-expected.txt: Removed.
  • js/deconstructing-parameters-should-be-locals.html: Removed.
  • js/destructuring-assignment-expected.txt:
  • js/destructuring-parameters-should-be-locals-expected.txt: Copied from LayoutTests/js/deconstructing-parameters-should-be-locals-expected.txt.
  • js/destructuring-parameters-should-be-locals.html: Copied from LayoutTests/js/deconstructing-parameters-should-be-locals.html.
  • js/regress/deconstructing-parameters-overridden-by-function-expected.txt: Removed.
  • js/regress/deconstructing-parameters-overridden-by-function.html: Removed.
  • js/regress/destructuring-parameters-overridden-by-function-expected.txt: Copied from LayoutTests/js/regress/deconstructing-parameters-overridden-by-function-expected.txt.
  • js/regress/destructuring-parameters-overridden-by-function.html: Copied from LayoutTests/js/regress/deconstructing-parameters-overridden-by-function.html.
  • js/regress/script-tests/deconstructing-parameters-overridden-by-function.js: Removed.
  • js/regress/script-tests/destructuring-parameters-overridden-by-function.js: Copied from LayoutTests/js/regress/script-tests/deconstructing-parameters-overridden-by-function.js.
  • js/script-tests/deconstructing-parameters-should-be-locals.js: Removed.
  • js/script-tests/destructuring-assignment.js:

(testDestructuredArgs):
(testDestructuredArgLength):
(testDeconstructArgs): Deleted.
(testDeconstructArgLength): Deleted.

  • js/script-tests/destructuring-parameters-should-be-locals.js: Copied from LayoutTests/js/script-tests/deconstructing-parameters-should-be-locals.js.

(description.value.string_appeared_here.readDestructuredParameter):
(overwriteDestructuredParameter):
(readCapturedDestructuredParameter):
(overwriteCapturedDestructuredParameter):
(description.value.string_appeared_here.readDeconstructedParameter): Deleted.
(overwriteDeconstructedParameter): Deleted.
(readCapturedDeconstructedParameter): Deleted.
(overwriteCapturedDeconstructedParameter): Deleted.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/parser/Parser.cpp

    r186047 r186246  
    412412    int end = 0;
    413413    int scratch;
    414     TreeDeconstructionPattern scratch1 = 0;
     414    TreeDestructuringPattern scratch1 = 0;
    415415    TreeExpression scratch2 = 0;
    416416    JSTextPosition scratch3;
     
    484484
    485485template <typename LexerType>
    486 template <class TreeBuilder> TreeExpression Parser<LexerType>::parseVarDeclarationList(TreeBuilder& context, int& declarations, TreeDeconstructionPattern& lastPattern, TreeExpression& lastInitializer, JSTextPosition& identStart, JSTextPosition& initStart, JSTextPosition& initEnd, VarDeclarationListContext declarationListContext)
     486template <class TreeBuilder> TreeExpression Parser<LexerType>::parseVarDeclarationList(TreeBuilder& context, int& declarations, TreeDestructuringPattern& lastPattern, TreeExpression& lastInitializer, JSTextPosition& identStart, JSTextPosition& initStart, JSTextPosition& initEnd, VarDeclarationListContext declarationListContext)
    487487{
    488488    TreeExpression head = 0;
     
    523523        } else {
    524524            lastIdent = 0;
    525             auto pattern = parseDeconstructionPattern(context, DeconstructToVariables);
    526             failIfFalse(pattern, "Cannot parse this deconstruction pattern");
     525            auto pattern = parseDestructuringPattern(context, DestructureToVariables);
     526            failIfFalse(pattern, "Cannot parse this destructuring pattern");
    527527            hasInitializer = match(EQUAL);
    528528            failIfTrue(declarationListContext == VarDeclarationContext && !hasInitializer, "Expected an initializer in destructuring variable declaration");
     
    531531                next(TreeBuilder::DontBuildStrings); // consume '='
    532532                TreeExpression rhs = parseAssignmentExpression(context);
    533                 node = context.createDeconstructingAssignment(location, pattern, rhs);
     533                node = context.createDestructuringAssignment(location, pattern, rhs);
    534534                lastInitializer = rhs;
    535535            }
     
    545545    } while (match(COMMA));
    546546    if (lastIdent)
    547         lastPattern = createBindingPattern(context, DeconstructToVariables, *lastIdent, 0, lastIdentToken);
     547        lastPattern = createBindingPattern(context, DestructureToVariables, *lastIdent, 0, lastIdentToken);
    548548    return head;
    549549}
    550550
    551551template <typename LexerType>
    552 template <class TreeBuilder> TreeDeconstructionPattern Parser<LexerType>::createBindingPattern(TreeBuilder& context, DeconstructionKind kind, const Identifier& name, int depth, JSToken token)
     552template <class TreeBuilder> TreeDestructuringPattern Parser<LexerType>::createBindingPattern(TreeBuilder& context, DestructuringKind kind, const Identifier& name, int depth, JSToken token)
    553553{
    554554    ASSERT(!name.isNull());
     
    556556    ASSERT(name.impl()->isAtomic() || name.impl()->isSymbol());
    557557    if (depth) {
    558         if (kind == DeconstructToVariables)
    559             failIfFalseIfStrict(declareVariable(&name), "Cannot deconstruct to a variable named '", name.impl(), "' in strict mode");
    560         if (kind == DeconstructToParameters) {
     558        if (kind == DestructureToVariables)
     559            failIfFalseIfStrict(declareVariable(&name), "Cannot destructure to a variable named '", name.impl(), "' in strict mode");
     560        if (kind == DestructureToParameters) {
    561561            auto bindingResult = declareBoundParameter(&name);
    562562            if (bindingResult == Scope::StrictBindingFailed && strictMode()) {
    563                 semanticFailIfTrue(m_vm->propertyNames->arguments == name || m_vm->propertyNames->eval == name, "Cannot deconstruct to a parameter name '", name.impl(), "' in strict mode");
     563                semanticFailIfTrue(m_vm->propertyNames->arguments == name || m_vm->propertyNames->eval == name, "Cannot destructure to a parameter name '", name.impl(), "' in strict mode");
    564564                if (m_lastFunctionName && name == *m_lastFunctionName)
    565                     semanticFail("Cannot deconstruct to '", name.impl(), "' as it shadows the name of a strict mode function");
     565                    semanticFail("Cannot destructure to '", name.impl(), "' as it shadows the name of a strict mode function");
    566566                semanticFailureDueToKeyword("bound parameter name");
    567567                if (hasDeclaredParameter(name))
    568                     semanticFail("Cannot deconstruct to '", name.impl(), "' as it has already been declared");
     568                    semanticFail("Cannot destructure to '", name.impl(), "' as it has already been declared");
    569569                semanticFail("Cannot bind to a parameter named '", name.impl(), "' in strict mode");
    570570            }
     
    572572                semanticFailureDueToKeyword("bound parameter name");
    573573                if (hasDeclaredParameter(name))
    574                     semanticFail("Cannot deconstruct to '", name.impl(), "' as it has already been declared");
    575                 semanticFail("Cannot deconstruct to a parameter named '", name.impl(), "'");
     574                    semanticFail("Cannot destructure to '", name.impl(), "' as it has already been declared");
     575                semanticFail("Cannot destructure to a parameter named '", name.impl(), "'");
    576576            }
    577577        }
    578         if (kind != DeconstructToExpressions)
     578        if (kind != DestructureToExpressions)
    579579            context.addVar(&name, DeclarationStacks::HasInitializer);
    580580
    581581    } else {
    582         if (kind == DeconstructToVariables) {
     582        if (kind == DestructureToVariables) {
    583583            failIfFalseIfStrict(declareVariable(&name), "Cannot declare a variable named '", name.impl(), "' in strict mode");
    584584            context.addVar(&name, DeclarationStacks::HasInitializer);
    585585        }
    586586       
    587         if (kind == DeconstructToParameters) {
     587        if (kind == DestructureToParameters) {
    588588            bool declarationResult = declareParameter(&name);
    589589            if (!declarationResult && strictMode()) {
    590                 semanticFailIfTrue(m_vm->propertyNames->arguments == name || m_vm->propertyNames->eval == name, "Cannot deconstruct to a parameter name '", name.impl(), "' in strict mode");
     590                semanticFailIfTrue(m_vm->propertyNames->arguments == name || m_vm->propertyNames->eval == name, "Cannot destructure to a parameter name '", name.impl(), "' in strict mode");
    591591                if (m_lastFunctionName && name == *m_lastFunctionName)
    592592                    semanticFail("Cannot declare a parameter named '", name.impl(), "' as it shadows the name of a strict mode function");
     
    638638
    639639template <typename LexerType>
    640 template <class TreeBuilder> TreeDeconstructionPattern Parser<LexerType>::tryParseDeconstructionPatternExpression(TreeBuilder& context)
    641 {
    642     return parseDeconstructionPattern(context, DeconstructToExpressions);
    643 }
    644 
    645 template <typename LexerType>
    646 template <class TreeBuilder> TreeDeconstructionPattern Parser<LexerType>::parseDeconstructionPattern(TreeBuilder& context, DeconstructionKind kind, int depth)
     640template <class TreeBuilder> TreeDestructuringPattern Parser<LexerType>::tryParseDestructuringPatternExpression(TreeBuilder& context)
     641{
     642    return parseDestructuringPattern(context, DestructureToExpressions);
     643}
     644
     645template <typename LexerType>
     646template <class TreeBuilder> TreeDestructuringPattern Parser<LexerType>::parseDestructuringPattern(TreeBuilder& context, DestructuringKind kind, int depth)
    647647{
    648648    failIfStackOverflow();
    649649    int nonLHSCount = m_nonLHSCount;
    650     TreeDeconstructionPattern pattern;
     650    TreeDestructuringPattern pattern;
    651651    switch (m_token.m_type) {
    652652    case OPENBRACKET: {
     
    670670                JSTokenLocation location = m_token.m_location;
    671671                next();
    672                 auto innerPattern = parseDeconstructionPattern(context, kind, depth + 1);
    673                 if (kind == DeconstructToExpressions && !innerPattern)
     672                auto innerPattern = parseDestructuringPattern(context, kind, depth + 1);
     673                if (kind == DestructureToExpressions && !innerPattern)
    674674                    return 0;
    675                 failIfFalse(innerPattern, "Cannot parse this deconstruction pattern");
    676 
    677                 failIfTrue(kind != DeconstructToExpressions && !context.isBindingNode(innerPattern),  "Expected identifier for a rest element deconstruction pattern");
     675                failIfFalse(innerPattern, "Cannot parse this destructuring pattern");
     676
     677                failIfTrue(kind != DestructureToExpressions && !context.isBindingNode(innerPattern),  "Expected identifier for a rest element destructuring pattern");
    678678
    679679                context.appendArrayPatternRestEntry(arrayPattern, location, innerPattern);
     
    683683
    684684            JSTokenLocation location = m_token.m_location;
    685             auto innerPattern = parseDeconstructionPattern(context, kind, depth + 1);
    686             if (kind == DeconstructToExpressions && !innerPattern)
     685            auto innerPattern = parseDestructuringPattern(context, kind, depth + 1);
     686            if (kind == DestructureToExpressions && !innerPattern)
    687687                return 0;
    688             failIfFalse(innerPattern, "Cannot parse this deconstruction pattern");
    689             TreeExpression defaultValue = parseDefaultValueForDeconstructionPattern(context);
    690             failIfTrue(kind == DeconstructToParameters && defaultValue,  "Default values in destructuring parameters are currently not supported");
     688            failIfFalse(innerPattern, "Cannot parse this destructuring pattern");
     689            TreeExpression defaultValue = parseDefaultValueForDestructuringPattern(context);
     690            failIfTrue(kind == DestructureToParameters && defaultValue,  "Default values in destructuring parameters are currently not supported");
    691691            context.appendArrayPatternEntry(arrayPattern, location, innerPattern, defaultValue);
    692692        } while (consume(COMMA));
    693693
    694         if (kind == DeconstructToExpressions && !match(CLOSEBRACKET))
     694        if (kind == DestructureToExpressions && !match(CLOSEBRACKET))
    695695            return 0;
    696         consumeOrFail(CLOSEBRACKET, restElementWasFound ? "Expected a closing ']' following a rest element deconstruction pattern" : "Expected either a closing ']' or a ',' following an element deconstruction pattern");
     696        consumeOrFail(CLOSEBRACKET, restElementWasFound ? "Expected a closing ']' following a rest element destructuring pattern" : "Expected either a closing ']' or a ',' following an element destructuring pattern");
    697697        context.finishArrayPattern(arrayPattern, divotStart, divotStart, lastTokenEndPosition());
    698698        pattern = arrayPattern;
     
    710710
    711711            Identifier propertyName;
    712             TreeDeconstructionPattern innerPattern = 0;
     712            TreeDestructuringPattern innerPattern = 0;
    713713            JSTokenLocation location = m_token.m_location;
    714714            if (match(IDENT)) {
     
    717717                next();
    718718                if (consume(COLON))
    719                     innerPattern = parseDeconstructionPattern(context, kind, depth + 1);
     719                    innerPattern = parseDestructuringPattern(context, kind, depth + 1);
    720720                else
    721721                    innerPattern = createBindingPattern(context, kind, propertyName, depth, identifierToken);
     
    733733                default:
    734734                    if (m_token.m_type != RESERVED && m_token.m_type != RESERVED_IF_STRICT && !(m_token.m_type & KeywordTokenFlag)) {
    735                         if (kind == DeconstructToExpressions)
     735                        if (kind == DestructureToExpressions)
    736736                            return 0;
    737737                        failWithMessage("Expected a property name");
     
    742742                next();
    743743                if (!consume(COLON)) {
    744                     if (kind == DeconstructToExpressions)
     744                    if (kind == DestructureToExpressions)
    745745                        return 0;
    746                     semanticFailIfTrue(tokenType == RESERVED, "Cannot use abbreviated deconstruction syntax for reserved name '", propertyName.impl(), "'");
    747                     semanticFailIfTrue(tokenType == RESERVED_IF_STRICT, "Cannot use abbreviated deconstruction syntax for reserved name '", propertyName.impl(), "' in strict mode");
    748                     semanticFailIfTrue(tokenType & KeywordTokenFlag, "Cannot use abbreviated deconstruction syntax for keyword '", propertyName.impl(), "'");
     746                    semanticFailIfTrue(tokenType == RESERVED, "Cannot use abbreviated destructuring syntax for reserved name '", propertyName.impl(), "'");
     747                    semanticFailIfTrue(tokenType == RESERVED_IF_STRICT, "Cannot use abbreviated destructuring syntax for reserved name '", propertyName.impl(), "' in strict mode");
     748                    semanticFailIfTrue(tokenType & KeywordTokenFlag, "Cannot use abbreviated destructuring syntax for keyword '", propertyName.impl(), "'");
    749749                   
    750                     failWithMessage("Expected a ':' prior to named property deconstruction");
     750                    failWithMessage("Expected a ':' prior to a named destructuring property");
    751751                }
    752                 innerPattern = parseDeconstructionPattern(context, kind, depth + 1);
     752                innerPattern = parseDestructuringPattern(context, kind, depth + 1);
    753753            }
    754             if (kind == DeconstructToExpressions && !innerPattern)
     754            if (kind == DestructureToExpressions && !innerPattern)
    755755                return 0;
    756             failIfFalse(innerPattern, "Cannot parse this deconstruction pattern");
    757             TreeExpression defaultValue = parseDefaultValueForDeconstructionPattern(context);
    758             failIfTrue(kind == DeconstructToParameters && defaultValue, "Default values in destructuring parameters are currently not supported");
     756            failIfFalse(innerPattern, "Cannot parse this destructuring pattern");
     757            TreeExpression defaultValue = parseDefaultValueForDestructuringPattern(context);
     758            failIfTrue(kind == DestructureToParameters && defaultValue, "Default values in destructuring parameters are currently not supported");
    759759            context.appendObjectPatternEntry(objectPattern, location, wasString, propertyName, innerPattern, defaultValue);
    760760        } while (consume(COMMA));
    761761
    762         if (kind == DeconstructToExpressions && !match(CLOSEBRACE))
     762        if (kind == DestructureToExpressions && !match(CLOSEBRACE))
    763763            return 0;
    764         consumeOrFail(CLOSEBRACE, "Expected either a closing '}' or an ',' after a property deconstruction pattern");
     764        consumeOrFail(CLOSEBRACE, "Expected either a closing '}' or an ',' after a property destructuring pattern");
    765765        pattern = objectPattern;
    766766        break;
     
    769769    default: {
    770770        if (!match(IDENT)) {
    771             if (kind == DeconstructToExpressions)
     771            if (kind == DestructureToExpressions)
    772772                return 0;
    773773            semanticFailureDueToKeyword("variable name");
     
    784784
    785785template <typename LexerType>
    786 template <class TreeBuilder> TreeExpression Parser<LexerType>::parseDefaultValueForDeconstructionPattern(TreeBuilder& context)
     786template <class TreeBuilder> TreeExpression Parser<LexerType>::parseDefaultValueForDestructuringPattern(TreeBuilder& context)
    787787{
    788788    if (!match(EQUAL))
     
    835835    JSTextPosition declsEnd;
    836836    TreeExpression decls = 0;
    837     TreeDeconstructionPattern pattern = 0;
     837    TreeDestructuringPattern pattern = 0;
    838838    if (match(VAR)) {
    839839        /*
     
    841841         for (var varDeclarationList; expressionOpt; expressionOpt)
    842842         */
    843         TreeDeconstructionPattern forInTarget = 0;
     843        TreeDestructuringPattern forInTarget = 0;
    844844        TreeExpression forInInitializer = 0;
    845845        m_allowsIn = false;
     
    891891            SavePoint savePoint = createSavePoint();
    892892            declsStart = tokenStartPosition();
    893             pattern = tryParseDeconstructionPatternExpression(context);
     893            pattern = tryParseDestructuringPatternExpression(context);
    894894            declsEnd = lastTokenEndPosition();
    895895            if (pattern && (match(INTOKEN) || (match(IDENT) && *m_token.m_data.ident == m_vm->propertyNames->of)))
     
    13501350template <class TreeBuilder> TreeFormalParameterList Parser<LexerType>::parseFormalParameters(TreeBuilder& context)
    13511351{
    1352     auto parameter = parseDeconstructionPattern(context, DeconstructToParameters);
     1352    auto parameter = parseDestructuringPattern(context, DestructureToParameters);
    13531353    failIfFalse(parameter, "Cannot parse parameter pattern");
    13541354    TreeFormalParameterList list = context.createFormalParameterList(parameter);
    13551355    TreeFormalParameterList tail = list;
    13561356    while (consume(COMMA)) {
    1357         parameter = parseDeconstructionPattern(context, DeconstructToParameters);
     1357        parameter = parseDestructuringPattern(context, DestructureToParameters);
    13581358        failIfFalse(parameter, "Cannot parse parameter pattern");
    13591359        tail = context.createFormalParameterList(tail, parameter);
     
    14301430                consumeOrFail(CLOSEPAREN, "Expected a ')' or a ',' after a parameter declaration");
    14311431            } else {
    1432                 auto parameter = parseDeconstructionPattern(context, DeconstructToParameters);
     1432                auto parameter = parseDestructuringPattern(context, DestructureToParameters);
    14331433                failIfFalse(parameter, "Cannot parse parameter pattern");
    14341434                info.parameters = context.createFormalParameterList(parameter);
     
    14501450    else if (mode == SetterMode) {
    14511451        failIfTrue(match(CLOSEPAREN), "setter functions must have one parameter");
    1452         auto parameter = parseDeconstructionPattern(context, DeconstructToParameters);
     1452        auto parameter = parseDestructuringPattern(context, DestructureToParameters);
    14531453        failIfFalse(parameter, "setter functions must have one parameter");
    14541454        info.parameters = context.createFormalParameterList(parameter);
     
    20752075    if (match(OPENBRACE) || match(OPENBRACKET)) {
    20762076        SavePoint savePoint = createSavePoint();
    2077         auto pattern = tryParseDeconstructionPatternExpression(context);
     2077        auto pattern = tryParseDestructuringPatternExpression(context);
    20782078        if (pattern && consume(EQUAL)) {
    20792079            auto rhs = parseAssignmentExpression(context);
    20802080            if (rhs)
    2081                 return context.createDeconstructingAssignment(location, pattern, rhs);
     2081                return context.createDestructuringAssignment(location, pattern, rhs);
    20822082        }
    20832083        restoreSavePoint(savePoint);
Note: See TracChangeset for help on using the changeset viewer.