Commit Graph

25 Commits

Author SHA1 Message Date
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
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
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
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
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 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
Vijay Menon d5e5feb686 Shut up bad analyzer warning
This is a workaround for #28507

TBR=leafp@google.com

Review-Url: https://codereview.chromium.org/2667753003 .
2017-01-31 10:08:47 -08:00
Dan Rubel 55ef6e193c support --options flag and other analysis options flags in DDC
This updates DDC options processing to support:
* --options /path/to/analysis/options/file.yaml
* --enable-strict-call-checks
* --supermixin
* --no-implicit-casts
* --no-implicit-dynamic

As well as general refactoring and cleanup of DDC options processing

R=vsm@google.com

Review-Url: https://codereview.chromium.org/2598593003 .
2017-01-04 18:15:21 -05:00
Dan Rubel 13bd1ad0bf DDC/AnalyzerCLI common cmdline option processing
Refactor DDC and Analyzer CLI command line option processing
to use common createContextBuilderOptions method
and ContextBuilderOptions to hold common options.

R=brianwilkerson@google.com

Review-Url: https://codereview.chromium.org/2584293003 .
2016-12-19 16:24:20 -05:00
Jennifer Messerly 2e8d011ca3 fix #27607, add dev_compiler summary to the SDK and move JS files
R=vsm@google.com

Review URL: https://codereview.chromium.org/2474523003 .
2016-11-01 18:17:43 -07:00
Jacob Richman 4f6ce11bc8 Emulate compiling a source file in the context of an existing library. Add --debugger-compile flag that performs permissive dynamic calls on private members. Polish web_command.dart adding the ability to evaluate code in the context of an existing library.
BUG=
R=brianwilkerson@google.com, jmesserly@google.com

Review URL: https://codereview.chromium.org/2423313002 .
2016-10-18 16:34:48 -07:00
Jacob Richman d858c4f2ae Fix build break.
BUG=
R=jmesserly@google.com

Review URL: https://codereview.chromium.org/2346573002 .
2016-09-14 13:07:34 -07:00
Jacob Richman 38724f0626 Update web_command code so that it continues to use the legacy module loader. Drive by removal of misleading comments.
BUG=
R=jmesserly@google.com

Review URL: https://codereview.chromium.org/2303163002 .
2016-09-06 09:57:05 -07:00
Vijay Menon 2bc19eaa64 Remove deprecated code
Updating to the latest analyzer.

R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org/2289263004 .
2016-08-30 15:39:38 -07:00
John Messerly c1139934a7 fix #626, add AMD module format and make it default
R=nweiz@google.com, vsm@google.com

Review URL: https://codereview.chromium.org/2249233002 .
2016-08-25 09:39:36 -07:00
John Messerly 94085a662e a few cleanups to get IDE message clean
R=priscillalee@google.com

Review URL: https://codereview.chromium.org/2221253003 .
2016-08-09 13:40:45 -07:00
Priscilla Lee 1233b35daa Restructured the set up for the compiling function. Also added room for list of additional summaries.
BUG=
R=jacobr@google.com, jmesserly@google.com

Review URL: https://codereview.chromium.org/2208243002 .
2016-08-09 10:40:35 -07:00
Priscilla Lee d2ec49d1f7 Working compiler in browser.
BUG=
R=jmesserly@google.com

Review URL: https://codereview.chromium.org/2183603003 .
2016-07-29 09:18:13 -07:00