Lines Matching +full:glslang +full:- +full:master +full:-

2 // Copyright (C) 2016-2018 Google, Inc.
40 // - through an argument: a type specifically appropriate to which rule it
42 // - through the return value: true/false to indicate whether or not it
58 namespace glslang { namespace
94 // -> maps to the IDENTIFIER spelled with the internal special name for 'this' in acceptIdentifier()
136 if (unitNode && !unitNode->getAsAggregate()) in acceptCompilationUnit()
321 // All initializer subtrees are put in their own aggregate node, making one top-level
322 // node for all the initializers. Each function created is a top-level node to grow
323 // into the passed-in nodeList.
325 // If 'nodeList' is passed in as non-null, it must be an aggregate to extend for
326 // each top-level node the declaration creates. Otherwise, if only one top-level
369 // HLSL shaders, this will have to be a master level switch in acceptDeclaration()
400 // Potentially rename shader entry point function. No-op most of the time. in acceptDeclaration()
411 acceptPostDecls(declarator.function->getWritableType().getQualifier()); in acceptDeclaration()
488 // The top-level node is always made into an aggregate, as that's in acceptDeclaration()
503 // The top-level initializer node is a sequence. in acceptDeclaration()
505 initializers->setOperator(EOpSequence); in acceptDeclaration()
658 // TODO: no meaning in glslang? in acceptQualifier()
716 // TODO: map this to SPIR-V function control in acceptQualifier()
876 const int vecSizeI = vecSize->getAsConstantUnion()->getConstArray()[0].getIConst(); in acceptVectorTemplateType()
945 rows->getAsConstantUnion()->getConstArray()[0].getIConst(), in acceptMatrixTemplateType()
946 cols->getAsConstantUnion()->getConstArray()[0].getIConst()); in acceptMatrixTemplateType()
1030 arraySizes->addInnerSize(size->getAsConstantUnion()->getConstArray()[0].getIConst()); in acceptTessellationPatchTemplateType()
1151 …Type subpassBasicType = subpassType.isStruct() ? (*subpassType.getStruct())[0].type->getBasicType() in acceptSubpassInputType()
1376 const TBasicType txBasicType = txType.isStruct() ? (*txType.getStruct())[0].type->getBasicType() in acceptTextureType()
1379 // Non-image Buffers are combined in acceptTextureType()
1549 // An identifier could be for a user-defined type. in acceptType()
2151 // create the user-defined type in acceptStruct()
2163 // - add their implicit argument with 'this' (not to the mangling, just the argument list) in acceptStruct()
2164 // - parse the functions, their tokens were saved for deferred parsing (now) in acceptStruct()
2167 if (functionDeclarators[b].function->hasImplicitThis()) in acceptStruct()
2168 functionDeclarators[b].function->addThisParameter(type, intermediate.implicitThisName); in acceptStruct()
2172 // class/struct members in a symbol-table level. in acceptStruct()
2225 parseContext.error(token.loc, "non-structure type in ConstantBuffer", "", ""); in acceptConstantBufferType()
2334 templateType->shallowCopy(uintType); in acceptStructBufferType()
2340 unsizedArray->addInnerSize(UnsizedArraySize); in acceptStructBufferType()
2341 templateType->transferArraySizes(unsizedArray); in acceptStructBufferType()
2342 templateType->getQualifier().storage = storage; in acceptStructBufferType()
2345 templateType->setFieldName("@data"); in acceptStructBufferType()
2349 blockStruct->push_back(member); in acceptStructBufferType()
2352 TType blockType(blockStruct, "", templateType->getQualifier()); in acceptStructBufferType()
2372 …ied_type IDENTIFIER function_parameters post_decls compound_statement // member-function definition
2377 …function_parameters post_decls // member-function prototype
2426 expected("member-function definition"); in acceptStructDeclarationList()
2431 member.type->shallowCopy(memberType); in acceptStructDeclarationList()
2432 member.type->setFieldName(*idToken.string); in acceptStructDeclarationList()
2433 typeList->push_back(member); in acceptStructDeclarationList()
2439 typeList->back().type->transferArraySizes(arraySizes); in acceptStructDeclarationList()
2441 acceptPostDecls(member.type->getQualifier()); in acceptStructDeclarationList()
2445 … parseContext.warn(idToken.loc, "struct-member initializers ignored", "typedef", ""); in acceptStructDeclarationList()
2482 // EvqTemporary for non-static member.
2492 declarator.function->setImplicitThis(); in acceptMemberFunctionDefinition()
2494 declarator.function->setIllegalImplicitThis(); in acceptMemberFunctionDefinition()
2499 acceptPostDecls(declarator.function->getWritableType().getQualifier()); in acceptMemberFunctionDefinition()
2560 // For initializer lists, we have to const-fold into a constructor for the type, so build in acceptDefaultParameterDeclaration()
2567 for (int i = 0; i < int(node->getAsAggregate()->getSequence().size()); i++) in acceptDefaultParameterDeclaration()
2568 …ontext.handleFunctionArgument(constructor, arguments, node->getAsAggregate()->getSequence()[i]->ge… in acceptDefaultParameterDeclaration()
2577 if (node->getAsConstantUnion()) in acceptDefaultParameterDeclaration()
2580 // Otherwise, it has to be const-foldable. in acceptDefaultParameterDeclaration()
2583 node = intermediate.fold(node->getAsAggregate()); in acceptDefaultParameterDeclaration()
2622 if (arraySizes->hasUnsized()) { in acceptParameterDeclaration()
2627 type->transferArraySizes(arraySizes); in acceptParameterDeclaration()
2631 acceptPostDecls(type->getQualifier()); in acceptParameterDeclaration()
2641 …rror(idToken.loc, "invalid parameter after default value parameters", idToken.string->c_str(), ""); in acceptParameterDeclaration()
2670 // we might get back an entry-point in acceptFunctionBody()
2713 if (declNode == nullptr || declNode->getAsTyped() == nullptr) { in acceptParenExpression()
2717 expression = declNode->getAsTyped(); in acceptParenExpression()
2733 // The top-level full expression recognizer.
2784 // a zero-length initializer list in acceptInitializer()
2803 // If every sub-node in the list has qualifier EvqConst, the returned node becomes in acceptInitializer()
2806 if (firstNode && expr->getQualifier().storage == EvqConst) in acceptInitializer()
2807 node->getQualifier().storage = EvqConst; in acceptInitializer()
2808 else if (expr->getQualifier().storage != EvqConst) in acceptInitializer()
2809 node->getQualifier().storage = EvqTemporary; in acceptInitializer()
2828 // associate right-to-left. That is, it is implicit, for example
2863 // gets the right-to-left associativity. in acceptAssignmentExpression()
2884 // Accept a conditional expression, which associates right-to-left,
2925 --parseContext.controlFlowNestingLevel; in acceptConditionalExpression()
2933 // associate left-to-right. This is, it is implicit, for example
2979 // | - unary_expression
2983 // | -- unary_expression
3049 // + is a no-op in acceptUnaryExpression()
3077 // Not implemented as self-recursive: in acceptPostfixExpression()
3100 // user-type, namespace name, variable, or function name in acceptPostfixExpression()
3103 // user-type or namespace name in acceptPostfixExpression()
3104 fullName = NewPoolTString(fullName->c_str()); in acceptPostfixExpression()
3105 fullName->append(parseContext.scopeMangler); in acceptPostfixExpression()
3107 fullName->append(*idToken.string); in acceptPostfixExpression()
3133 // Consume only a valid post-unary operator, otherwise we are done. in acceptPostfixExpression()
3146 // We have a valid post-unary operator, process it. in acceptPostfixExpression()
3183 node = parseContext.handleBracketDereference(indexNode->getLoc(), node, indexNode); in acceptPostfixExpression()
3225 node = parseContext.handleFunctionCall(arguments->getLoc(), constructorFunction, arguments); in acceptConstructor()
3245 // Built-in methods are not in the symbol table as methods, but as global functions in acceptFunctionCall()
3248 functionName->append(name); in acceptFunctionCall()
3250 if (! baseObject->getType().isStruct()) { in acceptFunctionCall()
3255 functionName->append(baseObject->getType().getTypeName()); in acceptFunctionCall()
3257 functionName->append(name); in acceptFunctionCall()
3266 // Non-static member functions have an implicit first argument of the base object. in acceptFunctionCall()
3397 TIntermBranch* branch = statement ? statement->getAsBranchNode() : nullptr; in acceptCompoundStatement()
3398 if (branch != nullptr && (branch->getFlowOp() == EOpCase || in acceptCompoundStatement()
3399 branch->getFlowOp() == EOpDefault)) { in acceptCompoundStatement()
3409 compoundStatement->setOperator(EOpSequence); in acceptCompoundStatement()
3496 // : [zero or more:] bracketed-attribute
3498 // bracketed-attribute:
3499 // : LEFT_BRACKET scoped-attribute RIGHT_BRACKET
3500 // : LEFT_BRACKET LEFT_BRACKET scoped-attribute RIGHT_BRACKET RIGHT_BRACKET
3502 // scoped-attribute:
3571 expressions->getSequence().push_back(node); in acceptAttributes()
3581 if (expectingExpression || expressions->getSequence().empty()) in acceptAttributes()
3600 …arseContext.warn(attributeToken.loc, "unrecognized attribute", attributeToken.string->c_str(), ""); in acceptAttributes()
3622 // of the then-else statements in acceptSelectionStatement()
3655 parseContext.handleSelectionAttributes(loc, statement->getAsSelectionNode(), attributes); in acceptSelectionStatement()
3658 --parseContext.controlFlowNestingLevel; in acceptSelectionStatement()
3687 --parseContext.controlFlowNestingLevel; in acceptSwitchStatement()
3690 …statement = parseContext.addSwitch(loc, switchExpression, statement ? statement->getAsAggregate() … in acceptSwitchStatement()
3704 // Non-speculative, only call if it needs to be found; WHILE or DO or FOR already seen.
3720 // of the while sub-statement in acceptIterationStatement()
3734 expected("while sub-statement"); in acceptIterationStatement()
3740 --parseContext.controlFlowNestingLevel; in acceptIterationStatement()
3752 expected("do sub-statement"); in acceptIterationStatement()
3773 --parseContext.controlFlowNestingLevel; in acceptIterationStatement()
3786 // of the for sub-statement in acceptIterationStatement()
3792 expected("for-loop initializer statement"); in acceptIterationStatement()
3815 expected("for sub-statement"); in acceptIterationStatement()
3823 --parseContext.controlFlowNestingLevel; in acceptIterationStatement()
3953 // Early-out if there aren't any array dimensions in acceptArraySpecifier()
3976 arraySizes->addInnerSize(arraySize); in acceptArraySpecifier()
3978 arraySizes->addInnerSize(0); // sized by initializers. in acceptArraySpecifier()
4044 if (registerDesc.string->size() > 1 && !isdigit((*registerDesc.string)[1]) && in acceptPostDecls()
4116 --braceCount; in captureBlockTokens()
4170 } // end namespace glslang