Commit Graph

14 Commits

Author SHA1 Message Date
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
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 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
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 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 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 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
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 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