-
Notifications
You must be signed in to change notification settings - Fork 99
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
try to AOT #1001
Comments
I found that this issue not only occurs in AOT mode, but also exists in the interpretation mode. When I try to run the following code...
I get the following output:
It doesn't perform as expected. Is there a mistake in my code? |
It is indeed a bug. Currently /* a->b(args) is short for invoke(a.b, cast deref(a), args) */. This clearly does not work for chaining class methods. Will fix shortly. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm trying to AOT the following code:
print("{new String("hello!")->to_upper()->utf8()}\n");
got:
builtin_print(das_string_builder(__context__,SimNode_AotInterop<2>(__tinfo_0, cast<char *>::from(das_invoke_function<char *>::invoke<test::String &>(__context__,nullptr,das_invoke_function<test::String & *>::invoke<test::String &>(__context__,nullptr,das_new<test::String>::make_and_init(__context__,[&]() { return das_invoke_function<test::String>::invoke_cmres<char * const >(__context__,nullptr,Func(__context__->fnByMangledName(/*@test::String Cs*/ 12949979443183231949u)),((char *) "hello!")); })->to_upper,das_arg<test::String>::pass(das_cast<test::String const >::cast(das_deref(__context__,das_new<test::String>::make_and_init(__context__,[&]() { return das_invoke_function<test::String>::invoke_cmres<char * const >(__context__,nullptr,Func(__context__->fnByMangledName(/*@test::String Cs*/ 12949979443183231949u)),((char *) "hello!")); })))))->utf8,das_arg<test::String>::pass(das_cast<test::String const >::cast(das_deref(__context__,das_invoke_function<test::String *>::invoke<test::String &>(__context__,nullptr,das_new<test::String>::make_and_init(__context__,[&]() { return das_invoke_function<test::String>::invoke_cmres<char * const >(__context__,nullptr,Func(__context__->fnByMangledName(/*@test::String Cs*/ 12949979443183231949u)),((char *) "hello!")); })->to_upper,das_arg<test::String>::pass(das_cast<test::String const >::cast(das_deref(__context__,das_new<test::String>::make_and_init(__context__,[&]() { return das_invoke_function<test::String>::invoke_cmres<char * const >(__context__,nullptr,Func(__context__->fnByMangledName(/*@test::String Cs*/ 12949979443183231949u)),((char *) "hello!")); })))))))))), cast<char * const >::from(((char *) "\n")))),__context__,((LineInfoArg *)(&LineInfo::g_LineInfoNULL)));
with some compile errors. I noticed a few issues in it,
das_invoke_function<test::String & *>
new String("hello!")
appears multiple times? (I'm not quite sure)The text was updated successfully, but these errors were encountered: