Goose  Diff

Differences From Artifact [893616dc0d]:

  • File bs/builtins/types/template/uni-tdecl.cpp — part of check-in [0db33d7cb4] at 2019-09-07 16:53:53 on branch trunk — ir: rewrote the super inefficient "term versus trie" matching function. This speeds up everything significantly: compiling the mandelbrot sample is no longer embarrassingly slower than compiling an equivalent c++ version with clang. (user: achavasse size: 8182)

To Artifact [487a999216]:

  • File bs/builtins/types/template/uni-tdecl.cpp — part of check-in [0c3c9488af] at 2019-09-17 20:08:39 on branch trunk —
    • parser: add an utility function to retrieve a sub expression in its unparsed form.
    • tfunc type: store a pointer to a vector of unparsed tokens for the verification statements.
    (user: achavasse size: 8196)

56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
            } );

        e.unificationRuleSet()->addSymRule( tDeclPat, ANYTERM( _ ), UnifyTDecl );
        e.unificationRuleSet()->addSymRule( tDeclPat, UnifyTDecl );

        // tfunc tdecl param / tfunc arg
        auto tFuncTypePat = ValueToIRExpr( Value( TypeType(), VEC( TSID( texpr ), TSID( tfunc ),
            ANYTERM( _ ), ANYTERM( _ ), ANYTERM( _ ) ) ) );

        auto tDeclTFuncPat = ParamPat( GetValueType< TDecl >(), VEC( tFuncTypePat, ANYTERM( _ ) ) );

        e.unificationRuleSet()->addSymRule(

            tDeclTFuncPat,








|







56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
            } );

        e.unificationRuleSet()->addSymRule( tDeclPat, ANYTERM( _ ), UnifyTDecl );
        e.unificationRuleSet()->addSymRule( tDeclPat, UnifyTDecl );

        // tfunc tdecl param / tfunc arg
        auto tFuncTypePat = ValueToIRExpr( Value( TypeType(), VEC( TSID( texpr ), TSID( tfunc ),
            ANYTERM( _ ), ANYTERM( _ ), ANYTERM( _ ), ANYTERM( _ ) ) ) );

        auto tDeclTFuncPat = ParamPat( GetValueType< TDecl >(), VEC( tFuncTypePat, ANYTERM( _ ) ) );

        e.unificationRuleSet()->addSymRule(

            tDeclTFuncPat,