Lines Matching refs:std
71 fRehydrator->fSymbolTable = std::move(fOldSymbols);
76 std::shared_ptr<SymbolTable> fOldSymbols;
79 Rehydrator::Rehydrator(const Context* context, std::shared_ptr<SymbolTable> symbolTable,
82 , fSymbolTable(std::move(symbolTable))
158 std::vector<const Variable*> parameters;
165 fSymbolTable->takeOwnershipOfSymbol(std::make_unique<FunctionDeclaration>(
169 std::move(parameters),
179 std::make_unique<Field>(/*line=*/-1, owner, index));
186 std::vector<Type::Field> fields;
194 skstd::string_view nameChars(*fSymbolTable->takeOwnershipOfString(std::move(name)));
196 Type::MakeStructType(/*line=*/-1, nameChars, std::move(fields)));
210 std::make_unique<SymbolAlias>(/*line=*/-1, name, origSymbol));
225 std::vector<const FunctionDeclaration*> functions;
233 std::make_unique<UnresolvedFunction>(std::move(functions)));
243 const Variable* result = fSymbolTable->takeOwnershipOfSymbol(std::make_unique<Variable>(
261 std::vector<std::unique_ptr<ProgramElement>> Rehydrator::elements() {
264 std::vector<std::unique_ptr<ProgramElement>> result;
265 while (std::unique_ptr<ProgramElement> elem = this->element()) {
266 result.push_back(std::move(elem));
271 std::unique_ptr<ProgramElement> Rehydrator::element() {
277 std::unique_ptr<Statement> body = this->statement();
279 std::move(body), /*builtin=*/true);
281 return std::move(result);
289 return std::make_unique<InterfaceBlock>(/*line=*/-1, var->as<Variable>(), typeName,
293 std::unique_ptr<Statement> decl = this->statement();
294 return std::make_unique<GlobalVarDeclaration>(std::move(decl));
299 return std::make_unique<StructDefinition>(/*line=*/-1, type->as<Type>());
309 std::unique_ptr<Statement> Rehydrator::statement() {
321 return Block::Make(/*line=*/-1, std::move(statements), fSymbolTable, isScope);
330 std::unique_ptr<Statement> stmt = this->statement();
331 std::unique_ptr<Expression> expr = this->expression();
332 return DoStatement::Make(fContext, std::move(stmt), std::move(expr));
335 std::unique_ptr<Expression> expr = this->expression();
336 return ExpressionStatement::Make(fContext, std::move(expr));
339 std::unique_ptr<Statement> initializer = this->statement();
340 std::unique_ptr<Expression> test = this->expression();
341 std::unique_ptr<Expression> next = this->expression();
342 std::unique_ptr<Statement> body = this->statement();
343 std::shared_ptr<SymbolTable> symbols = this->symbolTable();
344 std::unique_ptr<LoopUnrollInfo> unrollInfo =
347 return ForStatement::Make(fContext, /*line=*/-1, std::move(initializer),
348 std::move(test), std::move(next), std::move(body),
349 std::move(unrollInfo), std::move(symbols));
353 std::unique_ptr<Expression> test = this->expression();
354 std::unique_ptr<Statement> ifTrue = this->statement();
355 std::unique_ptr<Statement> ifFalse = this->statement();
356 return IfStatement::Make(fContext, /*line=*/-1, isStatic, std::move(test),
357 std::move(ifTrue), std::move(ifFalse));
365 std::unique_ptr<Expression> expr = this->expression();
366 return ReturnStatement::Make(/*line=*/-1, std::move(expr));
371 std::unique_ptr<Expression> expr = this->expression();
376 std::unique_ptr<Expression> value = this->expression();
377 std::unique_ptr<Statement> statement = this->statement();
378 cases.push_back(std::make_unique<SwitchCase>(/*line=*/-1, std::move(value),
379 std::move(statement)));
381 return SwitchStatement::Make(fContext, /*line=*/-1, isStatic, std::move(expr),
382 std::move(cases), fSymbolTable);
388 std::unique_ptr<Expression> value = this->expression();
389 return VarDeclaration::Make(fContext, var, baseType, arraySize, std::move(value));
410 std::unique_ptr<Expression> Rehydrator::expression() {
414 std::unique_ptr<Expression> left = this->expression();
416 std::unique_ptr<Expression> right = this->expression();
417 return BinaryExpression::Make(fContext, std::move(left), op, std::move(right));
437 std::move(args[0]));
444 std::move(args[0]));
450 return ConstructorScalarCast::Make(fContext, /*line=*/-1, *type, std::move(args[0]));
456 return ConstructorSplat::Make(fContext, /*line=*/-1, *type, std::move(args[0]));
466 return ConstructorCompoundCast::Make(fContext,/*line=*/-1, *type, std::move(args[0]));
469 std::unique_ptr<Expression> base = this->expression();
472 return FieldAccess::Make(fContext, std::move(base), index, ownerKind);
486 return FunctionCall::Make(fContext, /*line=*/-1, type, *f, std::move(args));
489 std::unique_ptr<Expression> base = this->expression();
490 std::unique_ptr<Expression> index = this->expression();
491 return IndexExpression::Make(fContext, std::move(base), std::move(index));
500 std::unique_ptr<Expression> operand = this->expression();
501 return PostfixExpression::Make(fContext, std::move(operand), op);
505 std::unique_ptr<Expression> operand = this->expression();
506 return PrefixExpression::Make(fContext, op, std::move(operand));
513 std::unique_ptr<Expression> base = this->expression();
519 return Swizzle::Make(fContext, std::move(base), components);
522 std::unique_ptr<Expression> test = this->expression();
523 std::unique_ptr<Expression> ifTrue = this->expression();
524 std::unique_ptr<Expression> ifFalse = this->expression();
525 return TernaryExpression::Make(fContext, std::move(test),
526 std::move(ifTrue), std::move(ifFalse));
542 std::shared_ptr<SymbolTable> Rehydrator::symbolTable(bool inherit) {
549 std::shared_ptr<SymbolTable> oldTable = fSymbolTable;
550 std::shared_ptr<SymbolTable> result =
551 inherit ? std::make_shared<SymbolTable>(fSymbolTable, /*builtin=*/true)
552 : std::make_shared<SymbolTable>(fContext, /*builtin=*/true);
554 std::vector<const Symbol*> ownedSymbols;
560 std::vector<std::pair<skstd::string_view, int>> symbols;