Commit Graph

65 Commits

Author SHA1 Message Date
Kevin Moore 0512babe76 pkg/js: mark discontinued/deprecated
Towards https://github.com/dart-lang/sdk/issues/59716

Change-Id: Iaea45a8fccf5c3e2fb52ef34420ddbcd5b92a13f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/401201
Reviewed-by: Srujan Gaddam <srujzs@google.com>
Auto-Submit: Kevin Moore <kevmoo@google.com>
Reviewed-by: Kevin Moore <kevmoo@google.com>
Commit-Queue: Srujan Gaddam <srujzs@google.com>
2024-12-16 16:58:37 -08:00
Devon Carew 89532d54ed [deps] rev package:lints to capture the unnecessary_library_name addition
Change-Id: I6ca4b0cef189248eac4d0898e8549424f2d889bb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/380180
Commit-Queue: Devon Carew <devoncarew@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
2024-08-13 17:04:13 +00:00
Oleh Prypin 0da8f7a7b4 Remove unnecessary imports of 'package:collection' IterableExtension
* Replace `.whereNotNull()` with `.nonNulls` which is now in Dart core.
* `.firstOrNull`, `.lastOrNull`, `.singleOrNull` and `.elementAtOrNull(i)` are also in Dart core and even under the same name, so simply drop the import of 'package:collection' whenever possible.

Bug: b/322159291
Change-Id: I81eb93426680dc78a608bbcc714eb26c0eca5c62
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/348260
Reviewed-by: Lasse Nielsen <lrn@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Oleh Prypin <oprypin@google.com>
2024-01-25 11:07:28 +00:00
Nicholas Shahan 017401cb35 [ddc] Migrate stack trace utilities to null safety
Issue: https://github.com/dart-lang/sdk/issues/46617
Change-Id: Idfd614e3bcc4e3e8ae1597d69c97d007b7efd306
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/250351
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2022-07-19 21:37:34 +00:00
pq d2882856ef lints 2.0 fixes
In anticipation of lints v 2.0.

See: https://dart-review.googlesource.com/c/sdk/+/237746


Change-Id: If6ec7f0bae314af3aa84e4d8a7b9fc1b8219c128
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/237763
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Srujan Gaddam <srujzs@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2022-03-18 01:42:47 +00:00
Leaf Petersen e85bf740ef Opt pkg/dev_compiler out of null safety.
Change-Id: I62207a436605480b6981b8b00bf7b88d8589db0f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/166980
Commit-Queue: Leaf Petersen <leafp@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
2020-10-12 23:25:42 +00:00
Nicholas Shahan c438a48bc4 [dartdevc] Enforce more pedantic v1.9.0 lints and cleanup violations
- prefer_generic_function_type_aliases
- use_function_type_syntax_for_parameters

Change-Id: I138d4104c5de41acf44b7962d6e2ce58d78b8a75
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134380
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
2020-02-04 23:04:27 +00:00
Nicholas Shahan 40e816b456 [dartdevc] Apply lints and cleanup violations
- always_require_non_null_named_parameters
- prefer_final_fields

Change-Id: I21dc5a9514fe2a7bb09c91fe28b2d4b79d7991e2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/133840
Auto-Submit: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
Commit-Queue: Nate Bosch <nbosch@google.com>
2020-01-31 00:47:26 +00:00
Nicholas Shahan e3797b1bb7 [dartdevc] Apply more lints from pedantic v1.9.0 and cleanup violations
- avoid_null_checks_in_equality_operators
- camel_case_extensions
- prefer_adjacent_string_concatenation
- prefer_collection_literals
- prefer_for_elements_to_map_fromIterable
- prefer_if_null_operators
- prefer_spread_collections

