Skip to content

Comments

Remove staticIota + mixinAll#6049

Merged
thewilsonator merged 1 commit intodlang:masterfrom
wilzbach:remove-staticiota
Nov 15, 2018
Merged

Remove staticIota + mixinAll#6049
thewilsonator merged 1 commit intodlang:masterfrom
wilzbach:remove-staticiota

Conversation

@wilzbach
Copy link
Contributor

Now that we have static foreach, we can remove these all workarounds.

@dlang-bot
Copy link
Contributor

dlang-bot commented Jan 22, 2018

Thanks for your pull request, @wilzbach!

Bugzilla references

Your PR doesn't reference any Bugzilla issue.

If your PR contains non-trivial changes, please reference a Bugzilla issue or create a manual changelog.

Testing this PR locally

If you don't have a local development environment setup, you can use Digger to test this PR:

dub fetch digger
dub run digger -- build "master + phobos#6049"

auto nr = regex(tvd.pattern, tvd.flags);
assert(equal(r.ir, nr.ir),
text("!C-T regex! failed to compile pattern #", a ,": ", tvd.pattern));
text("!C-T regex! failed to compile pattern #", v ,": ", tvd.pattern));
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The number a wasn't very useful here anyhow - v is the actual number of the test.

else
alias Tests = AliasSeq!(Sequence!(0, 30), Sequence!(235, tv.length-5));
static foreach (a, v; Tests)
enum Tests = chain(iota(0, 30), iota(235, tv.length-5));
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't it strange that we only execute a part of the std.regex tests here?

!(is(A[i] == config)))
{
msg = format(fmt, "invalid argument type: " ~ A[i].stringof, i);
goto end;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needed until we get static break

@wilzbach
Copy link
Contributor Author

Windows fails rather cryptically with:

object.Error@(0): Access Violation
----------------
0x0040FDCE
0x00407BDD
0x004FBB81
0x005550C9
0x005074E9
0x77873AC8 in MultiByteToWideChar

whereas DAutoTest shows an ICE:

core.exception.AssertError@dmd/cond.d(378): Assertion failure
----------------
??:? _d_assert [0x742290]
??:? void dmd.cond.__assert(int) [0x51efa6]
??:? _D3dmd4cond13StaticForeach7prepareMFPS3dmd6dscope5ScopeZ9__requireMFNaNbNiNfZv [0x51e284]
??:? void dmd.cond.StaticForeach.prepare(dmd.dscope.Scope*) [0x51e144]
??:? _ZN24StaticForeachDeclaration7includeEP5Scope [0x515127]
??:? _ZN13ToJsonVisitor5visitEP17AttribDeclaration [0x5e17f3]
??:? _ZN16ParseTimeVisitorI10ASTCodegenE5visitEP24StaticForeachDeclaration [0x644b6a]
??:? _ZN24StaticForeachDeclaration6acceptEP7Visitor [0x51527c]
??:? _ZN13ToJsonVisitor5visitEP17AttribDeclaration [0x5e1835]
??:? _ZN16ParseTimeVisitorI10ASTCodegenE5visitEP15ProtDeclaration [0x644b2a]
??:? _ZN15ProtDeclaration6acceptEP7Visitor [0x51431c]
??:? _ZN13ToJsonVisitor5visitEP17AttribDeclaration [0x5e1835]
??:? _ZN16ParseTimeVisitorI10ASTCodegenE5visitEP15ProtDeclaration [0x644b2a]
??:? _ZN15ProtDeclaration6acceptEP7Visitor [0x51431c]
??:? _ZN13ToJsonVisitor5visitEP20AggregateDeclaration [0x5e1a8a]
??:? _ZN16ParseTimeVisitorI10ASTCodegenE5visitEP16ClassDeclaration [0x644bdd]
??:? _ZN16ClassDeclaration6acceptEP7Visitor [0x53c224]
??:? _ZN13ToJsonVisitor5visitEP17AttribDeclaration [0x5e1835]
??:? _ZN16ParseTimeVisitorI10ASTCodegenE5visitEP23StorageClassDeclaration [0x644b4a]
??:? _ZN23StorageClassDeclaration6acceptEP7Visitor [0x513b7c]
??:? _ZN13ToJsonVisitor5visitEP19TemplateDeclaration [0x5e1f99]
??:? _ZN19TemplateDeclaration6acceptEP7Visitor [0x57ec04]
??:? _ZN13ToJsonVisitor5visitEP19TemplateDeclaration [0x5e1f99]
??:? _ZN19TemplateDeclaration6acceptEP7Visitor [0x57ec04]
??:? _ZN13ToJsonVisitor5visitEP6Module [0x5e1429]
??:? _ZN6Module6acceptEP7Visitor [0x55c2a4]
??:? _Z13json_generateP9OutBufferP5ArrayIP6ModuleE [0x5e22ec]
??:? int dmd.mars.tryMain(ulong, const(char)**) [0x5fcffa]
??:? _Dmain [0x5fddce]
??:? _D2rt6dmain211_d_run_mainUiPPaPUAAaZiZ6runAllMFZ9__lambda1MFZv [0x744577]
??:? void rt.dmain2._d_run_main(int, char**, extern (C) int function(char[][])*).tryExec(scope void delegate()) [0x7444a3]
??:? void rt.dmain2._d_run_main(int, char**, extern (C) int function(char[][])*).runAll() [0x74451c]
??:? void rt.dmain2._d_run_main(int, char**, extern (C) int function(char[][])*).tryExec(scope void delegate()) [0x7444a3]
??:? _d_run_main [0x744407]
??:? main [0x601747]
??:? __libc_start_main [0xf6d6782f]

I guess I'll have to split this up into tiny bits :/

@wilzbach
Copy link
Contributor Author

@wilzbach
Copy link
Contributor Author

Okay, now all sub PRs are in and I'm interested to see whether it's still failing with the same error message.
FWIW #6050 did exactly the same modification and passed the testsuite.

@JackStouffer
Copy link
Contributor

@wilzbach Can you kick the doc tester?

@wilzbach
Copy link
Contributor Author

@JackStouffer it won't help, the DMD ICE is still there and auto-tester has still its errors.
I won't have much time over the next days to look into these, so I'm setting this to "Blocked".

@wilzbach
Copy link
Contributor Author

Looks like the Windows crash has been fixed:

image

And this is ready to be merged now :)

@thewilsonator
Copy link
Contributor

It would if the OSX boxes weren't AWOL.

@thewilsonator thewilsonator merged commit bf02a04 into dlang:master Nov 15, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants