Commit Graph

10 Commits

Author SHA1 Message Date
Johnni Winther e7bae4c8fd Use int.tryParse in sourcemap_testing
Change-Id: I7e2f51628604cc7522752b7b67d3c5b6775901c2
Reviewed-on: https://dart-review.googlesource.com/54905
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2018-05-14 13:56:18 +00:00
Johnni Winther f373cfed83 Add omit-implicit-checks mode to equivalence tests.
Change-Id: Ifd98727384943d167b0ef39caaa9c1351b16e9ee
Reviewed-on: https://dart-review.googlesource.com/52805
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-05-01 12:41:59 +00:00
Jenny Messerly 2d851eb444 fix #32083, improve hover and stepping for DDC source maps
This change improves DDC/DDK source maps:
- fix Analyzer backend step locations to pass all of the tests
  Kernel was passing. Also improves breakpoints and code coverage.
- fix Analyzer backend to mark hover spans where possible, such as
  fields, parameters, locals, `this`, properties, methods, etc.
- refactor DDC/DDK backends to emit source locations, rather than
  pointers to Analyzer/Kernel tree nodes.
- unify/simplify source_map_printer between Analyzer/Kernel backends.
- source_map_printer understands JS expression nesting, marking the
  innermost JS expression offset corresponding to a given Dart offset.
  This preserves hover tooltips, even for expressions with implicit
  coercions (e.g. `dart.test(x)`)
- source_map_printer understands that JS end-of-function markings need
  to be before the closing brace.
- merge _visitAndMarkExpression and _visitExpression to simplify
  Analyzer & Kernel backends.
- fix test expectations where the column location was too specific.
- adds a message to the stepping test runner to help future debugging.
- removes optional destructuring support from Analyzer backend. This
  was unused/untested and added complexity. Instead we should decide
  if/when to fully switch to destructuring, and then do so.

Change-Id: Ic47b4e21447fffc8fb1809b7bf8ffceeeb61b43e
Reviewed-on: https://dart-review.googlesource.com/42028
Reviewed-by: Vijay Menon <vsm@google.com>
2018-02-17 21:25:56 +00:00
Johnni Winther d539c78af1 Add source information to parameter stubs.
Change-Id: If942cc13203752361c3104c89190d75979073498
Reviewed-on: https://dart-review.googlesource.com/34440
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-01-12 21:23:40 +00:00
Johnni Winther a521c7f255 First step debugging tests.
Change-Id: I8a947999778f851ed38c1a9fb518af00664f19ec
Reviewed-on: https://dart-review.googlesource.com/30740
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2017-12-21 14:03:51 +00:00
Jens Johansen 03090df3fa [DDC/dart2js] Move sourcemap testing to shared place
This moves the logic previously used in DDC for testing stepping via
sourcemaps to a shared location so both DDC and dart2js can make use
of the same thing.

Bug:
Change-Id: I83a2b1fc4fe5cefe3c8537e50d03c3e41e0490a8
Reviewed-on: https://dart-review.googlesource.com/24110
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2017-11-30 11:10:51 +00:00
Jens Johansen b561850fb5 [DDC] Stacktrace tests
This CL copied stacktrace test ccases from dart2js and updates them
to DDC (mostly kernel version).

Some tests fail (marked in status file) because of dartbug.com/31451.

Bug:
Change-Id: If89c292eedb162fe7fe2832e909654e4ee083340
Reviewed-on: https://dart-review.googlesource.com/23500
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2017-11-24 14:05:20 +00:00
Jens Johansen e97f818778 [DDC-kernel] Stacktrace test
First stacktrace test making use of the shared testing functionality
originally used by dart2js.

Bug:
Change-Id: Ia3528e2860a5bea48365c32a6526811d06ec001c
Reviewed-on: https://dart-review.googlesource.com/23060
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2017-11-23 11:25:16 +00:00
Jens Johansen 1e4625ea38 Small changes to stacktrace_helper to prepare for ddc usage
Bug:
Change-Id: Iab4fb0536456cded152646bf2725e8c918e4a8e8
Reviewed-on: https://dart-review.googlesource.com/23020
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2017-11-22 14:30:37 +00:00
Johnni Winther b9a222615b Add sourcemap_testing package
Change-Id: I9655ebf5bb93c61f9d1f0eae1fbc615761f23b47
Reviewed-on: https://dart-review.googlesource.com/22520
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2017-11-21 15:09:38 +00:00