This introduces
- a list of valid token positions, so debugging actually
starts to work, and the observatory can be loaded without crash.
- a list of valid yield positions, so stepping over await stuff
works as expected.
- Adding "DebugStepCheckInstr" to the kernel generated il so stepping
over await stuff works as expected, we can break in empty methods etc.
With this, approximately 80% of the service tests pass in kernel mode.
R=kmillikin@google.com
Committed: https://github.com/dart-lang/sdk/commit/2d5147be9d7435c06dd892d145d8717b6d1f62d5
Review-Url: https://codereview.chromium.org/2632183002 .
This introduces
- a list of valid token positions, so debugging actually
starts to work, and the observatory can be loaded without crash.
- a list of valid yield positions, so stepping over await stuff
works as expected.
- Adding "DebugStepCheckInstr" to the kernel generated il so stepping
over await stuff works as expected, we can break in empty methods etc.
With this, approximately 80% of the service tests pass in kernel mode.
R=kmillikin@google.com
Review-Url: https://codereview.chromium.org/2632183002 .
The CL adds metadata support for Fields/Classes/Functions/Constructors. There
are other places where annotations can be put in the Dart language but the
Kernel IR currently does not store it in the AST.
Whenever a element (e.g. a function) gets annotated, the VM will make a [Field] for this
element whos value is an array of evaluated constant metadata annotations.
This CL attaches to these [Fields] a `kernel_function` which is then used to do the constant
evaluation.
R=vegorov@google.com
Review-Url: https://codereview.chromium.org/2632253002 .
Utilize the offsets added in previous CLs.
While this doesn't by it self give anything that resembles
a good debugging experience, it should now be possible to
set *some* breakpoints and actually break on them.
Because of the way observatory works (and because of an
unfinished Script::GenerateLineNumberArray (for kernel))
the formatting of the code you try to load up and 'debug'
has to be quite specific (e.g. no indentation at all),
and even then it mostly doesn't work.
This is step #3 in introducing these things, next step(s) will be
fixing stuff like the above.
R=kmillikin@google.com
Review-Url: https://codereview.chromium.org/2628693004 .
- The flow graph builder is only used to visit Statements and
Expressions so it does not need TreeVisitor as a base class. This
will make refactoring it easier.
- The TranslationHelper is bound to a Thread so we do not need
Thread::Current where we have a TranslationHelper.
- BlockExpression does not exist in Kernel any more, so it can be
removed from the C++ AST implementation.
BUG=
R=kustermann@google.com
Review-Url: https://codereview.chromium.org/2624513005 .
- For now include source uncompressed.
- When running from kernel, use token position 0
(i.e. dummy, but 'real' position) as start and end on functions
and classes to enable Observatory to run with the dill file.
- Debugging does not work, but one can browse the source in
Observatory.
R=kmillikin@google.com
Review-Url: https://codereview.chromium.org/2587673004 .
- Kernel-to-IL translation leaves behind some unused constants without temp indices assigned.
- Let compile time errors propagate instead of failing with FATAL error in the post load class finalization.
R=kustermann@google.com
BUG=
Review URL: https://codereview.chromium.org/2528763002 .
E.g.
file1:
------------
library crash;
part "file2.dart";
main() {
print(field2);
}
crash() {
try {
throw "Crashing!";
} catch(exception, stacktrace) {
print(stacktrace);
}
}
file2:
------------
part of crash;
var field2 = crash();
We want something like
#0 crash (whatnot/file1.dart:11:5)
#1 field2 (whatnot/file2.dart:3:14) <-- good line
#2 field2 (whatnot/file2.dart:3:5)
#3 main (whatnot/file1.dart:6:9)
and not like
#0 crash (whatnot/file1.dart:11:5)
#1 field2 (whatnot/file1.dart:3:14) <-- bad line
#2 field2 (whatnot/file2.dart:3:5)
#3 main (whatnot/file1.dart:6:9)
R=kmillikin@google.com
Review URL: https://codereview.chromium.org/2519133004 .
Fix a trio of issues in type finalization.
1. We were using is_type_finalized to detect classes that had already been
initialized by DilReader::ReadPreliminaryClass. This state is not
guaranteed by this function, however is_cycle_free is.
2. In the VM, classes that were created type finalized were not marked as
cycle free because finalization did not consider them so cycle-freeness
didn't matter. We would therefore try to initialize these classes with
DilReader::ReadPreliminaryClass and mutate types in them. This causes
them to have unfinalized types but still have is_type_finalized true.
3. Types in top-level procedures were not necessarily finalized. A simple
way to achieve this is to finalize each library's top-level class.
Review URL: https://chromereviews.googleplex.com/520437013 .
R=kmillikin@google.com
Review URL: https://codereview.chromium.org/2514373002 .