Lines Matching defs:program
321 // Built-in modules always use default program settings.
360 // program elements. In that case, we can share our parent's intrinsic map:
367 // Now, transfer all of the program elements to an intrinsic map. This maps certain types of
450 return DSLParser(this, settings, kind, std::move(text)).program();
508 // Create a temporary program configuration with default settings.
529 bool Compiler::optimize(Program& program) {
531 if (!program.fConfig->fSettings.fOptimize) {
536 ProgramUsage* usage = program.fUsage.get();
541 this->runInliner(program.fOwnedElements, program.fSymbols, usage);
544 Transform::EliminateUnreachableCode(program, usage);
546 while (Transform::EliminateDeadFunctions(program, usage)) {
549 while (Transform::EliminateDeadLocalVariables(program, usage)) {
553 Transform::EliminateDeadGlobalVariables(program, usage);
562 // The program's SymbolTable was taken out of fSymbolTable when the program was bundled, but
569 // program's symbol table temporarily.
579 bool Compiler::finalize(Program& program) {
582 Analysis::VerifyStaticTestsAndExpressions(program);
584 // Verify that the program conforms to ES2 limitations.
588 for (const auto& pe : program.fOwnedElements) {
591 // Verify that the program size is reasonable after unrolling and inlining. This also
593 Analysis::CheckProgramUnrolledSize(program);
601 bool Compiler::toSPIRV(Program& program, OutputStream& out) {
603 AutoSource as(this, program.fSource->c_str());
606 dsl::Start(this, program.fConfig->fKind, settings);
608 fSymbolTable = program.fSymbols;
611 SPIRVCodeGenerator cg(fContext.get(), &program, &buffer);
613 if (result && program.fConfig->fSettings.fValidateSPIRV) {
645 SPIRVCodeGenerator cg(fContext.get(), &program, &out);
652 bool Compiler::toSPIRV(Program& program, String* out) {
654 bool result = this->toSPIRV(program, buffer);
661 bool Compiler::toGLSL(Program& program, OutputStream& out) {
663 AutoSource as(this, program.fSource->c_str());
664 GLSLCodeGenerator cg(fContext.get(), &program, &out);
669 bool Compiler::toGLSL(Program& program, String* out) {
671 bool result = this->toGLSL(program, buffer);
678 bool Compiler::toHLSL(Program& program, String* out) {
680 if (!this->toSPIRV(program, &spirv)) {
687 bool Compiler::toMetal(Program& program, OutputStream& out) {
689 AutoSource as(this, program.fSource->c_str());
690 MetalCodeGenerator cg(fContext.get(), &program, &out);
695 bool Compiler::toMetal(Program& program, String* out) {
697 bool result = this->toMetal(program, buffer);