Change-Id: Iab816e71274a57cbca9b4006dc8dbc55604fcb2f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/133500
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
2020-01-29 22:14:00 +00:00
Nate Bosch 3eaae5405d Enable and fix directives_ordering lint
Change-Id: I7782bc44f79bb2317921ebf400411d5ef01e11cf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/132970
Commit-Queue: Nate Bosch <nbosch@google.com>
Auto-Submit: Nate Bosch <nbosch@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
2020-01-23 21:01:54 +00:00
Nate Bosch 2d82fb42ce Enforce and fix lint prefer_single_quotes
Change-Id: I7e7b18d90ae8518c700607ec383c73a0eda5a299
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/130726
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Auto-Submit: Nate Bosch <nbosch@google.com>
2020-01-08 22:07:21 +00:00
Mark Zhou b368a6de1c [dartdevc] copying over sourcemap file from build_web_compilers
Change-Id: Id5e4554c775becc9b1313c5cd85bd02920ea52f1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/121440
Commit-Queue: Mark Zhou <markzipan@google.com>
Reviewed-by: Jake Macdonald <jakemac@google.com>
2019-10-15 20:03:34 +00:00
Mark Zhou 36e4d5e3c2 Reland "[dartdevc] cleaning up unused web files"
This is a reland of e866f043cf

Original change's description:
> [dartdevc] cleaning up unused web files
>
> Dependent on these google3 changes: https://critique.corp.google.com/#review/272749649
>
> Change-Id: I9e89142cd5b2a619acfc35badb9cf3c549b3be9c
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/119587
> Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
> Commit-Queue: Mark Zhou <markzipan@google.com>

Change-Id: I7e01fb4ad60e47808721fa49b3ca3498e7aeaf46
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/120200
Commit-Queue: Mark Zhou <markzipan@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
2019-10-05 00:27:22 +00:00
David Morgan d6c6d12ebf Revert "[dartdevc] cleaning up unused web files"
This reverts commit e866f043cf.

Reason for revert: Breaks google3.

Original change's description:
> [dartdevc] cleaning up unused web files
> 
> Dependent on these google3 changes: https://critique.corp.google.com/#review/272749649
> 
> Change-Id: I9e89142cd5b2a619acfc35badb9cf3c549b3be9c
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/119587
> Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
> Commit-Queue: Mark Zhou <markzipan@google.com>

TBR=scheglov@google.com,vsm@google.com,markzipan@google.com

Change-Id: I1db094d94d699d4d18c4091f57c7cb775eb95dd5
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/120040
Reviewed-by: David Morgan <davidmorgan@google.com>
Commit-Queue: David Morgan <davidmorgan@google.com>
2019-10-04 10:11:30 +00:00
Mark Zhou e866f043cf [dartdevc] cleaning up unused web files
Dependent on these google3 changes: https://critique.corp.google.com/#review/272749649

Change-Id: I9e89142cd5b2a619acfc35badb9cf3c549b3be9c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/119587
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Mark Zhou <markzipan@google.com>
2019-10-04 02:40:43 +00:00
Jacob MacDonald 7972c61aab fix detection of dart sdk lines in stack traces to recognize the ddk sdk
Change-Id: Ic94460833e9358b631bf1485a495ae386ff3e863
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/118780
Reviewed-by: Vijay Menon <vsm@google.com>
Commit-Queue: Jake Macdonald <jakemac@google.com>
Auto-Submit: Jake Macdonald <jakemac@google.com>
2019-09-25 15:45:09 +00:00
Nicholas Shahan 42769d3391 [dartdevc] Update error messages to use new label in github url
area-dev-compiler --> web-dev-compiler

Fixes: #37615
Change-Id: Iab0bb57ed0114bf6918d16d13bc6744bbfde1cc5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/110345
Auto-Submit: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Vijay Menon <vsm@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2019-07-26 21:36:56 +00:00
Nate Bosch 2a2d41658f Update DDC import prefix for path package
The docs recommend `as p` and it's consistent with usage in other
dart-lang packages.

Change-Id: I242387c5583ba01b0a7ec0287462dbc289b7df01
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/108561
Commit-Queue: Nate Bosch <nbosch@google.com>
Auto-Submit: Nate Bosch <nbosch@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
2019-07-10 21:58:31 +00:00
Nate Bosch aa246f6588 Add return types on all main declarations
Reduces the noise when disallowing implicit dynamic.

