You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
but in AOT compilation value isn't accessible, if the variable type qualifier be var and should be const
// AOT compiler// $ dart compile exe --define=name=ehsan -o main main.dart; ./mainvar definition =String.fromEnvironment('name'); // also `bool.hasEnvironment('name')` returns falseprint(definition); // '' empty String, false boolean, 0 int
Actully my question is what happen in generated code that makes this difference in AOT and JIT compilation?
Is platform checking will happen in runtime? (in AOT compilation)
// the is<platform> static variables also use this getterswitch (Platform.operatingSystem) {
case'linux':// do something linuxbreak;
case'macos':// do something in macbreak;
// and so on...
}
The text was updated successfully, but these errors were encountered:
Hi!
In the dart-lang/language repository I found an issue which is related to my question (I think second one). I will put it here ti make it more clear for others and maybe in documentations.
Hi, dear Vandad!
I have some questions about the dart compilers that I thought this repository would be a great place to speak about it and document for others.
--define=<key>=<value>
option. Now my question is the below code snnipts.but in AOT compilation value isn't accessible, if the variable type qualifier be
var
and should beconst
Actully my question is what happen in generated code that makes this difference in AOT and JIT compilation?
The text was updated successfully, but these errors were encountered: