Commit graph

14 commits

Author SHA1 Message Date
Kevin Moore b53dceadaa Update pubspec for dev_compiler and sourcemap_testing
Useful for tracking pkg usage across the SDK

Change-Id: I16fe0e62922afd76270b03e9423632cd900d4c61
Reviewed-on: https://dart-review.googlesource.com/c/91844
Auto-Submit: Kevin Moore <kevmoo@google.com>
Commit-Queue: Jenny Messerly <jmesserly@google.com>
Reviewed-by: Jenny Messerly <jmesserly@google.com>
2019-02-04 20:34:59 +00:00
Sigmund Cherem 61df5fdec8 Encode dart2js source-map extensions in strings.
This reduce the memory footprint and cost of parsing these extensions.  Another
advantage is a reduction on the size of the .map files.  On a large customer
app, this was a 11% reduction, and the frames section was about 1Mb (excluding
the extra names and uris added on the existing tables).

The encoding works as follows:
 - minified names are written as a list of names and indices, in pairs.

    {'n1': 1, 'n2': 2} => 'n1,1,n2,2'

 - frames are encoded using a sequence of values with markers for the different
   kind of frames. Numbers are encoded using VLQ deltas. We use VLQ because it's
   already available to any parser that deals with the mappings).

This change also uses the dart2js_tools parser implementation for all unit tests.

Change-Id: Iacc2833c6517eb473955cc618adec501c610870f
Reviewed-on: https://dart-review.googlesource.com/c/82780
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2018-11-05 18:24:33 +00:00
Sigmund Cherem cb7341fceb Initial support for inlining-data in source-maps.
This starts tracking inlining data and records it as an extension
to source-map files so we are able to expand inlined calls when
deobfuscating production stack traces.


Change-Id: I46daf21c2f42305b2bd6ca17fbafb65226355096
Reviewed-on: https://dart-review.googlesource.com/67083
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2018-07-31 21:41:50 +00:00
Johnni Winther 216e8dfe85 Stop using !kernel annotations
Change-Id: I097253c0eb9ceb27322494194fbc6d899434807e
Reviewed-on: https://dart-review.googlesource.com/61263
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2018-06-21 07:36:42 +00:00
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