Change-Id: I98b03cb675ecd4b9e7f4135efa274fb57eb87832
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/104164
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Nate Bosch <nbosch@google.com>
2019-06-11 00:19:00 +00:00
Nicholas Shahan 2fd1021326 [dartdevc] Turn on lints and cleanup violations
Working towards turning on all lints from package:pedantic. This change includes
the lints that needed cleanup and don't change any behavior.

Applied cleanup:
* Don't explicitly initialize variables to null.
* DO use curly braces for all flow control structures.
* Use `.isEmpty` instead of `.length == 0`.
* Use `.isNotEmpty` instead of `.length > 0` or `! .isEmpty`.
* Use `=` to separate a named parameter from its default value.

The remaining lints from package:pedantic will require cleanup that is less
automatic and will be addressed in later changes.

Change-Id: Ie4c3ba685f8a559209dd14ac037203ecd16252c7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/103086
Reviewed-by: Nate Bosch <nbosch@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2019-05-20 20:20:47 +00:00
Nate Bosch 04e329b6ed Add override annotations across DDC
Previously 36% of overrides were annotated, including inconsistent
annotations within a single class.

- Add annotations on remaining overridden methods.
- Add linter section to `analysis_options.yaml` so that missing
  annotations are visible while editing.

Change-Id: Ief1a6d5b8da6f4b630a6cfc72a6ed67db346c081
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/103140
Reviewed-by: Vijay Menon <vsm@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
2019-05-20 17:31:26 +00:00
Jenny Messerly 65951ef508 [dartdevc] fix debugger extension console, take 2
This change fixes the (internal) debugger console test so it passes.

A few of the fixes did not make it into the previous CL
(CL https://dart-review.googlesource.com/c/sdk/+/83140).

Change-Id: I58df9024b96e73a13a5c13b801be237450cfe3cb
Reviewed-on: https://dart-review.googlesource.com/c/83522
Auto-Submit: Jenny Messerly <jmesserly@google.com>
Reviewed-by: Alan Knight <alanknight@google.com>
Commit-Queue: Keerti Parthasarathy <keertip@google.com>
2018-11-07 23:39:17 +00:00
Jenny Messerly d8d6835849 [dartdevc] fix debugger extension console
This change fixes the (internal) debugger console test so it passes.

Change-Id: Iaae1ec189d6744158ebea4dd55e187146adf9039
Reviewed-on: https://dart-review.googlesource.com/c/83140
Reviewed-by: Vijay Menon <vsm@google.com>
Reviewed-by: Alan Knight <alanknight@google.com>
Commit-Queue: Jenny Messerly <jmesserly@google.com>
2018-11-06 23:31:11 +00:00
Jenny Messerly be815e1a86 [dartdevc] fix #35013, move DDC off Analyzer task model
The new file pkg/dev_compiler/lib/src/analyzer/driver.dart handles
building the linked summary for a build unit, and then is capable of
doing analysis using LibraryAnalyzer.

The algorithm is very similar to analyzer_cli's build mode. The
biggest difference is that `dartdevc` has existing support for
discovering source files from the explicit source list (rather than
requiring every source to be listed on the command line). We don't want
to break that support, so there's a bit of logic to follow imports,
exports, and parts.

After the linked summary is produced, DDC gets the analysis results
(errors and resolved AST) for each library, and compiles it into a JS
module.

Change-Id: I7bf1ce1eca73fd036002e498de5924c488b534dc
Reviewed-on: https://dart-review.googlesource.com/c/82469
Commit-Queue: Jenny Messerly <jmesserly@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Vijay Menon <vsm@google.com>
2018-11-06 00:52:24 +00:00
Jenny Messerly 472c898c87 [dartdevc] fix for-in loop variable shadowing a var used in initialzer
Dart for-in loops allow `var x = [1]; for (var x in x) {}`, which is not
allowed in JS. If this pattern is detected, a temporary variable is
introduced so the for-in initializer expression is evaluated outside of
the JS for-of loop.

(This issue seems to be unique to for-in loops. For loops and other
kinds of variable declarations of the form `var x = ...` are not
allowed to use `x` in the initializer, even if `x` is declared in an
outer scope.)

Also fixes an out-of-date comment in the DDC+Analyzer backend.

Change-Id: I35b272a5a311f7b6f104cc82a99cc83a6ed5c247
Reviewed-on: https://dart-review.googlesource.com/c/79142
Commit-Queue: Alan Knight <alanknight@google.com>
Auto-Submit: Jenny Messerly <jmesserly@google.com>
Reviewed-by: Alan Knight <alanknight@google.com>
2018-10-11 17:07:39 +00:00
Jenny Messerly f320477ff9 [dartdevc] add module-name option to kernel backend
This name is not used by most module formats, but we do use it with the
legacy format.

Change-Id: I8d2f36b12a60b37d0460b57d5a360ba21b4e0476
Reviewed-on: https://dart-review.googlesource.com/c/78923
Reviewed-by: Jake Macdonald <jakemac@google.com>
Commit-Queue: Jenny Messerly <jmesserly@google.com>
2018-10-10 18:09:03 +00:00
Jenny Messerly 1a122e3ac0 Deprecate module-root option in dartdevc, part of #32272
Adds an option for specifying the output JS module name if that is
needed (only applies for some module formats).

Also removes repl-compile (it's set via API, not the command line).

Refactors dartdevk options to match dartdevc so we can migrate more
easily. Moves shared code into a shared location and removes copied
code.

Change-Id: I966343ecbbc962f5d0f14ea7e65d78660159f420
Reviewed-on: https://dart-review.googlesource.com/64823
Commit-Queue: Jenny Messerly <jmesserly@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
2018-07-26 02:43:48 +00:00
Nate Bosch 906647c046 Fix Dart 2 runtime issue on DDC for the web
`CommandRunner.run` will return a `Future<T>` and in this case the `T`
is `dynamic`.

Change-Id: Ief156cfc298d3747da805c26e81d34ed7628d00b
Reviewed-on: https://dart-review.googlesource.com/66520
Reviewed-by: Jenny Messerly <jmesserly@google.com>
Commit-Queue: Nate Bosch <nbosch@google.com>
2018-07-25 00:54:11 +00:00
Jenny Messerly 1ef4399df0 Run dartfmt --fix for dart2 on pkg/dev_compiler
This uses optional new/const and `=` in named argument defaults.

All changes are automated, except for:

- utils/dartdevc/BUILD.gn: run DDC build scripts with --preview-dart-2
- pkg/dev_compiler/tool/patch_sdk.dart: add a TODO that Analyzer doesn't
  supporting implicit const in libraries.dart
- pkg/dev_compiler/tool/input_sdk/libraries.dart: was not formatted due
  to the aforementioned Analyzer bug
- tools/bots/test_matrix.json: run DDC sourcemap suite in Dart 2 mode
- pkg/pkg.status: skip pkg/dev_compiler if running in Dart 1 mode

Change-Id: I9b80ccba0c2cc7b66efc662a0b16562e3660aee3
Reviewed-on: https://dart-review.googlesource.com/60402
Commit-Queue: Jenny Messerly <jmesserly@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
2018-06-15 00:28:13 +00:00
Jenny Messerly b07a4bc264 improve deduping of cached types in DDC/K
This works around broken FunctionTypeImpl.== in Analyzer. Also
makes DDK's type naming heuristic more consistent with DDC.

Change-Id: I09527fad681c3fdc6c66654e572e9b03c57491bd
Reviewed-on: https://dart-review.googlesource.com/37120
Reviewed-by: Vijay Menon <vsm@google.com>
Commit-Queue: Jenny Messerly <jmesserly@google.com>
2018-04-04 00:37:21 +00:00
Jenny Messerly 053a594c9e Remove package:browser usage in DDC repl extension code
Change-Id: I4433fd44daca07d7a2d8f405d5940341719ed3de
Reviewed-on: https://dart-review.googlesource.com/46704
Commit-Queue: Jenny Messerly <jmesserly@google.com>
Reviewed-by: Kevin Moore <kevmoo@google.com>
2018-03-15 01:42:12 +00:00
Jenny Messerly dab7da78cd fix implicit casts in DDC
There are a few bug fixes here as well. Most notably, `.name.name`
instead of `.name` in DDK's analysis of virtual accessors. DDC/K's
handling of spread arguments in JS interop was also fairly broken
(it was generating a RestParameter instead of Spread). There's
also a lot of cleanup in js_ast as well, to make it a bit more
type safe.

Change-Id: Ia5333179e6dd0a62f20ce64a2b2b8bedf2ed7c49
Reviewed-on: https://dart-review.googlesource.com/44700
Commit-Queue: Jenny Messerly <jmesserly@google.com>
Reviewed-by: Vijay Menon <vsm@google.com>
2018-03-07 01:26:21 +00:00
Vijay Menon 34f8c356a3 Fix sdk stack trace mapping so tools recognize it
This should fix #32389

Change-Id: I1e6f1a7aea852abb9b2b4a9bf851941a8e0c91e7
Reviewed-on: https://dart-review.googlesource.com/44840
Reviewed-by: Jake Macdonald <jakemac@google.com>
Commit-Queue: Vijay Menon <vsm@google.com>
2018-03-02 19:46:49 +00:00
Vijay Menon ea7c7988e3 Don't inline source maps into the SDK
Change-Id: Ia4e8673cf0c023353b27a3c0a947b09e04ec09c0
Reviewed-on: https://dart-review.googlesource.com/44320
Reviewed-by: Jenny Messerly <jmesserly@google.com>
Commit-Queue: Vijay Menon <vsm@google.com>
2018-03-01 03:21:37 +00:00
Jacob MacDonald 0bda5c9015 get source_map_stack_trace working for the external world
Bug:
Change-Id: I7385f2f1f11742ce5f90cce67b863ba066074679
Reviewed-on: https://dart-review.googlesource.com/41921
Reviewed-by: Vijay Menon <vsm@google.com>
Commit-Queue: Jake Macdonald <jakemac@google.com>
2018-02-15 22:45:26 +00:00
Alan Knight 19ac7a0df3 Add withCredentials: true to the SDK request in DDC web compilation
Bug:
Change-Id: Ica9e3e9f6160562090a62f584a5c9b2d851edf36
Reviewed-on: https://dart-review.googlesource.com/30628
Reviewed-by: Jacob Richman <jacobr@google.com>
Commit-Queue: Alan Knight <alanknight@google.com>
2017-12-20 19:05:42 +00:00
Jenny Messerly ef3ac59dd6 add a dartdevk command that compiles with the new front end
This ports a fairly large part of DDC's Analyzer-based code generator,
however most nodes are not supported yet.

The goal is to preserve all functionality of code that was ported,
except for deprecated features (e.g. mirrors, fuzzy arrows, libraryRoot).

Change-Id: I3b10d5773c7c10a740fa336720243b03c6b82529
Reviewed-on: https://dart-review.googlesource.com/10705
Reviewed-by: Vijay Menon <vsm@google.com>
2017-10-16 21:13:52 +00:00
Vijay Menon f95daf6168 Fix DDC stack trace mapping
This supersedes https://dart-review.googlesource.com/c/sdk/+/4614.

Patch 1 is the unmodified source_map_stack_trace.dart. Patch 2 is my fixes for DDC.

Change-Id: I30c6fad4bdc75061edbacc5fc75482af98e29bbb
Reviewed-on: https://dart-review.googlesource.com/4960
Reviewed-by: Jacob Richman <jacobr@google.com>
Reviewed-by: Jake Macdonald <jakemac@google.com>
Commit-Queue: Vijay Menon <vsm@google.com>
2017-09-11 21:52:41 +00:00
Konstantin Shcheglov 5b29ae48ad Don't record dependencies in SummaryDataStore.
It was added for DDC, but DDC does not use it anymore. At the same time,
URIs operations are expensive, and this code is showing in Observatory.

R=brianwilkerson@google.com, paulberry@google.com
BUG=

Review-Url: https://codereview.chromium.org/2996783002 .
2017-08-09 17:45:13 -07:00
Devon Carew a7c3358378 Remove an unused symbol analysis warning.
BUG=
R=vsm@google.com

Review-Url: https://codereview.chromium.org/2911983009 .
2017-05-30 18:06:11 -07:00
Jacob Richman 65e0b8994e Add progress events for loading DDC summaries to make it clear to users whether loading a DDC application has timed out.
BUG=
R=alanknight@google.com

Review-Url: https://codereview.chromium.org/2879843004 .
2017-05-15 08:41:00 -07:00
Jacob Richman b280a7803d Dev compiler debugger related tweaks.
Optimize dynamic call tracking using random sampling.
Apply source maps to improve dynamic call tracking accuracy.
Dynamic calls within the sdk are now attributed correctly.

Fix bug formatting modules where we were incorrectly flagging them as JS.

BUG=
R=jmesserly@google.com, vsm@google.com

Review-Url: https://codereview.chromium.org/2811343002 .
2017-04-17 14:57:31 -07:00
Jennifer Messerly 132ddcaacf fix errors and warnings in DDC
TBR=vsm@google.com,jacobr@google.com

Review-Url: https://codereview.chromium.org/2768693003 .
2017-03-21 20:12:05 -07:00
Jacob Richman 9484ac8bdf Format all dart dev compiler files
BUG=
R=vsm@google.com

Review-Url: https://codereview.chromium.org/2752163002 .
2017-03-15 21:34:25 -07:00
Jacob Richman 2ec1890ac4 Tweak location sdk summary is accessed from.
Bazel build rules now place the sdk summary in a different directory
than the summary root directory. Fix the ddc compiler running in the
browser to match.

BUG=
R=vsm@google.com

Review-Url: https://codereview.chromium.org/2753723002 .
2017-03-14 17:41:50 -07:00
Devon Carew b80390d0f5 Have dartdevc support --version.
BUG=
R=vsm@google.com

Review-Url: https://codereview.chromium.org/2747743003 .
2017-03-13 16:10:21 -07:00
Jacob Richman c9675aeefb Do not return the JSON as an escaped String to work around a strange v8 bug.
This makes the source files a little easier to read anyway and the JSON
is not typically that nested so there should be a minimal statup performance hit.

Do not return the JSON as an escaped String to work around a strange v8 bug.

BUG=
R=vsm@google.com

Review-Url: https://codereview.chromium.org/2747733003 .
2017-03-13 15:49:09 -07:00
Jacob Richman 1f38879094 Inline source maps as part of each script.
Unfortunately this is required as even with ideal caching, performing
XHRs to load all source maps increased load times by ~5 seconds for large
applications. Performance hit is now minimal.

BUG=

Review-Url: https://codereview.chromium.org/2747513003 .
Review-Url: https://codereview.chromium.org/2746033003 .
2017-03-13 10:46:02 -07:00
Jacob Richman 7ba7e0cee6 Make all DDC internal stack traces apply source maps.
Make DDC a better platform for debugging by ensuring that stack traces
generated by DDC even when using the raw dart:core StackTrace class
apply JS source maps and benefit from the polish provided by the
stack_trace package.

stack_trace_mapper.dart needs to be compiled to js and included on your
page to benefit from this functionality. Otherwise you will still see
regular JS stack traces as usual.

BUG=
R=vsm@google.com

Review-Url: https://codereview.chromium.org/2735303002 .
2017-03-08 19:13:00 -08:00
Jacob Richman a1b8c1c6d5 Extend the API exposed to JS to include a method that resolves urls against the summaryDataStore finding the closest match to a file with a summary or returning null if no urls match the path.
Update dev_compiler web project to work with latest analyzer changes.

Tweak API to work better with new summary paths and small polish items.

BUG=
R=jmesserly@google.com

Review-Url: https://codereview.chromium.org/2713773004 .
2017-02-23 11:29:10 -08:00